---
title: krea2-turbo-sda
canonical_url: "https://www.modelscope.cn/models/F16/krea2-turbo-sda"
md_url: "https://www.modelscope.cn/models/F16/krea2-turbo-sda.md"
repository: F16/krea2-turbo-sda
last_updated: 2026-08-31
license: other
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
base_model:
  - krea/Krea-2-Turbo
base_model_relation: adapter
parameters: 234.6M
tensor_type:
  - F32
library_name:
  - pytorch
  - lora
  - diffusers
  - safetensors
frameworks:
  - pytorch
supports_inference: txt2img
downloads: 113
stars: 3
tags:
  - lora
  - krea2
  - diffusers
  - diversity
  - sda
  - text-to-image
---

# krea2-turbo-sda

> krea2-turbo-sda - F16 在 ModelScope 开源的模型。Krea 2 Turbo — SDA Diversity LoRA (v1.0)

F16/krea2-turbo-sda 是 ModelScope 魔搭社区上的 234.6M 参数text-to-image-synthesis模型，采用 other 许可，基于 krea/Krea-2-Turbo 构建，并支持在线推理（txt2img）。

- **Repository**: F16/krea2-turbo-sda
- **License**: other
- **Tasks**: text-to-image-synthesis
- **Parameters**: 234.6M
- **Base model**: krea/Krea-2-Turbo
- **Online inference**: txt2img
- **Tags**: lora, krea2, diffusers, diversity, sda, text-to-image
- **Downloads**: 113
- **Stars**: 3
- **Last updated**: 2026-08-31

Source: https://www.modelscope.cn/models/F16/krea2-turbo-sda

---

# Krea 2 Turbo — SDA Diversity LoRA (v1.0)

[中文版 Model Card](README.zh.md)

A rank-32 LoRA for [Krea 2 Turbo](https://huggingface.co/krea/Krea-2-Turbo) that **restores the sampling diversity the Turbo distillation removed**, without degrading image quality or prompt adherence. Trained with **SDA (Semantic Directional Alignment)** — a teacher-guided diversity alignment loss — wrapped in **Forward XM best-of-5** candidate exploration, on a single high-noise sigma node (σ = 0.9567).

**Same prompt, 16 different seeds** — baseline vs +SDA LoRA (gate=2):

*"a cat sitting on a windowsill"* — the baseline regenerates the same tabby-and-white cat 16 times; the LoRA varies fur patterns, lighting, seasons and window settings:

| Baseline (Turbo, no LoRA) | + SDA LoRA (gate=2) |
|---|---|
| ![baseline — cat](images/montage_baseline_cat.png) | ![+SDA LoRA — cat](images/montage_lora_cat.png) |

*"a still life with fruit on a table"* — one pineapple-centric template vs varied compositions, props and backgrounds:

| Baseline (Turbo, no LoRA) | + SDA LoRA (gate=2) |
|---|---|
| ![baseline — still life](images/montage_baseline_still_life.png) | ![+SDA LoRA — still life](images/montage_lora_still_life.png) |

*"a red sports car parked in an alley"* — the same front-view coupe 16× vs different models, angles and environments:

| Baseline (Turbo, no LoRA) | + SDA LoRA (gate=2) |
|---|---|
| ![baseline — car](images/montage_baseline_car.png) | ![+SDA LoRA — car](images/montage_lora_car.png) |

*"a photo of a woman"* — identical studio headshot framing 16× vs varied scenes, ages, hair, and even illustration styles:

| Baseline (Turbo, no LoRA) | + SDA LoRA (gate=2) |
|---|---|
| ![baseline — woman](images/montage_baseline_woman.png) | ![+SDA LoRA — woman](images/montage_lora_woman.png) |

## Measured effect

Evaluation panel: 10 prompts × 16 seeds, paired against the shared adapter-off baseline:

| Metric | Baseline | This LoRA (gate=2) | Δ |
|---|---|---|---|
| Pairwise CLIP cosine distance ↑ | 0.0296 | **0.0548** | **+85%** |
| Pairwise L2 distance ↑ | 0.2281 | **0.3167** | **+39%** |
| Pixel std ↑ | 0.1584 | **0.2117** | **+34%** |
| HPSv2.1 quality ↑ | 0.2990 | 0.2987 | −0.1% (parity) |
| High-frequency energy ratio | 1.000 | 1.206 | slightly elevated — no blur tax |

Prompt adherence (24 multi-constraint prompts × 8 seeds, constraint-hit rate and full-prompt score) is statistically indistinguishable from the baseline.

## How SDA works

![SDA principle](images/sda_principle.png)

**Semantic Directional Alignment** treats diversity collapse as a *direction* problem. For one training image x0 we draw two noises (z1, z2) and noisify both to σ = 0.9567 — the highest learnable step of the 8-step Turbo schedule, where composition is decided. The frozen teacher (Krea 2 RAW, the non-distilled parent) and the student (Turbo + LoRA) each predict x0 for both noises; both predictions are decoded and embedded by a frozen CLIP stack. The teacher's feature delta **ΔT** records *which direction in perceptual space this noise swap should move the image*; the loss `L_div = 1 − cos(ΔS, ΔT)` teaches the student's delta **ΔS** to point the same way instead of collapsing all noises onto one template. An SFT self-anchor keeps the student's own trajectory stable.

**Forward XM best-of-5** adds exploration on top: each step draws K = 5 candidate noises, scores all of them without gradients, and backpropagates only through the candidate whose student delta is best aligned — every step trains on the most informative pair, giving a measured ~3× learning-speed gain.

## ⚠️ Inference gating is mandatory (gate = 2)

This LoRA is trained at a single high-noise node (σ = 0.9567, the second step of the 8-step Turbo schedule). It must only be active for the **first 2 of the 8 denoise steps**, then switched off:

| Gate (active steps of 8) | Result |
|---|---|
| 1 | Works, but leaves the trained step unassisted (−20% diversity vs gate=2) |
| **2** | **The intended configuration — all numbers above** |
| 8 (always on) | ❌ Quality collapse: HF energy 2.2× baseline *or* blur, −10% HPS |

The LoRA changes the *composition* decided in the first two high-noise steps; the remaining steps are pure detail refinement where the adapter only does damage.

## Usage with 🤗 diffusers

`Krea2Pipeline` requires a recent diffusers (merged after `0.39.0.dev0` — install from source if your release is older). The gate is a one-line step callback:

```python
import torch
from diffusers import Krea2Pipeline

pipe = Krea2Pipeline.from_pretrained("krea/Krea-2-Turbo", torch_dtype=torch.bfloat16).to("cuda")
pipe.load_lora_weights(".", weight_name="krea2_turbo_sda_v1.0_diffusers.safetensors")

def gate(pipe, step_index, timestep, callback_kwargs):
    if step_index == 1:   # step 2 (0-based) just finished -> switch the LoRA off
        pipe.disable_lora()
    return callback_kwargs

image = pipe(
    "a still life with fruit on a table",
    num_inference_steps=8,
    guidance_scale=1.0,
    callback_on_step_end=gate,
).images[0]
```

**Weight format.** The repo ships both key formats: `krea2_turbo_sda_v1.0_comfy.safetensors` (ComfyUI format) and `krea2_turbo_sda_v1.0_diffusers.safetensors` (diffusers-style `diffusion_model.blocks.*.lora_A/B.weight` keys — the one used in the snippet above).

### ComfyUI

Stock ComfyUI applies LoRAs on every step, which will hurt quality (see gate=8 above). Use a per-step LoRA scheduling node (hooks/scheduling custom nodes) to disable the LoRA after step 2, or run with diffusers as shown.

## Training details

| | |
|---|---|
| Base (student) | Krea 2 Turbo (`krea/Krea-2-Turbo`) |
| Teacher | Krea 2 RAW (`krea/Krea-2-Raw`), non-distilled, single forward, no CFG |
| Method | SDA diversity alignment (cosine of student/teacher x0-prediction deltas in CLIP ViT-H/14 feature space) + Forward XM best-of-5 (stat=min) + SFT self-anchor (Huber 0.08); no HF anchor (this configuration trains spectrally neutral without it) |
| Sigma nodes | 8-node Turbo schedule, **only σ = 0.9567 active** (the highest learnable node; σ = 1.0 receives pure-noise input and is untrainable) |
| Dataset | 109 images (`krea2bpr`), 1024×1024 buckets |
| LoRA | `networks.lora_krea2`, rank 32, alpha 32 |
| Optimization | AdamW, lr 2.5e-4 constant, bf16 mixed precision, gradient checkpointing, 200 steps, seed 42 (~1.9 h at ≈34 s/step on a 48 GB GPU) |
| Framework | [musubi-tuner](https://github.com/kohya-ss/musubi-tuner) (SDA/XM fork) |

## Intended use & limitations

- Research artifact. Best for workflows that need *varied* samples per prompt (exploration, data augmentation, preference-pair mining).
- Diversity gain is per-prompt across seeds; it does not change prompt semantics.
- Restoring diversity lowers the model's stability and may make anatomy problems (e.g. limbs) more likely.
- All evaluation numbers come from a fixed panel at 1024×1024, 8 steps, guidance 1.0, shift μ = 1.15.
- Derived from Krea 2 — usage is subject to the **Krea 2 Community License** (see the [base model repo](https://huggingface.co/krea/Krea-2-Turbo)).

## Acknowledgments

- **[Krea AI](https://huggingface.co/krea)** — for open-sourcing Krea 2; the Turbo checkpoint is the student/base model and the RAW checkpoint serves as the diversity teacher.
- **[musubi-tuner](https://github.com/kohya-ss/musubi-tuner)** (kohya-ss and contributors) — the training framework this work is built on.
- **Explorative Modeling (XM)** — Gladstone, Ji & Du, 2026 ([arXiv:2607.27372](https://arxiv.org/abs/2607.27372)); the best-of-K candidate exploration wrapped around our loss.
- **Perceptual Flow Matching** — Zhao et al., 2026 ([arXiv:2607.03524](https://arxiv.org/abs/2607.03524)); inspiration for perceptual-space supervision.
- **[DiffusionOPSD](https://github.com/worldbench/DiffusionOPSD)** (ByteDance / worldbench, 2026) — on-policy self-distillation reference point for this line of work.
- **[z-image-turbo-sda](https://huggingface.co/F16/z-image-turbo-sda)** (F16, 2026) — the original SDA LoRA lineage on Z-Image-Turbo that this port follows.
- Core techniques and metrics: [LoRA](https://arxiv.org/abs/2106.09685) (Hu et al., 2022), [CLIP](https://arxiv.org/abs/2103.00020) (Radford et al., 2021), [HPSv2](https://arxiv.org/abs/2306.09341) (Wu et al., 2023).
