Instructions to use ChenDY/NitroFusion2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ChenDY/NitroFusion2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ChenDY/NitroFusion2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers
π₯ News
- [2026-11-03] NitroFusion2 is released! The code is on GitHub, with a ComfyUI workflow, diffusers code and an online demo.
β¨ NitroFusion2
NitroFusion2 is a 1β2 step text-to-image model built on Z-Image-Turbo. It moves the adversarial loss onto the text stream of the MMDiT. At one step it renders sharp text and fine detail.

ComfyUI
- 1 step:
workflows/nitrofusion2_1step.json - 2 steps:
workflows/nitrofusion2_2step.json
For two steps, we recommend our de-distillation LoRA, which takes NitroFusion2 back to Z-Image-Turbo, to eliminate some artifacts. The workflow applies it at scale 0.5 on the first step, then runs NitroFusion2 alone on the second step.
We also release GGUF tiers from nf2-Q2_K_4XS.gguf (2.0 GB) to nf2-Q8_0.gguf (7.2 GB).
GGUF workflows: 1 step, 2 steps.
Diffusers
Run inference.py (1β4 steps):
python inference.py --prompt "a cat holding a sign that says hello world" --steps 2 --out cat.png
Or in Python:
import torch
from diffusers import FlowMatchEulerDiscreteScheduler, ZImagePipeline, ZImageTransformer2DModel
transformer = ZImageTransformer2DModel.from_pretrained(
"ChenDY/NitroFusion2",
subfolder="transformer",
torch_dtype=torch.bfloat16,
)
pipe = ZImagePipeline.from_pretrained(
"Tongyi-MAI/Z-Image-Turbo",
transformer=transformer,
torch_dtype=torch.bfloat16,
)
pipe.load_lora_weights("ChenDY/NitroFusion2", weight_name="nf2-dedistill-lora.safetensors", adapter_name="dedistill")
pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(pipe.scheduler.config, shift=6.0)
pipe.enable_model_cpu_offload()
pipe.set_adapters("dedistill", 0.5)
def lora_off(pipe, step, timestep, callback_kwargs):
pipe.set_adapters("dedistill", 0.0)
return callback_kwargs
prompt = "Latina female with thick wavy hair, harbor boats and pastel houses behind. Breezy seaside light, warm tones, cinematic close-up."
image = pipe(
prompt=prompt,
height=1024,
width=1024,
num_inference_steps=2,
sigmas=[1.0, 0.5],
guidance_scale=0.0,
generator=torch.Generator("cuda").manual_seed(42),
callback_on_step_end=lora_off,
).images[0]
image.save("example.png")
Method
If this paper has one message, it is this: in an MMDiT, the text stream is no longer only conditioning. Once it reads the image, it becomes a discriminative representation, opening a new direction for adversarial diffusion distillation and allowing that discrimination to be steered toward specific aspects.
In an MMDiT, text and image tokens move through the same attention layers, so by the middle of the network the text tokens have already read the image. They hold a compact summary of what was generated, organised by what the prompt asked for. NitroFusion2 puts an adversarial loss there, on that summary, alongside the conventional one on the image features. Because the summary stays tied to the text condition, changing the condition changes what it reports β so one frozen discriminator can be asked a different question simply by swapping the cue. A typography cue makes it attend to rendered text, an object cue to the things named, a style cue to how the image looks. One backbone, many critics, at no extra cost.
Citation
The paper is coming soon. Until then, if you find NitroFusion2 useful or relevant to your research, please kindly cite this release:
@misc{chen2026nitrofusion2,
title={NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers},
author={Dar-Yen Chen and Yi-Zhe Song},
year={2026},
howpublished={\url{https://github.com/ChenDarYen/NitroFusion2}},
note={Paper coming soon}
}
Please also consider citing NitroFusion:
@inproceedings{chen2025nitrofusion,
title={NitroFusion: High-Fidelity Single-Step Diffusion through Dynamic Adversarial Training},
author={Dar-Yen Chen and Hmrishav Bandyopadhyay and Kai Zou and Yi-Zhe Song},
booktitle={CVPR},
year={2025}
}
- Downloads last month
- 212
Model tree for ChenDY/NitroFusion2
Base model
Tongyi-MAI/Z-Image-Turbo


