|
Download README.md from PedroMarinhoDev/NitroFusion2-ComfyUI: direct link, hf CLI and curl.
- Browser
- Download file 7.28 kB
-
https://huggingface.co/PedroMarinhoDev/NitroFusion2-ComfyUI/resolve/main/README.md
- Command line
-
hf download hf://PedroMarinhoDev/NitroFusion2-ComfyUI/README.md
-
curl -L -o README.md https://huggingface.co/PedroMarinhoDev/NitroFusion2-ComfyUI/resolve/main/README.md
7.28 kB
| license: apache-2.0 | |
| base_model: ChenDY/NitroFusion2 | |
| base_model_relation: quantized | |
| pipeline_tag: text-to-image | |
| tags: | |
| - comfyui | |
| - nitrofusion2 | |
| - z-image-turbo | |
| - one-step | |
| - few-step | |
| - int8 | |
| - w6a8 | |
| - w4a8 | |
| - gptq | |
| - quantized | |
| # NitroFusion2 for ComfyUI: int8, W6A8, W4A8 | |
| **[NitroFusion2](https://huggingface.co/ChenDY/NitroFusion2)** (Dar-Yen Chen and Yi-Zhe Song), the 1–2 step | |
| distillation of Z-Image-Turbo, in three smaller formats that run in **stock ComfyUI**: no custom nodes, the normal | |
| **Load Diffusion Model** node, and ComfyUI's own int8 / W6A8 / W4A8 kernels. They are about **1.7× faster** per step | |
| than bf16 on an RTX 4090 and half to a quarter of its size. All files are made from the publisher's | |
| `nf2-bf16.safetensors` (sha256 `a1e11422…`). | |
| **Use the GPTQ files.** They have the same size, layout and speed as the plain conversions and are closer to bf16 in | |
| every format. For 2 steps, each GPTQ file has a **step-1 file** (the publisher's de-distillation LoRA merged in before | |
| quantizing), which cuts the 2-step error by another 21–33%. | |
| | Format | Size | 1 step, 4090 | Error, 1 step | Error, 2 steps with the LoRA | Error, 2 steps with the step-1 file | | |
| |---|---|---|---|---|---| | |
| | bf16 ([original](https://huggingface.co/ChenDY/NitroFusion2/blob/main/nf2-bf16.safetensors)) | 12.31 GB | 0.50 s | 0 | 0 | – | | |
| | **[int8 GPTQ](diffusion_models/nitrofusion2_int8_convrot_gptq.safetensors)** | 6.18 GB | 0.29 s | 11.3% | 8.7% | **6.9%** | | |
| | **[W6A8 GPTQ](diffusion_models/nitrofusion2_w6a8_gptq.safetensors)** | 5.02 GB | 0.30 s | 13.8% | 12.9% | **8.6%** | | |
| | **[W4A8 GPTQ](diffusion_models/nitrofusion2_w4a8_gptq.safetensors)** | 3.49 GB | 0.29 s | 25.8% | 24.0% | **18.5%** | | |
| | [int8](diffusion_models/nitrofusion2_int8_convrot.safetensors), plain | 6.18 GB | 0.29 s | 13.4% | 9.3% | – | | |
| | [W6A8](diffusion_models/nitrofusion2_w6a8.safetensors), plain | 5.02 GB | 0.30 s | 17.5% | 14.0% | – | | |
| | [W4A8](diffusion_models/nitrofusion2_w4a8.safetensors), plain | 3.49 GB | 0.29 s | 33.6% | 26.0% | – | | |
| Files, in `diffusion_models/`: | |
| - `nitrofusion2_int8_convrot_gptq.safetensors`, `nitrofusion2_w6a8_gptq.safetensors`, | |
| `nitrofusion2_w4a8_gptq.safetensors`: the GPTQ files, for 1 step and for step 2 of 2 | |
| - `nitrofusion2_int8_convrot_gptq_step1.safetensors`, `nitrofusion2_w6a8_gptq_step1.safetensors`, | |
| `nitrofusion2_w4a8_gptq_step1.safetensors`: their step-1 files (same size each), for step 1 of 2 | |
| - `nitrofusion2_int8_convrot.safetensors`, `nitrofusion2_w6a8.safetensors`, `nitrofusion2_w4a8.safetensors`: the | |
| plain conversions published first | |
| Time is the sampler at 1024×1024 (ComfyUI master `fb2b26fda`, comfy-kitchen 0.2.41), measured on the plain files; | |
| the GPTQ files use the same layout and kernels. **Error** is the relative error of the model's prediction against bf16 | |
| for the same input: 12 prompts × 4 noise samples at 1024×1024, the 2-step figures averaged over both steps. A one-step | |
| prediction from pure noise reacts strongly to small weight changes, and nearly all of that error is fine texture: the | |
| pictures keep bf16's composition, faces and text (below). Use the numbers to rank the files against each other, not | |
| to compare with other models. | |
| ## Use | |
| 1. Put the files in `ComfyUI/models/diffusion_models/`: one GPTQ file for 1 step; the same file and its `_step1` file | |
| for 2 steps. | |
| 2. The text encoder and VAE are Z-Image-Turbo's: [`qwen_3_4b.safetensors`](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors) | |
| in `text_encoders/` and [`ae.safetensors`](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors) in `vae/`. | |
| 3. Open a workflow from `example_workflows/` (int8 selected; pick another file in the subgraph's loaders): | |
| - [1 step](example_workflows/nitrofusion2_1step_gptq.json): the publisher's 1-step workflow. | |
| - [2 steps with a step-1 file](example_workflows/nitrofusion2_2step_gptq_step1.json): the publisher's 2-step | |
| workflow with a second **Load Diffusion Model** for step 1 in place of the LoRA. No LoRA file is needed. | |
| Settings as published: euler / simple, CFG 1; 1 step at shift 3; 2 steps at shift 6. | |
| **Why a step-1 file.** The official 2-step workflow applies the de-distillation LoRA at 0.5 on step 1. On a quantized | |
| file ComfyUI re-quantizes the LoRA-patched weights with fresh scales and random rounding, so step 1 loses the | |
| calibration (the plain and GPTQ files end up nearly equal there). The step-1 file has the LoRA merged in before | |
| quantizing and is calibrated on step 1 itself. Both files are loaded during a 2-step run (W4A8: 7.9 GB VRAM peak). | |
| The LoRA route still works with every file: the publisher's | |
| [2-step workflow](example_workflows/nitrofusion2_2step_quantized.json) with | |
| [`nf2-dedistill-lora.safetensors`](https://huggingface.co/ChenDY/NitroFusion2/resolve/main/nf2-dedistill-lora.safetensors) | |
| in `loras/`. The [plain 1-step workflow](example_workflows/nitrofusion2_1step_quantized.json) is there too. | |
| ## Pictures | |
| One step with the GPTQ files, seed 42, 1024×1024, the same prompt and noise for every file (top: bf16, int8; bottom: | |
| W6A8, W4A8). The plain files' version of each sheet is in `assets/` (the same name without `_gptq`). | |
|  | |
|  | |
|  | |
|  | |
| ## How they were made | |
| ComfyUI's own quantization formats (comfy-kitchen): | |
| - **What is quantized:** all 202 linear layers of the 30 main blocks and the 4 refiner blocks (attention qkv and out, | |
| the three feed-forward layers, adaLN): 6.142B of the model's 6.155B weights. Embedders, norms and the final layer | |
| stay bf16. | |
| - **int8:** ConvRot (block Hadamard rotation of 256), one scale per row, 8-bit activations. | |
| - **W6A8 / W4A8:** 6-bit / 4-bit weights in the rotated basis with an FP8 scale per group of 16, 8-bit activations. | |
| - **Plain files:** comfy-kitchen's own conversion, no calibration. | |
| - **GPTQ files:** the rotation and rounding in fp32, a search over each group's FP8 scale, then GPTQ in the rotated | |
| basis (act order, damping 0.01), every weight snapped to the exact value the kernel decodes. Calibration: 48 prompts | |
| that are not among the evaluation prompts, at about one megapixel, with every model call of both official modes. | |
| - **Step-1 files:** the de-distillation LoRA merged into bf16 at 0.5 with ComfyUI's own patch code (the merged model | |
| matches bf16 + LoRA exactly), then the same GPTQ on statistics of step 1 alone. | |
| ## License and credit | |
| Apache-2.0, as the original: [LICENSE](LICENSE), changes listed in [NOTICE](NOTICE). The model is NitroFusion2 by | |
| Dar-Yen Chen and Yi-Zhe Song, built on [Z-Image-Turbo](https://github.com/Tongyi-MAI/Z-Image) by Tongyi-MAI; the | |
| workflows are the publisher's; the step-1 files contain the publisher's de-distillation LoRA, merged. Paper: | |
| [arXiv 2611.05648](https://arxiv.org/abs/2611.05648). | |
| ```bib | |
| @article{chen2026nitrofusion2, | |
| title={NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers}, | |
| author={Chen, Dar-Yen and Song, Yi-Zhe}, | |
| journal={arXiv preprint arXiv:2611.05648}, | |
| year={2026} | |
| } | |
| ``` | |