Repository navigation
Add NitroFusion2 as a one-step Text to Image preset - #180
Closed
MehranMarxian wants to merge 1 commit into
Closed
MehranMarxian wants to merge 1 commit into
MehranMarxian wants to merge 1 commit into
Conversation
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>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
licenseGate.qwen_3_4bencoder andaeVAE. 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.The graph is
txt2img-z-image-turbowith three values changed, matching the authors' own one-step workflow:nf2-bf16.safetensors;eulerinstead ofres_multistep.Shift 3, CFG 1 and the
simplescheduler 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:
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
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, anddist/workflows/api/txt2img-nitrofusion2.jsonis 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 onmainwith 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:
nf2-*family detection, with lookalike names rejected.What could NOT be verified
src/workflows/source/) was added. The Klein text-to-image preset has none either, so the equivalence test skips it.What Mehran should check in Photoshop
Load
dist/in UXP Developer Tool (Add Plugin →dist/manifest.json→ Load). Then run these smoke checklist blocks:nf2-bf16.safetensorsby itself;a chalkboard that says TODAY: LEMON TART→ Generate → Import Result as New Layer. See: a 1024 × 1024 layer with the words spelled right.z_image_turbo_bf16.safetensors, Steps to 8, and the Negative prompt field comes back.🤖 Generated with Claude Code