Skip to content

Add NitroFusion2 as a one-step Text to Image preset - #180

Closed
MehranMarxian wants to merge 1 commit into
mainfrom
feat/nitrofusion2-preset
Closed

MehranMarxian wants to merge 1 commit into
mainfrom
feat/nitrofusion2-preset

Conversation

@MehranMarxian

@MehranMarxian MehranMarxian commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

What changed and why

Adds NitroFusion2 as a Text to Image preset (txt2img-nitrofusion2). It goes in before the beta tag at Mehran's request, even though the beta gate otherwise freezes features.

NitroFusion2 (ChenDY/NitroFusion2, released 2026-11-03) is an adversarially distilled fine-tune of Z_image_Turbo that renders in one step.

  • Licence: Apache-2.0 and ungated, so it needs no licenseGate.
  • Downloads: it shares Z_image_Turbo's qwen_3_4b encoder and ae VAE. The registry reuses those exact entries, so the setup pack counts them once and a Z_image_Turbo user downloads only the 12.3 GB model.
  • Nodes: core ComfyUI only, so no add-ons.

The graph is txt2img-z-image-turbo with three values changed, matching the authors' own one-step workflow:

  • the model is nf2-bf16.safetensors;
  • 1 step instead of 4;
  • euler instead of res_multistep.

Shift 3, CFG 1 and the simple scheduler stay the same. It keeps the same node ids, so it reuses Z_image_Turbo's injection map.

Why it's its own preset: I ran NitroFusion2 through Z_image_Turbo's own settings (4 steps, res_multistep) on six prompts, and it added white speckle the one-step run did not have.

Model detection: nf2-* files were read as an "Unknown" model family, so the preset would have warned about its own model. They now read as Z_image_Turbo. The check matches a file-name prefix, so names that merely contain "nf2" are not claimed. Tests cover both.

UI defaults: 1 step, CFG 1, 1024 × 1024. The negative prompt is hidden because at CFG 1 the sampler never reads it.

Docs: README (Text to Image table), docs/llms.txt, docs/index.html, docs/model-guide.md, and the preset count in CLAUDE.md (39 → 40). The CHANGELOG is left for the release branch, as usual.

Speed: honest numbers

Measured 2026-11-09 on the 4070 Ti (12 GB), ComfyUI 0.44.0, 1024 × 1024, six prompts:

New prompt Same prompt, new seed
Z_image_Turbo, 4 steps ~17.5 s ~5.0 s
NitroFusion2, 1 step ~14 s ~2.5 s

On a new prompt most of the time goes to ComfyUI swapping the 8 GB encoder and the 12.3 GB model in and out of 12 GB of video memory, not to sampling. So it is "2× faster re-rolls", not "4× faster". The registry note says so.

Quality matched or beat Z_image_Turbo at 4 steps on lettering, a portrait, a landscape, a product shot and hands. It missed once: "a fox reading a book" gave a child and a fox-girl.

What was verified

  • The model file's SHA-256, hashed locally, matches the published LFS id. The download URL's HEAD redirect reports the same size and hash:
    a1e11422d84c1986ba106f892eda86b955b752627ec902aefff1fb939c7ac19c  nf2-bf16.safetensors
    X-Linked-Size: 12309866400
    X-Linked-ETag: "a1e11422d84c1986ba106f892eda86b955b752627ec902aefff1fb939c7ac19c"
    
  • The shipped JSON file itself was submitted to the live ComfyUI on 8188: status success 16662 ms, OpenLayer_NitroFusion2_00001_.png. The chalkboard prompt "TODAY: LEMON TART" came back spelled correctly.
  • npm run typecheck: clean.
  • npm run lint: clean (exit 0).
  • npm run build: ✓ built in 1.10s, and dist/workflows/api/txt2img-nitrofusion2.json is present.
  • npm test: Tests 1409 passed | 1 failed (1410). The one failure is not from this PR. tests/ui/promptRequiredReset.test.ts › pairs each tool's prompt field with its own status bar (added in Clear a stale Prompt required error once the prompt has text #175) mounts the whole panel once per tool and takes 5.3–7.1 s on this machine against vitest's 5 s timeout. It fails the same way on main with these changes stashed, and it passes on CI's faster runner. An earlier full run on this branch passed all 1410. Fixing it (give that one test a longer timeout) should be its own small PR.

New tests:

  • the registry entry shares Z_image_Turbo's encoder and VAE entries;
  • the URL, size and hash;
  • no licence gate and no LoRA insertion;
  • the 1-step, 1024 recommended settings;
  • the built graph has Z_image_Turbo's exact node shape, with only the model, steps and sampler changed;
  • nf2-* family detection, with lookalike names rejected.

What could NOT be verified

  • Nothing was run in Photoshop. The panel, the preset dropdown, the hidden negative prompt and the import are all unverified there.
  • Setup › Check Again listing the new 12.3 GB row is unverified.
  • No source/GUI twin (src/workflows/source/) was added. The Klein text-to-image preset has none either, so the equivalence test skips it.
  • Not wired up: the authors' 2-step graph (its de-distillation LoRA is on for step 1 only, which our LoRA insertion can't express), LoRAs in general (untried on the one-step weights), and the GGUF files.
  • The speed was only measured on the 12 GB card. A 24 GB card should see more of the speed-up; that is untested.

What Mehran should check in Photoshop

Load dist/ in UXP Developer Tool (Add Plugin → dist/manifest.json → Load). Then run these smoke checklist blocks:

  • Block 0: the panel starts.
  • Home › Text to Image › Workflow: NitroFusion2. See:
    • the model picker switches to nf2-bf16.safetensors by itself;
    • Steps reads 1, CFG 1, size 1024 × 1024;
    • there is no Negative prompt field;
    • there is no "may need a dedicated workflow" warning.
  • Prompt a chalkboard that says TODAY: LEMON TART → Generate → Import Result as New Layer. See: a 1024 × 1024 layer with the words spelled right.
  • Generate again with the same prompt (only the seed changes). See: it finishes noticeably faster than the first run.
  • Switch Workflow back to Z_image_Turbo. See: the model goes back to z_image_turbo_bf16.safetensors, Steps to 8, and the Negative prompt field comes back.
  • Block 1 (1.1–1.4) is unchanged, but run it since this touches Text to Image.
  • Block 4.1: Setup › Check Again. See: a NitroFusion2 diffusion model row, Installed.

🤖 Generated with Claude Code

NitroFusion2 (ChenDY/NitroFusion2, released 2026-11-03) is an adversarially
distilled fine-tune of Z_image_Turbo that renders in one step. It is Apache-2.0
and ungated, uses only core ComfyUI nodes, and shares Z_image_Turbo's qwen_3_4b
encoder and ae VAE, so a user who already runs Z_image_Turbo downloads only the
12.3 GB model.

txt2img-nitrofusion2 is the txt2img-z-image-turbo graph with three values
changed, matching the authors' own one-step workflow: nf2-bf16.safetensors,
1 step, euler. It keeps that graph's node ids, so it reuses its injection map.
It is its own preset rather than a file picked in Z_image_Turbo because running
NitroFusion2 at Z_image_Turbo's 4 steps with res_multistep adds white speckle
(measured on six prompts on 2026-11-09).

On a 12 GB 4070 Ti at 1024 x 1024 it takes about 2.5 s against Z_image_Turbo's
5 s when only the seed changes, and 14 s against 17.5 s for a new prompt: the
8 GB encoder and the 12.3 GB model do not fit on the card together, so ComfyUI
swaps them for every new prompt. The registry note records this so nobody
advertises it as four times faster.

nf2-* files were detected as an Unknown model family, which would have made the
preset warn about its own model. They now read as Z_image_Turbo, matched as a
file-name prefix so names that merely contain "nf2" are not claimed.

Not wired up: the authors' two-step graph (its de-distillation LoRA is on for
the first step only, which OpenLayer's LoRA insertion cannot express), LoRAs in
general (untried on the one-step weights), and the GGUF files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MehranMarxian

Copy link
Copy Markdown
Owner Author

Not merging. The smoke check passed, but after more testing Mehran decided NitroFusion2 doesn't earn a preset: its quality isn't better than Z_image_Turbo's and its images look too much like it. The branch stays on GitHub in case the question comes up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant