[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111793":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":31,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":19,"lastSyncTime":35,"discoverSource":36},111793,"NitroFusion2","ChenDarYen\u002FNitroFusion2","ChenDarYen","NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers.","https:\u002F\u002Fchendaryen.github.io\u002FNitroFusion2.github.io\u002F",null,"Python",71,9,59,1,0,5,11,2,46.6,"Apache License 2.0",false,"main",[25,26,27,28,29,30],"adversarial-training","comfyui","diffusion-distillation","few-step-generation","one-step","z-image-turbo","2026-11-13 23:05:30","2026-11-23 19:31:14","# NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers\n\n[![Checkpoint](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Checkpoint-NitroFusion2-ffc107?labelColor=555)](https:\u002F\u002Fhuggingface.co\u002FChenDY\u002FNitroFusion2)\n[![Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Demo-NitroFusion2-ff7a00?labelColor=555)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FChenDY\u002FNitroFusion2)\n[![Project Page](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%8C%90%20Project%20Page-NitroFusion2-1f72b8?labelColor=555)](https:\u002F\u002Fchendaryen.github.io\u002FNitroFusion2.github.io\u002F)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2611.05648-b31b1b?labelColor=555)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.05648)\n\n![NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers](.\u002Fassets\u002Fbanner.jpg)\n\n## 🔥 News\n\n- [2026-11-12] [NitroFusion2-Controlnet-Union](https:\u002F\u002Fhuggingface.co\u002FChenDY\u002FNitroFusion2-Controlnet-Union) is released! A Union ControlNet for NitroFusion2 at 1–2 steps, with [ComfyUI workflows](https:\u002F\u002Fhuggingface.co\u002FChenDY\u002FNitroFusion2-Controlnet-Union\u002Ftree\u002Fmain\u002Fworkflows). Try it in the [online demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FChenDY\u002FNitroFusion2).\n- [2026-11-07] Thanks to [PedroMarinhoDev](https:\u002F\u002Fhuggingface.co\u002FPedroMarinhoDev) for [NitroFusion2-ComfyUI](https:\u002F\u002Fhuggingface.co\u002FPedroMarinhoDev\u002FNitroFusion2-ComfyUI): int8, W6A8 and W4A8 versions are now available!\n- [2026-11-03] NitroFusion2 is released! The checkpoint is on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002FChenDY\u002FNitroFusion2), with a [ComfyUI workflow](#comfyui), [diffusers](#diffusers) code and an [online demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FChenDY\u002FNitroFusion2).\n\n## ✨ NitroFusion2\n\nNitroFusion2 is a 1–2 step text-to-image model built on [Z-Image-Turbo](https:\u002F\u002Fgithub.com\u002FTongyi-MAI\u002FZ-Image). It moves the adversarial loss onto the text stream of the MMDiT. At one step it renders sharp text and fine detail.\n\n![](.\u002Fassets\u002Fcompare_book_dancer.jpg)\n\n\u003Cp align=\"center\">\u003Cimg src=\".\u002Fassets\u002Fcompare_opera.jpg\" width=\"80%\">\u003C\u002Fp>\n\n## ComfyUI\n\n- 1 step: [`workflows\u002Fnitrofusion2_1step.json`](.\u002Fworkflows\u002Fnitrofusion2_1step.json)\n- 2 steps: [`workflows\u002Fnitrofusion2_2step.json`](.\u002Fworkflows\u002Fnitrofusion2_2step.json)\n\nFor 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.\n\nWe also release [GGUF](https:\u002F\u002Fhuggingface.co\u002FChenDY\u002FNitroFusion2\u002Ftree\u002Fmain) tiers from `nf2-Q2_K_4XS.gguf` (2.0 GB) to `nf2-Q8_0.gguf` (7.2 GB).\n\nGGUF workflows: [1 step](.\u002Fworkflows\u002Fnitrofusion2_1step_gguf.json), [2 steps](.\u002Fworkflows\u002Fnitrofusion2_2step_gguf.json).\n\n![](.\u002Fassets\u002Fcompare_gguf_latina.jpg)\n\n## Diffusers\n\nRun [`inference.py`](.\u002Finference.py) (1–4 steps):\n\n```bash\npython inference.py --prompt \"a cat holding a sign that says hello world\" --steps 2 --out cat.png\n```\n\nOr in Python:\n\n```python\nimport torch\nfrom diffusers import FlowMatchEulerDiscreteScheduler, ZImagePipeline, ZImageTransformer2DModel\n\ntransformer = ZImageTransformer2DModel.from_pretrained(\n    \"ChenDY\u002FNitroFusion2\",\n    subfolder=\"transformer\",\n    torch_dtype=torch.bfloat16,\n)\npipe = ZImagePipeline.from_pretrained(\n    \"Tongyi-MAI\u002FZ-Image-Turbo\",\n    transformer=transformer,\n    torch_dtype=torch.bfloat16,\n)\npipe.load_lora_weights(\"ChenDY\u002FNitroFusion2\", weight_name=\"nf2-dedistill-lora.safetensors\", adapter_name=\"dedistill\")\npipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(pipe.scheduler.config, shift=6.0)\npipe.enable_model_cpu_offload()\n\npipe.set_adapters(\"dedistill\", 0.5)\ndef lora_off(pipe, step, timestep, callback_kwargs):\n    pipe.set_adapters(\"dedistill\", 0.0)\n    return callback_kwargs\n\nprompt = \"Latina female with thick wavy hair, harbor boats and pastel houses behind. Breezy seaside light, warm tones, cinematic close-up.\"\n\nimage = pipe(\n    prompt=prompt,\n    height=1024,\n    width=1024,\n    num_inference_steps=2,\n    sigmas=[1.0, 0.5],\n    guidance_scale=0.0,\n    generator=torch.Generator(\"cuda\").manual_seed(42),\n    callback_on_step_end=lora_off,\n).images[0]\n\nimage.save(\"example.png\")\n```\n\n## ControlNet\n\n[NitroFusion2-Controlnet-Union](https:\u002F\u002Fhuggingface.co\u002FChenDY\u002FNitroFusion2-Controlnet-Union) is a Union ControlNet for NitroFusion2 (Canny, HED, Depth, Pose, Gray and inpainting). Weights and ComfyUI workflows are available.\n\n\u003Cp align=\"center\">\u003Cimg src=\".\u002Fassets\u002Fcontrolnet_inpaint_pose.jpg\" width=\"70%\">\u003C\u002Fp>\n\n## Method\n\n> 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.\n\n![](.\u002Fassets\u002Farchitecture.jpg)\n\nIn 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.\n\n## Citation\n\nIf you find NitroFusion2 useful or relevant to your research, please kindly cite our paper:\n\n```bib\n@article{chen2026nitrofusion2,\n    title={NitroFusion2: Bringing Adversarial Loss to the Text Stream of Multimodal Diffusion Transformers},\n    author={Chen, Dar-Yen and Song, Yi-Zhe},\n    journal={arXiv preprint arXiv:2611.05648},\n    year={2026}\n}\n```\n\nPlease also consider citing NitroFusion:\n\n```bib\n@inproceedings{chen2025nitrofusion,\n    title={NitroFusion: High-Fidelity Single-Step Diffusion through Dynamic Adversarial Training},\n    author={Dar-Yen Chen and Hmrishav Bandyopadhyay and Kai Zou and Yi-Zhe Song},\n    booktitle={CVPR},\n    year={2025}\n}\n```\n","NitroFusion2 是一个面向文本到图像生成的超快步数扩散模型，支持1–2步高质量图像合成。其核心技术是将对抗损失（adversarial loss）引入多模态扩散Transformer（MMDiT）的文本流路径，显著提升单步生成中文字清晰度与细节保真度；同时提供GGUF量化版本、ControlNet联合控制及ComfyUI工作流支持，兼顾速度、可控性与部署灵活性。适用于对生成延迟敏感的实时创意工具、轻量级AIGC插件、移动端\u002F边缘端文生图服务等需要极简步数与高保真输出的场景。","2026-11-24 04:41:47","CREATED_QUERY"]