Krea2-Turbo-Distill-4step-LoRA

lvladikov/Krea2-Turbo-Distill-4step-LoRA

作者
lvladikov
任务
图像生成
下载量
16,562
点赞数
208
趋势分
9
许可证
other
收录时间
2026/11/6

base_model: krea/Krea-2-Turbo base_model_relation: adapter license: other license_name: krea-2-community-license license_link: https://huggingface.co/lvladikov/Krea2-Turbo-Distill-4step-LoRA/blob/main/LICENSE.pdf library_name: diffusers tags:

  • lora
  • text-to-image
  • distillation
  • step-distillation
  • krea-2 pipeline_tag: text-to-image

Krea 2 Turbo — 4-Step Distillation LoRA

🆕 New: a 3-step LoRA takes Krea 2 Turbo from 8 steps down to 3, at three quarters of this LoRA's denoising time, with more fine detail (fine texture 1.26× the 8-step teacher's on its 22 test prompts). This 4-step LoRA stays the closest to Turbo's own 8-step pictures.

Half the steps · ~1.6× faster end to end · cleaner than the first release: grid patterns, ghosting and flat-area grain all closer to the 8-step teacher · 13 trained resolutions up to 1824×1024 · 133,000 training samples, 1.7× the first release.

🆕 This version (chk00133000) replaces the first 'final' release (chk00078000), from two months ago. I decided to train a 'few more' samples (55K more to be precise), the newer part with five critic heads where the first release had one. Measured against the 8-step teacher on the 15 test prompts at 12 sizes:

  • cleaner fine structure — the 8- and 16-pixel grid patterns at 0.96–0.98× the teacher's, where the first release was at 1.09–1.11×
  • less ghosting and fewer doubled edges — closer to the teacher at 10 of 12 sizes on both measures
  • cleaner flat areas — grain at 0.99× the teacher's, down from 1.08×
  • no over-sharpening at large sizes — fine texture at 1.01–1.04× the teacher's at 1440 px, down from 1.18–1.20×
  • saturation matching the teacher's

Fine texture now sits at the teacher's level, a touch softer than the first release at mid sizes. The first release stays in _archive/checkpoints/.

A LoRA for Krea 2 Turbo that reduces the minimum usable step count from 8 to 4 — Turbo's own model and sigmas, half the denoising passes, and the fine texture that 4-step Turbo loses put back.

  • ⚡ Half the steps — 8 → 4, on Turbo's own deployment sigmas
  • ⏱️ ~1.6× faster end to end — 54.5 s vs 88.7 s at 1024×1024 for the whole run, model load, text encoding and VAE decode included (1.8× on denoise alone, without them)
  • 🎯 Fine texture at the teacher's level — 0.96× the teacher's fine-texture energy on average over 12 sizes, 1.01–1.04× at 1440 px; the 8- and 16-pixel grid bands 0.96–0.98×, flat-area grain 0.99×, saturation 1.00×
  • 🗣️ Prompt-aware training — critic scores images against their prompts during training
  • 📐 13 trained resolutions — multi-aspect from 512×512 up to 1440×1440, and 1824×1024 since the first release
  • 🔌 Drop-in — plain LoRA weights for diffusers and ComfyUI. No custom nodes, no patched sampler, no code
  • 🎲 13,750 prompts from Lakonik's 3M-prompt dataset, each recorded as a full 8-step teacher trajectory; since the first release, 91,044 training chords on Turbo's own 8-step paths
  • 📷 43,044 real-photo crops — 25,560 from LSDIR + 17,484 from Flickr2K, captioned, in critic's real set; since the first release, 5,234 crops cut from 4K photos
  • 🔢 133,000 training samples in shipped weights — 1.7× the first release's 78,000
  • 📅 21 days on a single RTX 3090 to the first release; since then about a day on an H200 and two more on the RTX 3090
  • 🔁 16 recipe adjustments — each made on measurement of the one before; since the first release, five critic heads instead of one

💡 Too strong on a prompt? Turn it down. The LoRA restores fine texture, and on some subjects — stylised art, high-contrast splash pieces, very large renders — that can read as too much at strength 1.0. Effect scales smoothly: 0.75 is a good second setting, 0.6–0.9 is fair game.

The 15 test prompts, rendered by Krea 2 Turbo with this LoRA at 4 steps


Files

filewhat it is
krea2_turbo_4step_rank_64_lora.safetensorsLoRA in diffusers key format — see diffusers
krea2_turbo_4step_rank_64_lora_comfyui.safetensorsSame weights under ComfyUI key names — see ComfyUI
krea2_turbo_4step_lora_t2i.jsonReady ComfyUI workflow, stock nodes only
krea2_turbo_4step_rank_64_lora_checkpoint_info.mdWhich checkpoint the two weight files are, with their SHA-256s
LICENSE.pdfKrea 2 Community License Agreement
NOTICE.txtRequired attribution notice

Both weight files are one adapter — only key names differ. Both carry training details in safetensors metadata.


Quick Start

diffusers

pip install git+https://github.com/huggingface/diffusers.git
import torch
from diffusers import Krea2Pipeline
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file

pipe = Krea2Pipeline.from_pretrained("krea/Krea-2-Turbo", torch_dtype=torch.bfloat16).to("cuda")

lora = hf_hub_download("lvladikov/Krea2-Turbo-Distill-4step-LoRA", "krea2_turbo_4step_rank_64_lora.safetensors")
state = load_file(lora)
state = {f"transformer.{k}": v for k, v in state.items() if not k.endswith(".alpha")}
pipe.load_lora_weights(state, adapter_name="4step")

image = pipe("a fox in the snow", num_inference_steps=4, guidance_scale=0.0).images[0]
image.save("krea2_4step.png")
  • num_inference_steps=4 is the whole config. Pipeline applies Turbo's fixed timestep shift (μ = 1.15) and evaluates at σ = 1.0, 0.905, 0.760, 0.513 — exactly the four points the LoRA was trained on. Keep guidance_scale=0.0.
  • Strength: pipe.set_adapters(["4step"], adapter_weights=[0.75]). Stock Turbo for comparison: pipe.unload_lora_weights() + num_inference_steps=8.

ComfyUI

fileput it in
krea2_turbo_4step_rank_64_lora_comfyui.safetensorsComfyUI/models/loras/
krea2_turbo_bf16.safetensors (from Comfy-Org/Krea-2)ComfyUI/models/diffusion_models/
qwen3vl_4b_bf16.safetensors (same repo)ComfyUI/models/text_encoders/
qwen_image_vae.safetensors (same repo)ComfyUI/models/vae/

Load krea2_turbo_4step_lora_t2i.json. Full bf16, no quantisation, runs on CUDA / Apple Silicon / CPU unchanged.

Settings: steps 4, cfg 1.0, sampler euler / simple, LoRA strength 1.0.

⚙️ cfg 1.0, not 0.0. ComfyUI expresses "no CFG" as 1.0 (one forward pass); diffusers uses 0.0. Setting 0.0 in ComfyUI is not the same thing.


LoRA Strength

strengthwhat happens
below 1.0Correction partly applied — output between unassisted 4-step and full LoRA. 0.75 for when 1.0 is too textured/hard
1.0Trained point, recommended
1.0–1.5Extrapolation — surface detail denser, micro-contrast harder, coherent but stylised
above 1.5Not recommended — breaks into uniform speckle/noise over whole image

Reach for steps before strength: 1.0 at more steps is the dependable way to get more. Strength and step count trade against each other.

LoRA strength comparison


Hardware

Trained on single RTX 3090 (24 GB) to the first release; since then about a day on a single H200 and two more on the RTX 3090. Frozen base quantized weight-only to int8 (blockwise-64) — ~0.007 relative error, ~3% step time cost. Teacher trajectories rolled at same precision (targets permanent, error baked in).

Every bucket trained under full int8 up to 1440×1440. Large buckets fit via:

  • Checkpointed block inputs staged to pinned host memory (numerically exact)
  • Discriminator pass after generator backward (peaks don't overlap)
  • Trunk stopped at feature tap it actually reads

Released LoRA is bf16 applied to unquantized base.


Usage Notes

  • 🎯 Krea 2 Turbo only — trained against Turbo's weights and schedule
  • 🚫 Keep guidance at 0.0 (ComfyUI: cfg 1.0, not 0.0)
  • 📐 Keep μ = 1.15 — training targets anchored to that grid
  • 🔬 Training used int8 base; released LoRA is bf16 on unquantized base

Examples

Every sheet below: base model (8 steps), base at 4 steps without LoRA, base at 4 steps with LoRA — same seed throughout. Compare panels 2 vs 3 to isolate LoRA effect. NFE = steps (Turbo is CFG-free).

Portrait of a young woman with freckles and windswept auburn hair...

portrait comparison

Turbo 8 stepsTurbo 4 steps, no LoRATurbo 4 steps + LoRA
8 steps4 steps4 steps + LoRA

Kingfisher bursting out of water...

kingfisher comparison

Turbo 8 stepsTurbo 4 steps, no LoRATurbo 4 steps + LoRA
8 steps4 steps4 steps + LoRA

Rainy night city street with glowing neon signs...

neonstreet comparison

Turbo 8 stepsTurbo 4 steps, no LoRATurbo 4 steps + LoRA
8 steps4 steps4 steps + LoRA

(12 more examples in full version — see assets/ for all 15 prompts)


Resolution Sweeps

assets/resolution_sweeps/ — this LoRA at every trained resolution for all 15 test prompts (same prompts, seed, 4 steps, strength 1.0), 1824×1024 included. Nothing cherry-picked. This version's sweep was rendered in ComfyUI (seed 4242); the teacher's renders came from another renderer, so pose and framing can differ between the two.

_teacher-8step/ — official Krea 2 Turbo 8-step reference renders for same prompts/seeds/resolutions.

Layout:

assets/resolution_sweeps/
├── _teacher-8step/         8-step stock Turbo reference
│   ├── 512x512/
│   ├── 1024x1024/
│   └── ... (all 12 buckets)
└── 4step-LoRA/             Same tree, this LoRA at 4 steps (+ 1824x1024)

Two ways to read: down the sweep (does it hold across resolutions?) or against teacher (open same file in both folders).


Archive

Every published checkpoint and its resolution sweep under _archive/ — checkpoints/ and resolution_sweeps/, each under its number: chk00133000, this release, the first 'final' release chk00078000 (its sweep in chk78000-final/), and the earlier chk00060000, chk00042000, chk00026000, chk00019000, chk00014000, chk00010000, chk00006000, chk00005000 and chk00004000.


Detailed Model Card

The full write-up is in the Detailed Model Card:

  • How I got here — from stock Turbo to the first release, and its timeline
  • chk00133000 vs chk00078000 — what this release changed against the first one
  • Measured against the teacher — the first release's measurements: texture, the 4-step gap, the judged renders
  • This is not a Raw→Turbo diff — and using it on Raw
  • Inference with diffusers and ComfyUI — the settings explained
  • Performance — the time per model call and per render
  • LoRA strength — where the useful range is
  • File format and compatibility — the keys, runtime by runtime
  • Resolution sweeps — every trained size, every test prompt
  • Method — the progressive-distillation targets and the critic
  • What the LoRA touches — the 228 modules
  • Training data — the recorded trajectories and the photo crops
  • Resolutions — the share of training at each size
  • Hardware
  • Examples — all 15 prompts against the teacher, and why these prompts
  • What's next — the 2-step and 3-step LoRAs that followed

License

This adapter is a Derivative of Krea 2 Turbo under the Krea 2 Community License Agreement. Everything the agreement says about Krea 2 Turbo applies to this LoRA: Acceptable Use Policy, revenue threshold for commercial use, content-filtering duty for deployments.

Copy of agreement: LICENSE.pdf, required notice: NOTICE.txt. See krea.ai/krea-2-licensing.

Not an official Krea product, not endorsed by Krea. Base model is Krea's; adapter weights and everything else in this repo are mine.

内容来源:Hugging Face 模型卡

在 Hugging Face 查看