explaingit

cliffnodes/fedoraitoolkit

Analysis updated 2026-05-18

11PythonAudience · developerComplexity · 5/5Setup · hard

TLDR

A fork of ai-toolkit that adds a second training stage for Krea 2 LoRA and LoKr adapters, optimizing directly against face and body similarity rewards.

Mindmap

mindmap
  root((repo))
    What it does
      LoRA LoKr training
      Krea 2 reward stage
      Face and body rewards
    Tech stack
      Python
      PyTorch
      ArcFace
      SAM 3D Body
    Use cases
      Custom face LoRA training
      Body proportion matching
      Low VRAM face only training
    Audience
      ML practitioners
      Diffusion model trainers
      Developers
    Setup
      Separate venv
      Gated HF checkpoint
      High VRAM GPU

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Fine-tune a LoRA or LoKr adapter on Krea 2 so generated images match a specific person's face and body build.

USE CASE 2

Run standard ai-toolkit training unchanged for other supported diffusion models.

USE CASE 3

Use low VRAM configs to train face-only rewards on consumer GPUs with as little as 8GB.

What is it built with?

PythonPyTorchNode.jsLoRAArcFaceSAM 3D Body

How does it compare?

cliffnodes/fedoraitoolkit2arons/llm-cliabe238/claude-video-plus
Stars111111
LanguagePythonPythonPython
Setup difficultyhardeasyeasy
Complexity5/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Body reward training requires gated Hugging Face checkpoint access and a high VRAM GPU.

In plain English

FedorAiToolkit is a fork of the open source ai-toolkit project used for training LoRA and LoKr adapters on diffusion image models. The fork adds a second training stage built specifically for the Krea 2 model: after a normal supervised fine-tuning stage, the adapter is further optimized directly against differentiable reward signals computed on images the model generates while training, rather than only against a fixed dataset. A version for the Ideogram 4 model is described as still in progress. Everything from the original ai-toolkit continues to work unchanged, including support for other models, the web UI, and standard training. To use this fork, you set up its own virtual environment separate from any existing ai-toolkit install, install PyTorch and the listed requirements, and either launch the browser based UI or run training from the command line using a provided YAML config file that points at your dataset and trigger word. The added reward stage measures two things during training: a face reward that compares the generated face against reference images using the ArcFace face recognition model, and a body geometry reward that estimates body shape and proportions from generated images using Meta's SAM 3D Body model, then compares that shape against a prototype built from reference images while ignoring pose. The two rewards can be combined and weighted, and if the body model's checkpoint is not installed, training falls back to using the face reward alone. Setting up the body reward takes extra steps because the SAM 3D Body checkpoint is gated on Hugging Face: a user must request access, authenticate with a token, clone a separate repository for the model code, and download the checkpoint before enabling body training. Face-only training does not require any of this. Hardware requirements vary by configuration: an example config exists for GPUs with as little as 8GB of memory using face-only rewards at a smaller resolution, while combined face and body reward training on Krea 2 needs around 32GB of VRAM. The project is a fork, so upstream ai-toolkit's own licensing and documentation still apply beyond what this fork changes.

Copy-paste prompts

Prompt 1
Help me set up a separate virtual environment and clone FedorAiToolkit without breaking my existing ai-toolkit install.
Prompt 2
Walk me through requesting Hugging Face access and downloading the SAM 3D Body checkpoint for body reward training.
Prompt 3
Explain the difference between the krea2_lokr_draft.yaml and krea2_lokr_draft_5060_8gb.yaml example configs.
Prompt 4
Show me how to set draft.reward.face_weight and body_weight for my training run.

Frequently asked questions

What is fedoraitoolkit?

A fork of ai-toolkit that adds a second training stage for Krea 2 LoRA and LoKr adapters, optimizing directly against face and body similarity rewards.

What language is fedoraitoolkit written in?

Mainly Python. The stack also includes Python, PyTorch, Node.js.

How hard is fedoraitoolkit to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is fedoraitoolkit for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.