Views
No views yet
Krea2Pipeline.
uint4-static-transformer-only.transformer.
Tokenizer, scheduler, and non-selected pipeline components are copied from the original Diffusers pipeline.Qwen3VLModel text-encoder weights. This release therefore keeps the text encoder loadable in bf16 and quantizes the Krea transformer only.Krea2Pipelinefalse| Model | Load | First gen | Hot mean | Hot max | Load GPU peak | Gen GPU peak | Torch peak |
|---|---|---|---|---|---|---|---|
| original | 8.442 s | 163.733 s | 163.403 s | 163.422 s | 33487 MB | 44154 MB | 42717.1767578125 MB |
| uint4-static-transformer-only | 5.954 s | 160.935 s | 157.422 s | 157.457 s | 16041 MB | 26788 MB | 25272.396484375 MB |
benchmark/*.csv and benchmark/*.jsonl. The combined benchmark summary is in benchmark/summary.json.pip install -U git+https://github.com/huggingface/diffusers.git transformers accelerate safetensors huggingface_hub sdnq1import torch
2from diffusers import Krea2Pipeline
3from sdnq.loader import apply_sdnq_options_to_model
4
5repo_id = "WaveCut/Krea-2-Raw-SDNQ-uint4"
6device = "cuda"
7
8pipe = Krea2Pipeline.from_pretrained(
9 repo_id,
10 torch_dtype=torch.bfloat16,
11 is_distilled=False,
12)
13
14for name in ['transformer']:
15 module = getattr(pipe, name, None)
16 if module is not None:
17 setattr(
18 pipe,
19 name,
20 apply_sdnq_options_to_model(module, dtype=torch.bfloat16, use_quantized_matmul=True),
21 )
22
23pipe.to(device)
24image = pipe(
25 prompt="A clean technical poster with readable labels",
26 height=1024,
27 width=1024,
28 num_inference_steps=52,
29 guidance_scale=3.5,
30 generator=torch.Generator(device=device).manual_seed(0),
31).images[0]
32image.save("krea2-sdnq.png")1{
2 "dynamic_loss_threshold": null,
3 "modules": [
4 "transformer"
5 ],
6 "name": "uint4-static-transformer-only",
7 "quant_conv": false,
8 "quant_embedding": false,
9 "svd_rank": 32,
10 "svd_steps": 32,
11 "use_dynamic_quantization": false,
12 "use_svd": false,
13 "weights_dtype": "uint4"
14}sdnq_post_load_quant only to the listed pipeline components, and saving with save_sdnq_model(..., is_pipeline=True).krea/Krea-2-Raw. Upstream license material copied during packaging: LICENSE.pdf. Review the upstream Krea model card and license before use or redistribution.