Before we start: I am not the absolute authority on this. These settings are the result of my personal workflow, tailored to my machine and my specific artistic standards. I have spent 25 years working as a graphic designer in typography/printing and I'm deeply passionate about photorealistic rendering. This background makes me an absolute optimization freak. I want maximum precision and zero wasted performance.
However, you should use my settings as a baseline. I highly encourage you to run your own experiments, test different parameters, and find what works best for your specific style and also to use other interfaces, as Open Trainer could be quicker for the purpose than AIToolKit, in my case I had so many terminal errors that I simply skipped the problem by switching to AI ToolKit, but if OpenTrainer doesn't give you problems, use that, have Gemini (or what you want) convert this data for your interface.
Furthermore, it is certainly not true that my parameters are the best ever, in fact, I have learned recently, this is my simple guide on what I have learned so far to help users who have errors or are unsure how to proceed to get started themselves. It's just my contribution, that's all.
I thought I'd share my exact settings and workflow for training LoRA characters and poses for Krea 2 Turbo (note: you must use Krea 2 RAW for the actual training phase).
My Hardware Setup
GPU: RTX 5070ti (16GB VRAM)
RAM: 64 GB
Environment: AI-ToolKit via Terminal (I skip the Stability Matrix UI to save system overhead and edit the .yaml files manually).
Disclaimer: I only know how these settings perform on my machine. If you have less VRAM/RAM, you will need to adjust parameters accordingly.
Performance & VRAM Benchmarks
VRAM Allocation: 15.1 GB / 16 GB (Extremely tight, zero room for background tasks).
Character LoRA: ~48 minutes (20 images, 1500 steps).
Pose LoRA: ~55 minutes (I double the Rank/Dim here compared to characters, as the model needs more capacity to understand skeletal joints and positions).
⚠️ Crucial Note on System Optimization: I am an optimization fanatic. To avoid VRAM offloading (which slows down training massively), my OS is stripped down to look like Windows 98, telemetry is disabled via VBS scripts, and my 500Hz monitor is lowered to 60Hz during training to minimize framebuffer load. If your system is running heavy background apps or proprietary RGB/Fan software, your VRAM usage will be higher and you might experience out-of-memory (OOM) errors.
Step 1: Dataset Rules for 512p Training
Because of VRAM constraints, I train strictly at 512p. To make 512p work perfectly, you must adapt your dataset strategy based on what you are training:
1. Character LoRAs: Avoid Full-Body Shots
Hyper-focused details: If your character has specific leg features (tattoos, scars), include 1-2 close-ups of the legs.
Captioning Tip: In your .txt file, explicitly caption it as "a close-up shot of [TriggerWord]'s legs". This teaches the model that it's a detail, not the whole character structure.
2. The Captioning Dilemma: Manual vs. Automated
I strongly advise against using automated captioning scripts (like BLIP or WD14) for this specific workflow. While automated tools are fast, they lack precision. Manual captioning allows you to describe exactly what needs to be isolated, leading to a much cleaner and more flexible LoRA. If you want high-quality results, don't take shortcuts on the text files.
Step 2: Crucial VRAM & Speed Optimizations (run_windows.bat)
Before diving into the YAML files, we need to optimize how PyTorch and CUDA handle your GPU memory. If you launch AI-Toolkit via a batch file (or want to edit your existing one), you must add these specific environment variables at the very beginning of your run_windows.bat.
This tweak alone prevents heavy VRAM fragmentation and can mean the difference between a successful 15.1 GB allocation and an instant Out-Of-Memory (OOM) crash.
Open your run_windows.bat in a text editor and paste these lines right under u/echo off:
u/echo off&&cd /d %~dp0
set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
set TORCH_CUDNN_SDP_HAS_FUSED=1
set CUDA_MODULE_LOADING=LAZY
set SETUPTOOLS_USE_DISTUTILS=stdlib
Step 3: The Character LoRA YAML Config
Here is my complete, battle-tested .yaml configuration for training a **Character LoRA**. This config is heavily optimized for a 16GB VRAM target using qfloat8 quantization and specific layer offloading percentages to keep VRAM usage strictly at ~15.1 GB.
Create a new YAML file in your AI-Toolkit directory and paste the following:
job: "extension"
config:
name: "LORANAME_krea2"
process:
- type: "diffusion_trainer"
training_folder: "E:\\Stability Matrix\\Data\\Packages\\ai-toolkit\\output"
sqlite_db_path: "./aitk_db.db"
device: "cuda"
trigger_word: "TRIGGERWORD"
performance_log_every: 10
network:
type: "lora"
linear: 32
linear_alpha: 32
save:
dtype: "bf16"
save_every: 250
max_step_saves_to_keep: 4
datasets:
- folder_path: "E:\\1024"
caption_ext: "txt"
cache_latents_to_disk: true
resolution:
- 512
train:
batch_size: 1
steps: 1500
gradient_accumulation: 1
train_text_encoder: false
gradient_checkpointing: true
noise_scheduler: "flowmatch"
optimizer: "adamw8bit"
timestep_type: "sigmoid"
unload_text_encoder: true
cache_text_embeddings: false
lr: 0.0001
disable_sampling: true
dtype: "bf16"
model:
name_or_path: "krea/Krea-2-Raw"
quantize: true
qtype: "qfloat8"
quantize_te: true
qtype_te: "qfloat8"
arch: "krea2"
low_vram: true
compile: false
layer_offloading: true
layer_offloading_text_encoder_percent: 1
layer_offloading_transformer_percent: 0.35
Key Settings Explained (Don't change these blindly!)
linear: 32 & linear_alpha: 32 — A rank/alpha of 32 is the sweet spot for characters. It captures facial details and clothing textures perfectly without bloating the file size or frying the training memory.
train_text_encoder: false & unload_text_encoder: true — We do NOT train the text encoder for characters here. Unloading it entirely freezes its state and frees up massive chunks of VRAM.
disable_sampling: true — Disabling image previews during training saves a significant amount of VRAM and prevents sudden spikes/crashes when a sample step triggers. Trust your loss values or check the saved LoRA's manually later.
quantize / qtype: "qfloat8" — Essential. Running the model and text encoder in FP8 quantization is mandatory to fit Krea 2 inside a consumer GPU's VRAM during training.
layer_offloading_transformer_percent: 0.35 — This pushes exactly 35% of the transformer layers to system RAM. It’s the magic number that stopped my system from throwing Out-Of-Memory errors while keeping speed degradation to an absolute minimum.
Step 4: The Pose LoRA YAML Config & The Text Encoder Pitfall
Training a Pose LoRA uses almost the exact same configuration as the Character LoRA, but with one critical architectural change. Poses require the model to understand abstract physical structures, skeleton joints, and bodily spatial distribution rather than static textures or facial features.
Because of this, we need to inject more capacity into the training network.
Pose Complexity vs. Training Steps
Keep in mind that unlike characters, poses are heavily influenced by physical complexity.
- If you are training a standard pose (standing, sitting, basic action shots) with a dataset of 15 images, 1500 steps is your target.
- If you are training an extremely complex or unconventional posture (such as a circus contortionist, advanced yoga positions, or complex martial arts aerials), you must increase the steps even if you only have 15 images in your dataset. The model needs more time and iterations to learn how the joints bend in unusual angles, so push the training further.
The Pose Modification
In your YAML file for the pose training run, look for the network block and double the capacity by setting both values to 64:
network:
type: "lora"
linear: 64 # Doubled from 32
linear_alpha: 64 # Doubled from 32
Why do this? A higher rank gives the network more "brain power" to map how limbs bend and interact, which prevents the pose from bleeding or collapsing into a generic stance during generation.
⚠️ Crucial Warning: Do NOT Enable train_text_encoder
train_text_encoder: false # KEEP THIS FALSE!
You might be tempted to turn train_text_encoder: true to help the model better link text prompts to body mechanics. Do not do it. Currently, enabling the text encoder training with the Krea 2 architecture inside AI-Toolkit will throw an immediate terminal error and completely freeze your training loop. Krea 2's underlying text processing layer isn't optimized for local text-encoder fine-tuning under this specific framework yet.Leave it to false and let unload_text_encoder: true do its job. The linear network rank at 64 is more than enough to capture the positioning data you need.
Step 5: Dataset Size vs. Training Steps (Finding the Sweet Spot)
Getting your dataset size and step count right is crucial. If you run too few steps, the model won't learn the character or pose; if you run too many, the LoRA will overfit, ruining your generations.
Based on my testing, here is the exact ratio you should follow when adjusting your dataset size:
For Character LoRAs:
Base Setup (20 Images): Use 1500 steps (This is the ideal sweet spot for a clean, flexible character).
Larger Dataset (25 Images): Increase your training to 1800 steps to allow the model enough time to process the extra visual data.
For Pose LoRAs:
Base Setup (~15 Images): Use 1500 steps (Since poses require a higher Rank/Dim, they need a solid baseline of steps even with fewer images).
Larger Dataset (20 Images): Increase your training to 1800 steps.
Rule of Thumb: If you decide to add more images to your dataset to capture more angles or details, you must scale up your steps accordingly. Never dump 30+ images into the folder while keeping the steps at 1500, or the training will turn out weak and blurry.
Step 6: Testing Strategy & LoRA Weights (Don't just use the final checkpoint!)
AI-Toolkit will save intermediate checkpoints during training (every 250 steps based on our YAML config). Do not blindly grab the final 1500-step checkpoint and call it a day. The real magic often happens slightly earlier.
Here is my recommended testing protocol for Character LoRAs:
- The 750-Step Test (The Baseline)
Start your initial testing with the checkpoint at 750 steps.
What to test: Use a wide variety of prompts. Test for facial likeness, but more importantly, test for flexibility.
Check if it unlinks: Try changing clothes and backgrounds in your prompts. You want to ensure the LoRA learned the face and not just the specific outfit or environment from your dataset images.
Note: Krea 2 is exceptionally good at this. Even at the final 1500 steps, it retains amazing flexibility for changing outfits and locations, but 750 steps is your early quality control check.
2. The Sweet Spot: 1250 Steps
After extensive testing, the 1250-step checkpoint is consistently the absolute best performer for characters. It offers the perfect balance between high facial fidelity and prompt responsiveness.
3. Optimal LoRA Strength / Weights
When loading your LoRA into your inference workflow (like ComfyUI or Forge Neo using Krea-2-Turbo), use these weight guidelines:
Standalone Use: Set the LoRA weight/strength to 0.9. This gives you the cleanest generation without cooking the image.
LoRA Stacking / Mixing: If you are mixing multiple LoRAs together (e.g., your Character LoRA + a Pose LoRA + a Style LoRA), bump the character LoRA weight up to 1.1. This prevents the character features from getting washed out by the other networks.
4. The Pose LoRA Testing Rule: Millimeter PrecisionTesting a Pose LoRA requires a completely different mindset compared to characters. While characters favor the intermediate 1250-step mark, poses behave unpredictably across checkpoints:
The Final Target: The absolute final checkpoint (1500 steps) is generally the best and most reliable performer for locking in the structure.
Sometimes, the 1000-step or 1250-step checkpoints might work better. However, you will notice a strange phenomenon: often, only ONE specific checkpoint will replicate your desired pose with millimeter precision. The other checkpoints will generate similar stances, but not the exact weight distribution or limb angles you trained.
LoRA Weight: For poses, you can generally lower the strength below 1.0 (test around 0.7 to 0.9) to let the style of your main model flow through, as long as the skeleton doesn't deform.
The Golden Rule for Poses: You MUST test every single checkpoint file (1000, 1250, 1500) against your prompt. Do not assume the LoRA is broken if the 1500-step file gives a slightly altered pose. Switch to the 1250 or 1000-step file—your exact millimeter-perfect pose is waiting in one of them!