--- license: apache-2.0 base_model: Qwen/Qwen-Image-Edit-2511 tags: - comfyui - quantization - int4 - w4a4 - convrot - qwen-image-edit --- # Qwen-Image-Edit-2511 — INT4 tensorwise W4A4 (+ConvRot, mixed int8 fallback) **W4A4** quantization of [Qwen-Image-Edit-2511](https://huggingface.co/Qwen/Qwen-Image-Edit-2511): weights in packed signed INT4 (2/byte) with group-256 regular-Hadamard **ConvRot** rotation (arXiv [2512.03673](https://arxiv.org/abs/2512.03673)), activations rotated online and dynamically quantized to INT4 inside the kernel. Calibration-free. **Mixed-precision quality recipe** (validated end-to-end): 480 layers INT4 + 359 sensitive layers (attention value/output projections **and the adaLN modulation Linears — critical**) stored as stock `int8_tensorwise` in the same checkpoint. The `__index_timestep_zero__` sentinel is included (2511 reference-image mode). ## Samples ![BF16 vs INT4 comparison](samples_qwen.jpg) Same seed/prompt edit samples, 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 Quality (L4, 20-step edit sample, mean over 4 prompts, PSNR vs bf16-sentinel): | checkpoint | size | PSNR | | --- | --- | --- | | int8_tensorwise | 20.0 GB | 30.05 dB | | **this model (int4 mixed)** | **14.9 GB** | 26.58 dB | | bf16 | 40 GB | — | Speed (NVIDIA L4 / SM 8.9 — native INT4 tensor cores; 20-step image, steady state, same-session comparison, fused ConvRot + rank-one s4 MMA kernel): | path | s/image | | --- | --- | | **this model (int4 mixed)** | **87.1** | | int8_tensorwise (CUDA kernels) | 93.1 | | bf16 | 114 | ## Reproduce ```bash comfy-quants export-model-int4-tensorwise \ --config configs/qwen_image_edit_2511_int4_tensorwise_mixed.yaml \ --source /path/to/Qwen-Image-Edit-2511/transformer \ --out qwen_edit_2511_int4tw_mixed.safetensors ``` Produced by [comfy-quants](https://github.com/Comfy-Org/comfy-quants) (branch `feat/int4-tensorwise`). A higher-quality variant (+MLP down-projections at int8, 17.2 GB / 27.19 dB) is one config edit away — see the config comments.