Instructions to use lvladikov/Krea2-Turbo-Distill-2step-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lvladikov/Krea2-Turbo-Distill-2step-LoRA with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("krea/Krea-2-Turbo", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lvladikov/Krea2-Turbo-Distill-2step-LoRA") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Upload README.md
Browse files
README.md
CHANGED
|
@@ -33,6 +33,9 @@ pipeline_tag: text-to-image
|
|
| 33 |
> within easy reach. That makes the adapter a stepping stone to high-resolution renders as well as a fast preview. Past
|
| 34 |
> 2048Γ2048, stock Krea 2 itself begins to duplicate subjects β a property of the base model, with or without this
|
| 35 |
> adapter.
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
A LoRA for **[Krea 2 Turbo](https://huggingface.co/krea/Krea-2-Turbo)** that takes the model from its usual **8 steps
|
| 38 |
down to 2** β Turbo's own weights and its own two sigmas, guidance 0.0, a quarter of the denoising passes β aiming at
|
|
@@ -85,6 +88,7 @@ comparisons with the 8-step teacher are in [Examples](#examples)._
|
|
| 85 |
| `krea2_turbo_2step_rank_64_lora.safetensors` | the LoRA in diffusers key format β see [Inference with diffusers](#inference-with-diffusers); also for MLX or anything that reads safetensors |
|
| 86 |
| `krea2_turbo_2step_rank_64_lora_comfyui.safetensors` | the same weights under ComfyUI's key names β see [ComfyUI](#comfyui) |
|
| 87 |
| `krea2_turbo_2step_lora_t2i.json` | a ready ComfyUI workflow, stock nodes only |
|
|
|
|
| 88 |
| [`krea2_turbo_2step_rank_64_lora_checkpoint_info.md`](krea2_turbo_2step_rank_64_lora_checkpoint_info.md) | **the quick place to check which checkpoint the two weight files are based on.** The pair above keeps its names and is updated in place as better checkpoints ship; this file always says what they are today. Every published checkpoint also sits in [`_archive/checkpoints/`](_archive/checkpoints) under its number |
|
| 89 |
| `LICENSE.pdf` | the Krea 2 Community License Agreement, which covers this adapter β see [License](#license) |
|
| 90 |
| `NOTICE.txt` | the attribution notice the license requires of a derivative |
|
|
@@ -284,6 +288,38 @@ not the teacher's render of it β see [Known issues](#known-issues).
|
|
| 284 |
The 2 sampling sigmas are Turbo's own deployment grid: `[1.0, 0.7595]` β the first and the middle
|
| 285 |
of the 4-step grid, so the model is evaluated at two points it already knows.
|
| 286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
## Inference with diffusers
|
| 288 |
|
| 289 |
Krea 2 Turbo has a native diffusers pipeline, `Krea2Pipeline`, in diffusers from source β the same
|
|
|
|
| 33 |
> within easy reach. That makes the adapter a stepping stone to high-resolution renders as well as a fast preview. Past
|
| 34 |
> 2048Γ2048, stock Krea 2 itself begins to duplicate subjects β a property of the base model, with or without this
|
| 35 |
> adapter.
|
| 36 |
+
>
|
| 37 |
+
> π **Also compatible with Krea 2 Raw.** With some prompts it works very well on Krea 2 Raw too, at 7 steps+ β see
|
| 38 |
+
> [Using it on Raw](#using-it-on-raw) and the [dedicated experiment](assets/resolution_sweeps/raw-LoRA-7steps-experiment/README.md).
|
| 39 |
|
| 40 |
A LoRA for **[Krea 2 Turbo](https://huggingface.co/krea/Krea-2-Turbo)** that takes the model from its usual **8 steps
|
| 41 |
down to 2** β Turbo's own weights and its own two sigmas, guidance 0.0, a quarter of the denoising passes β aiming at
|
|
|
|
| 88 |
| `krea2_turbo_2step_rank_64_lora.safetensors` | the LoRA in diffusers key format β see [Inference with diffusers](#inference-with-diffusers); also for MLX or anything that reads safetensors |
|
| 89 |
| `krea2_turbo_2step_rank_64_lora_comfyui.safetensors` | the same weights under ComfyUI's key names β see [ComfyUI](#comfyui) |
|
| 90 |
| `krea2_turbo_2step_lora_t2i.json` | a ready ComfyUI workflow, stock nodes only |
|
| 91 |
+
| `krea2_raw_7step_lora_experiment_t2i.json` | the Krea 2 Raw 7-step experiment's ComfyUI workflow ([Using it on Raw](#using-it-on-raw)) |
|
| 92 |
| [`krea2_turbo_2step_rank_64_lora_checkpoint_info.md`](krea2_turbo_2step_rank_64_lora_checkpoint_info.md) | **the quick place to check which checkpoint the two weight files are based on.** The pair above keeps its names and is updated in place as better checkpoints ship; this file always says what they are today. Every published checkpoint also sits in [`_archive/checkpoints/`](_archive/checkpoints) under its number |
|
| 93 |
| `LICENSE.pdf` | the Krea 2 Community License Agreement, which covers this adapter β see [License](#license) |
|
| 94 |
| `NOTICE.txt` | the attribution notice the license requires of a derivative |
|
|
|
|
| 288 |
The 2 sampling sigmas are Turbo's own deployment grid: `[1.0, 0.7595]` β the first and the middle
|
| 289 |
of the 4-step grid, so the model is evaluated at two points it already knows.
|
| 290 |
|
| 291 |
+
## Using it on Raw
|
| 292 |
+
|
| 293 |
+
**This LoRA is trained on Krea 2 Turbo, against Turbo as its own teacher, and for Turbo.** Every layer it targets also
|
| 294 |
+
exists in Krea 2 Raw, so it will load there without complaint β but that is a side effect of the shared architecture, not
|
| 295 |
+
a supported mode.
|
| 296 |
+
|
| 297 |
+
It still does something useful there. On Turbo the adapter runs a quarter of the teacher's steps β 2 of its 8 β so on
|
| 298 |
+
Raw the same quarter of its usual 28 steps, **7**, is the natural place to start, and for most prompts it is a good one.
|
| 299 |
+
For a quick preview, some prompts hold together at even 4β5 steps β not as good as 7 steps or more, but not broken
|
| 300 |
+
either. Keep the guidance **light**: `guidance_scale=1.0` in diffusers, which is **cfg 2.0 in ComfyUI**. Heavier
|
| 301 |
+
guidance, such as 4.5, crushes most images into near-black frames at 7 steps, and with no guidance at all the pictures
|
| 302 |
+
come out flat.
|
| 303 |
+
|
| 304 |
+
[](assets/resolution_sweeps/raw-LoRA-7steps-experiment/1024x768/portrait.jpg)
|
| 305 |
+
[](assets/resolution_sweeps/raw-LoRA-7steps-experiment/1024x768/pizza.jpg)
|
| 306 |
+
|
| 307 |
+
_Krea 2 Raw + this LoRA, 7 steps, light guidance, empty negative prompt, seed 4242, 1024Γ768. Click for full size._
|
| 308 |
+
|
| 309 |
+
Results are **mixed and subject-dependent**. Some prompts come through as finished pictures; others do not β an
|
| 310 |
+
underexposed night street, a cityscape with less detail than Turbo gives at 2 steps β and for those a few more steps may
|
| 311 |
+
help. The full experiment, with all 15 test prompts at 1024Γ768, what worked and what did not, and a ComfyUI workflow,
|
| 312 |
+
is in its [dedicated README](assets/resolution_sweeps/raw-LoRA-7steps-experiment/README.md), in
|
| 313 |
+
[`assets/resolution_sweeps/raw-LoRA-7steps-experiment/`](assets/resolution_sweeps/raw-LoRA-7steps-experiment). The same
|
| 314 |
+
prompts on stock Raw at the same 7 steps and light guidance, without the LoRA, are in
|
| 315 |
+
[`_raw-base-NO-LoRA-7step-cfg1/`](assets/resolution_sweeps/raw-LoRA-7steps-experiment/_raw-base-NO-LoRA-7step-cfg1).
|
| 316 |
+
|
| 317 |
+
[](assets/resolution_sweeps/raw-LoRA-7steps-experiment/workflow_preview_raw.jpg)
|
| 318 |
+
|
| 319 |
+
_The experiment's ComfyUI workflow,
|
| 320 |
+
[`krea2_raw_7step_lora_experiment_t2i.json`](krea2_raw_7step_lora_experiment_t2i.json): Krea 2 Raw + this LoRA, 7 steps,
|
| 321 |
+
cfg 2.0. Click for full size._
|
| 322 |
+
|
| 323 |
## Inference with diffusers
|
| 324 |
|
| 325 |
Krea 2 Turbo has a native diffusers pipeline, `Krea2Pipeline`, in diffusers from source β the same
|