Reproducible Diffusers LoRA inference pipelines for adapters trained with ostris/ai-toolkit.
← Docs Home · Model Catalog · HTTP API · Troubleshooting
API model id: krea2
URL slug: krea2
AI Toolkit training arch: krea2
This page documents the reference inference pipeline for krea2 — the full (non-distilled) Krea 2 text-to-image checkpoint. It is designed for running LoRAs trained with ostris/ai-toolkit while minimizing training preview vs inference mismatch.
If you are trying to reproduce AI Toolkit sample previews, treat the code linked below as the source of truth.
Run in the cloud (optional): If you want to reproduce the examples on this page in a pinned runtime without local CUDA/driver setup (and reduce preview-vs-inference drift), run it via RunComfy’s Cloud AI Toolkit (Train + Inference). 👉 You can open it here: Cloud AI Toolkit (Train + Inference)
| Field | Value |
|---|---|
| Pipeline | src/pipelines/krea2.py |
| Base checkpoint | krea/Krea-2-Raw (single file raw.safetensors at the repo root) |
| Text encoder | Qwen/Qwen3-VL-4B-Instruct (a stack of 12 hidden-state layers) |
| VAE | Qwen/Qwen-Image (vae/ subfolder, f8, 16 latent channels) |
| Defaults | sample_steps=30, guidance_scale=4.0, seed=42 |
| Resolution snapping | Floors width/height to a multiple of 16 (VAE f8 x patch 2) |
| Control image | No |
| LoRA scale behavior | Merged into the transformer at load. Changing loras[].network_multiplier triggers a full model reload. |
| Needs AI Toolkit | Yes — the transformer, packing and sampler come from extensions_built_in/diffusion_models/krea2/. |
| Gated weights | Yes — krea/Krea-2-Raw is HF-gated. HF_TOKEN must belong to an account that accepted the Krea 2 license. |
src/pipelines/krea2.pysrc/pipelines/base.pysrc/schemas/request.pysrc/schemas/models.pysrc/pipelines/__init__.pyextensions_built_in/diffusion_models/krea2/ in ostris/ai-toolkit{
"model": "krea2",
"trigger_word": "sks",
"prompts": [
{
"prompt": "[trigger] a photo of a person",
"width": 1024,
"height": 1024,
"seed": 42,
"sample_steps": 30,
"guidance_scale": 4.0,
"neg": ""
}
],
"loras": [
{
"path": "my_lora_job/my_lora.safetensors",
"network_multiplier": 1.0
}
]
}
guidance_scale is 0-normalized inside the model. AI Toolkit computes
guidance = max(0, guidance_scale - 1) before sampling, and this pipeline does exactly the
same, so a guidance_scale here means the same thing as sample.guidance_scale in a training
config. Do not subtract the 1 yourself.mu based on the image-token count (endpoints 256 → 0.5 and
6400 → 1.15). mu is deliberately not pinned to 1.15 for the distilled checkpoints, because
no AI Toolkit krea2 preset pins it either — preview parity wins over the vendor default.network_multiplier is fixed after
load. A different scale forces a full reload (~26 GB checkpoint).diffusion_model.*, peft-style
lora_A/lora_B, no .alpha tensors — a missing alpha defaults to rank).krea2.sample_steps, and remember guidance_scale is 0-normalized.loras[].network_multiplier.krea2 (safetensors metadata ss_base_model_version is krea2).