Hello, this is Kamimoto!
In my previous article, I compared the output of "Krea-2," "Anima," and "SDXL," but this time I've taken it a step further and challenged myself to perform local LoRA training for "Krea2"!
However, if you try to load the model and force it to run normally, your VRAM will be depleted in no time. To run training using a massive text encoder like Qwen3-VL or the DiT itself, mechanisms such as creating a cache during preprocessing, using fp8 scaling, and offloading blocks to main memory are essential.
This time, I will provide an easy-to-understand "Complete Guide" documenting my verification process, from the troubles I encountered when first trying "ai-toolkit", to successfully completing 2000 steps using kohya-ss's "musubi-tuner", as well as a comparison of the resulting LoRA generations!
Krea2 LoRA Training Environment

While AI-Toolkit is a well-known training tool for image generation AI, I ultimately decided to use kohya's "musubi-tuner".
My PC environment is as follows. The graphics card has 12GB of VRAM.
OS: Windows 11 Pro
CPU: Core i3 12100F
MEM: DDR4 48GB
GPU: NVIDIA GeForce RTX 4070 12GB
Training Data: 20 illustrations (with a caption file .txt prepared for each image)
I will proceed assuming the following common local configuration for the directories of each tool.
ComfyUI folder: [ComfyUI_Path]/ComfyUI_windows_portable
musubi-tuner folder: [Work_Path]/musubi-tuner
Training data location: [Work_Path]/dataset/
Output destination for artifacts: [Work_Path]/musubi-tuner/outputs/
Initially tried with ai-toolkit, but hit the OOM wall
At first, I decided to try "ai-toolkit," which has a proven track record for LoRA training of other image generation models. I thought it would run smoothly as usual, but... reality wasn't that kind. Simply put, "Krea2 is heavier than I imagined".
Especially during training, because the Qwen3-VL (text encoder), Qwen-Image VAE, and the Krea-2 DiT itself all demand VRAM simultaneously, it is impossible to fit into a 12GB environment using the brute-force methods of standard LoRA training.
To get it running somehow, I stripped away various settings on the ai-toolkit side.
Adjusted to be able to read Krea2's fp8 scaled checkpoint
Pre-generated latent cache for Qwen-Image VAE
Created pre-cache for Qwen3-VL text embedding
Set train_text_encoder: false (turned off text encoder training)
Avoided loading the text encoder
Turned off generation of unconditional embedding
Minimized the LoRA rank count
Boldly reduced training resolution to 256x256
Maximally utilized layer offloading (offloading from VRAM to main memory)
Checked operation with a single-step smoke test
I went as far as the extreme limit of lightweighting—not only by "not training the text encoder," but also by "avoiding touching the VRAM as much as possible during training." However, the result was an error...
It passes the preprocessing stages like latent cache and text embedding cache creation, but it hits an OOM (Out of Memory) error right before entering the main training loop, or at the moment it tries to allocate the first CUDA tensor.
If it crashed during a part where heavy calculations like forward or backward passes run, that would be one thing, but hitting an OOM the moment it tries to allocate a tiny tensor for the scheduler is just hopeless... This isn't so much about that specific process being heavy, but rather that by the time the Krea2 model structure itself was loaded onto the GPU in a trainable state, the 12GB of VRAM was already full, leaving no room to spare. Probably.
The conclusion is that with the current implementation of ai-toolkit (as of 2026/6/24), there is simply a lack of a mechanism to effectively offload VRAM memory pressure during the main training loop. So, I gave up on ai-toolkit.
The Savior: Switching to musubi-tuner
Meanwhile, information appeared on my X timeline that "musubi-tuner", developed by kohya, now supports Krea2 LoRA training.
I decided to read through the official documentation right away.
With musubi-tuner, it is said that you can complete training with 12GB VRAM. The points to pay particular attention to are as follows.
Krea2 has both "RAW" and "Turbo" models
The recommended workflow is to train with RAW and infer (generate images) with Turbo.
Use raw.safetensors for training.
Pre-cache the latents using the Qwen-Image VAE.
Also pre-cache the output of the text encoder (Qwen3-VL-4B).
This allows you to completely remove the text encoder from the main training loop (this is super important!).
--fp8_base and --fp8_scaled are available as options for low-VRAM environments.
With the memory offloading option --blocks_to_swap, you can process while offloading up to 26 out of the 28 total DiT blocks to main memory (CPU side).
In other words, it is packed with features for low-VRAM that are not found in ai-toolkit. You definitely have to use it.
Environment Setup and Model Preparation for musubi-tuner
Let's get started with setting up musubi-tuner!
If the CUDA version of PyTorch is not recognized correctly during standard installation, you need to explicitly re-sync it. In my environment, I explicitly re-synced the CUDA-compatible version using the following command.
uv sync --extra cu128
Just to be sure, I will check if CUDA is recognized correctly.
uv run --extra cu128 python -c "import torch; print(torch.version, torch.version.cuda, torch.cuda.is_available())"
As a result, I can confirm that CUDA is successfully enabled (True).
2.11.0+cu128 12.8 True
Following the official procedure, prepare the following models required for training.
-
DiT RAW:
Model file: raw.safetensors
Hugging Face repository: krea/Krea-2-Raw
-
VAE:
Model file: qwen_image_vae.safetensors (this time, I am reusing an existing file used in ComfyUI)
-
Text Encoder:
Model file: qwen3vl_4b_bf16.safetensors
Hugging Face repository: Comfy-Org/Qwen3-VL
I had "Krea-2 Turbo fp8" for inference, but I did not possess the "RAW" model. Following the official recommendations, I newly downloaded the DiT RAW model. Also, for the text encoder, I obtained the bf16 single safetensors as specified by the official guidelines, rather than the fp8 version.
Place the downloaded model file in the appropriate directory under musubi-tuner.
# 配置例 ./models/krea2/raw/raw.safetensors ./models/krea2/qwen3vl/text_encoders/qwen3vl_4b_bf16.safetensors
For the VAE, I referenced the following existing file from ComfyUI.
[ComfyUI_Path]/ComfyUI/models/vae/qwen_image_vae.safetensors
Preparing images for training
I prepared 20 images for training.
Note:
If the resolution of the training images is low, the resulting LoRA will only generate "flat" images. I previously tried making a LoRA using 12 low-resolution images (mostly faces), and even though it took 3 hours, the results were mediocre. It is better to prepare
high-definition 1024x1024 images whenever possible.
The key point is to generate images in your preferred art style (e.g., your favorite SDXL model) and use them as the training dataset for Krea2.
This allows you to continue using your favorite art style or characters while enjoying the benefits of Krea2's high prompt adherence as a state-of-the-art model.
For captions, prepare a text file for each image (same name as the image with a .txt extension) and describe them in natural language (English) as shown below.
Caption example:
(トリガーワードを書く), A young anime girl with dark hair tied in a low bun and loose strands framing her face stands gracefully amidst a lush garden of vibrant blue, purple, and pink hydrangeas, wearing a delicate white spaghetti strap sundress. The scene is bathed in soft, dappled sunlight filtering through the leaves, creating a dreamy, cinematic atmosphere with a bright, bokeh-filled background of greenery.
(A young anime-style girl with black hair tied in a low bun and loose strands framing her face, standing gracefully in a lush garden blooming with vibrant blue, purple, and pink hydrangeas, wearing a delicate white spaghetti-strap summer dress. Soft dappled sunlight filtering through the leaves creates a dreamy, cinematic atmosphere with a bright green bokeh background.)
Since it is difficult to come up with captions for 20 images by yourself, I recommend using ChatGPT or a local LLM (like LM Studio) to generate them automatically!
Dataset configuration (dataset config)
To perform a test run (validation) at a resolution of 256 x 256 first, I created the dataset_config.toml as follows.
[general] resolution = [256, 256] caption_extension = ".txt" batch_size = 1 enable_bucket = true bucket_no_upscale = false [[datasets]] image_directory = "[Work_Path]/dataset/" cache_directory = "./work/cache/sample_krea2_256" num_repeats = 1
Here, I have configured it to point directly to the image folder while creating only the cache for musubi-tuner in a separate folder (./work/cache/).
Creating latent cache
Following the official procedure, I will create a latent cache specifically for Krea2. By performing this preprocessing, you can skip the VAE processing during training, which significantly reduces memory usage and improves speed.
uv run --extra cu128 python src/musubi_tuner/krea2_cache_latents.py --dataset_config configs/sample_krea2_256.toml --vae [ComfyUI_Path]/ComfyUI/models/vae/qwen_image_vae.safetensors --batch_size 1 --skip_existing
When executed, the pre-calculation of latent variables by the VAE begins as a preprocessing step, and cache files (such as .npz format) are saved.
Loading VAE... Caching latents... Saved latent cache: ./work/cache/sample_krea2_256/xxxx.npz
*Note: The cache filename may contain the description '1024x1024', but this is due to internal specifications (representations) of Krea2 or the Qwen-Image VAE. The internal bucket size itself is correctly recognized as (256, 256), so there is no need to worry.
Creating Text Encoder Output Cache
Next, we will pre-cache the output of the Qwen3-VL text encoder. Since Krea-2 utilizes hidden states from multiple layers of the text encoder, it is necessary to pre-process this using a dedicated script as well.
uv run --extra cu128 python src/musubi_tuner/krea2_cache_text_encoder_outputs.py --dataset_config configs/sample_krea2_256.toml --text_encoder models/krea2/qwen3vl/text_encoders/qwen3vl_4b_bf16.safetensors --batch_size 1 --skip_existing
With this, the creation of the pre-cache is complete! Let's finally start the training.
Low VRAM: Starting LoRA Training
1. Trial run with a 1-step 'smoke test'Before starting the actual training, I performed a 'smoke test' by running just one step of training to verify operation. If no errors occur here, it should pass in terms of memory design.
uv run --extra cu128 accelerate launch --num_cpu_threads_per_process 1 --mixed_precision bf16 src/musubi_tuner/krea2_train_network.py --dit models/krea2/raw/raw.safetensors --vae [ComfyUI_Path]/ComfyUI/models/vae/qwen_image_vae.safetensors --dataset_config configs/sample_krea2_256.toml --sdpa --mixed_precision bf16 --timestep_sampling shift --weighting_scheme none --discrete_flow_shift 2.5 --optimizer_type adamw8bit --learning_rate 1e-4 --gradient_checkpointing --gradient_checkpointing_cpu_offload --max_data_loader_n_workers 2 --network_module networks.lora_krea2 --network_dim 32 --network_alpha 32 --fp8_base --fp8_scaled --blocks_to_swap 26 --block_swap_h2d_only --block_swap_ring_size 1 --split_attn --max_train_steps 1 --save_every_n_steps 1 --seed 42 --output_dir outputs/krea2_sample --output_name krea2_rank32_smoke
If it goes well, you will see logs like the ones below. You can see that the settings for low memory are being properly applied.
LoRAStreamOffloader[single]: H2D-only block swap. 26 streaming / 28 blocks, ring=1 Krea 2: Block swap enabled. Swapping 26 of 28 blocks to device cuda. Supports backward: True create LoRA for U-Net/DiT: 264 modules. total optimization steps: 1 avr_loss=0.102 model saved.
Even in the same 12GB VRAM environment where ai-toolkit would crash the moment training started, it completed one step and saved the model. I am once again impressed by the power of musubi-tuner.
2. Starting the actual 2000-step trainingNow that the smoke test is complete, it's time for the real thing. I will train for 2000 steps.
The command used for the actual training is as follows. Please modify it as appropriate for your own environment. Asking Claude Code or Codex is a quick way to do this.
uv run --extra cu128 accelerate launch --num_cpu_threads_per_process 1 --mixed_precision bf16 src/musubi_tuner/krea2_train_network.py --dit models/krea2/raw/raw.safetensors --vae [ComfyUI_Path]/ComfyUI/models/vae/qwen_image_vae.safetensors --dataset_config configs/sample_krea2_256.toml --sdpa --mixed_precision bf16 --timestep_sampling shift --weighting_scheme none --discrete_flow_shift 2.5 --optimizer_type adamw8bit --learning_rate 1e-4 --gradient_checkpointing --gradient_checkpointing_cpu_offload --max_data_loader_n_workers 2 --persistent_data_loader_workers --network_module networks.lora_krea2 --network_dim 32 --network_alpha 32 --fp8_base --fp8_scaled --blocks_to_swap 26 --block_swap_h2d_only --block_swap_ring_size 1 --split_attn --max_train_steps 4000 --save_every_n_steps 500 --seed 42 --output_dir outputs/krea2_sample ` --output_name sample_krea2_rank32_4000
In this configuration, 'block swapping (CPU-GPU transfer)' occurs, so the bottleneck depends more on the transfer speed than the speed of the GPU itself. The actual time taken was roughly 2 hours. It is about the same as training Anima or SDXL.
If successful, a LoRA will be created in the specified folder, so place it in the designated folder to generate images with ComfyUI.
Generating images with the trained LoRA
Once training is successfully completed, place the LoRA (.safetensors) in the models/loras/ folder within your ComfyUI directory.
Since ComfyUI seems to already have a Krea2 workflow, you just need to add the LoRA node to it.
Examples using the custom LoRA (Krea2 vs Anima)
I generated three scenes using the trained Krea-2 LoRA. For comparison, I used images generated by the same character LoRA I created with Anima previously.
Scene 1: Hydrangea Garden(トリガーワード), adult anime woman, dark hair in an elegant bun, gray-purple eyes, gentle smile, white sundress, standing in a hydrangea garden, soft daylight, detailed anime illustration
(trigger word, adult anime woman, elegant black hair in a bun, gray-purple eyes, gentle smile, white summer dress, standing in a hydrangea garden, soft natural light, detailed anime illustration)
The Krea2 LoRA has learned sufficiently at 2000 steps. It looks good. Compared to Anima, there is more detail in the eyes and hair, and it has a sense of depth. Nice.
Scene 2: Quiet Library(トリガーワード), adult anime woman, dark hair in a bun, gray-purple eyes, black dress and choker, holding books in a quiet library, warm window light, detailed anime illustration
(trigger word, adult anime woman, black hair in a bun, gray-purple eyes, black dress and choker, holding a book in a quiet library, warm window light, detailed anime illustration)
Krea2 certainly has finer detail in the eyes and hair. The extra fingers are a drawback. I think it can be managed with some trial and error, but that's just a common occurrence with generative AI.
Scene 3: Cafe Moment(トリガーワード), adult anime woman, dark hair in a loose bun, gray-purple eyes, white blouse and dark skirt, sitting at a cafe table with a coffee mug, soft afternoon light, detailed anime illustration
(trigger word, adult anime woman, black hair in a loose bun, gray-purple eyes, white blouse and dark skirt, sitting at a cafe table with a coffee mug, soft afternoon light, detailed anime illustration)
Krea2 definitely has more detail in the eyes and hair. They are sparkling. The lighting also feels nicer than Anima. I think Anima is better with fingers, though.
Overall Comparison GridThoughts after comparing
First of all, the Krea2 LoRA captured the character's features (such as the bun hairstyle and gentle eyes) much better than I expected!
The overall atmosphere is quite stable, and in the hydrangea scene, I felt the character's direction was sufficiently close even when compared to the Anima output.
However, regarding the overall level of perfection and composition stability, I still get the impression that the existing Anima model has a slight lead. Anima is particularly superior in finger stability.
On the other hand, the appeal of Krea2 lies in the fineness of the drawing and the softness of the facial features. The lines don't become too stiff, resulting in a delicate atmosphere with a certain transparency. Krea2 seems to have the advantage in the depiction of the eyes.
However, in terms of generation speed, it takes several minutes per image because I am running a heavy RAW model for 28 steps each time while applying block swaps, so it is quite slow.
If I want to use it at a practical speed, it seems best to try the operation of applying the LoRA to a "Turbo model" on the inference side, as recommended by the official team. I would like to try this next time!
Bonus: Why was I able to train it with musubi-tuner?
Why was I able to successfully complete the training with musubi-tuner in the same environment where ai-toolkit would immediately OOM at the start of training? I have organized the approach here. This is just a guess.
1. The text encoder can be separated from the main training processThe Krea2 text encoder (Qwen3-VL-4B-Instruct) is heavy even just for inference during image generation, so it is impossible to keep it loaded in VRAM during the training loop.
With musubi-tuner, you can pre-cache all outputs using a preprocessing script, which completely eliminates the need to load the text encoder model itself during the actual training loop. This might be the biggest reason for success.
2. Supports "fp8 scaled" loading specifically for Krea2The --fp8_base --fp8_scaled options dynamically load the Linear layers of the main Krea2 DiT blocks as scaled fp8.
Rather than applying fp8 uniformly, it seems to contribute significantly to memory reduction without compromising expressive power by precisely controlling which layers are applied.
3. The effect of "block swap"The Krea2 DiT has a total of 28 main blocks, and it seems that 26 of them are offloaded to the CPU (main memory) instead of the GPU, and calculations are performed while streaming them to the GPU sequentially when needed.
Especially in training where the base model is fixed and only the LoRA part is updated, the --block_swap_h2d_only option, which only requires reading and avoids writing back from the GPU to the CPU, was very effective.
4. LoRA target settings are optimized for Krea2By specifying the dedicated module networks.lora_krea2, the 264 Linear layers inside the Krea2 DiT are automatically extracted as targets for LoRA application. The rank and alpha values (32) also seem to be optimized according to the official recommended settings.
If you have a VRAM-rich environment, ai-toolkit is probably fine, but for those with low VRAM, musubi-tuner is the only choice!
Summary
In this experiment, I was able to run LoRA training for Krea2, a super heavy-duty latest model, on a local 12GB VRAM graphics card. I couldn't have made a LoRA for Krea2 without musubi-tuner, so I am truly grateful to kohya-san!
I haven't verified things like generation speed or compatibility with Turbo inference yet, so I'd like to verify those next time.
I hope this article is helpful for those who are also challenging themselves with image generation AI training in a low VRAM environment!
Reference: Click here for the Krea2 comparison article
Click here for other LoRA training articles
Thank you for reading until the end!
If you found this article helpful or if it gave you some development tips, please click the [Like (heart icon)] at the bottom of the screen; it would be incredibly encouraging and make all the effort of verification worthwhile!
I will continue to share more hands-on technical verification and workflow efficiency tips, so please be sure to follow me as well!