--- license: apache-2.0 base_model: krea/Krea-2-Raw tags: - comfyui - quantization - int4 - w4a4 - convrot - krea2 --- # Krea-2 Raw — INT4 tensorwise W4A4 (+ConvRot, mixed int8 fallback) **W4A4** quantization of [Krea-2 Raw](https://huggingface.co/krea/Krea-2-Raw) (bf16 source: [Comfy-Org/Krea-2](https://huggingface.co/Comfy-Org/Krea-2)): packed signed INT4 weights with group-256 regular-Hadamard **ConvRot** rotation (arXiv [2512.03673](https://arxiv.org/abs/2512.03673)), activations rotated online and dynamically quantized inside the kernel. Calibration-free. Mixed recipe: 224 block Linears = **140 INT4 + 84 int8_tensorwise fallback** (`attn.wv`/`attn.wo` — the ConvRot paper's sensitive projections — plus `attn.gate`, modulation-class). The shared modulation projector `tproj` and the text-fusion transformer stay bf16. ## Samples ![BF16 vs INT4 comparison](samples_krea2_raw.jpg) Same seed/prompt, BF16 top vs INT4-mixed bottom. ## ⚠️ Runtime requirement Needs the `int4_tensorwise` runtime, which is **not in any released ComfyUI / comfy-kitchen yet**. In-flight: [comfy-kitchen PR #63](https://github.com/Comfy-Org/comfy-kitchen/pull/63) (kernels + layout) and the [ComfyUI loader branch](https://github.com/HK416-TYPED/ComfyUI/tree/feat/int4-tensorwise-loader) — to try this checkpoint today, run that ComfyUI branch with the PR's comfy-kitchen branch on `PYTHONPATH` (or installed). On a stock release it fails with a clear "format not available" error. ## Measurements (NVIDIA L4 / SM 8.9, 1024x1024, 52 steps, cfg 3.5, 3 prompts) | checkpoint | per image | | --- | --- | | **this model (int4 mixed)** | **207 s** | | bf16 | 252 s | Weights: **9.25 GB** vs 28 GB bf16 (−67%) — fits a 24 GB card with headroom where bf16 needs weight streaming. PSNR vs bf16 (same seed): 22.1 dB (min 19.6, max 24.2). ## Reproduce ```bash comfy-quants export-model-int4-tensorwise \ --config configs/krea2_int4_tensorwise_mixed.yaml \ --source krea2_raw_bf16.safetensors \ --out krea2_raw_int4_tensorwise_mixed.safetensors ``` Produced by [comfy-quants](https://github.com/Comfy-Org/comfy-quants) (branch `feat/int4-tensorwise`). Use with `text_encoders/qwen3vl_4b` + `vae/qwen_image_vae` from Comfy-Org/Krea-2.