cd /news/generative-ai/serving-nitrofusion2-on-one-gpu-the-… · home › topics › generative-ai › article
[ARTICLE · art-174071] src=dev.to ↗ pub= topic=generative-ai verified=true sentiment=↑ positive

Serving NitroFusion2 on one GPU: the text encoder, the memory mode and the step count

A developer serving NitroFusion2, a one-to-two-step image model distilled from Tongyi-MAI's Z-Image-Turbo by Dar-Yen Chen and Yi-Zhe Song of SketchX at the University of Surrey, measured 0.78-0.82 seconds of GPU time per 1024x1024 image at one step and 1.32-1.33 seconds at two on a single RTX 4090. The write-up reports that the 12.3 GB transformer plus an approximately 8 GB text encoder peaks near 23 GB, so a 16 GB card needs the 5 GB GGUF file and an explicit gpu memory mode, and that text rendering remains weak at low step counts, with the authors' own long-text test scoring 43/100 at one step versus 92 for eight-step Z-Image-Turbo.

recommendation

Set NF2_MEMORY_MODE=gpu and pick a GGUF that fits beside the ~8 GB text encoder; measure round-trip time, not just GPU time, since one-step requests nearly double through the API.

more in playbook: Inference and self-hosting
by read5 min views1 publishedNov 22, 2026

Image models like this start from noise and clean it up in passes, called steps. Tongyi-MAI's Z-Image-Turbo needs eight. NitroFusion2 is distilled from it: a student network trained to land on the teacher's result in one or two. Dar-Yen Chen and Yi-Zhe Song (SketchX, University of Surrey) built it and released it under Apache-2.0. We served it as an API on one RTX 4090 on our cloud. At 1024 x 1024, one step took 0.78 to 0.82 seconds of GPU time, two steps 1.32 to 1.33.

Speed came for free. A few settings and one testing habit did not. Every table, the memory ladder and the setup commands are in the full NitroFusion2 write-up on inferencekey.com.

The transformer (the main network that draws) ships as a 12.3 GB file, which seems to suit a 16 GB card. It does not. The text encoder, the Z-Image-Turbo component that turns your prompt into numbers, takes about 8 GB by itself. With the full file, peak use was about 23 GB. All on the GPU means a 24 GB card.

The authors also publish GGUF files from 2.0 GB to 7.2 GB: quantized copies that store each weight in fewer bits. Under a 16 GB cap, the 7.2 GB file died with out of memory on its first image. The 5 GB file fits beside the text encoder. On a physical 16 GB card, an RTX 2000 Ada that draws 70 watts, it stayed fully on the card at about 4.0 seconds per image at one step, 7.3 at two. At 8 GB the text encoder alone fills the budget. We did not test a smaller text encoder.

The example's memory mode defaults to auto, which keeps the pipeline on the GPU only when at least 23 GiB are free. Below that it switches to off: parts of the model wait in system RAM and move to the GPU when needed (the authors' script does the same). With the full file under a 16 GB cap, that cost 14 to 19 seconds per image. On a 16 GB card, auto never takes the 4-second path, so name it:

NF2_TRANSFORMER=nf2-Q4_K_M.gguf
NF2_MEMORY_MODE=gpu

The offloaded images came out the same, only slower, so only your timings show it.

NitroFusion2 takes 1 to 4 steps. Guidance (how hard sampling pulls toward the prompt) stays at 0. Our dashboard's image tester opens at 20 steps and guidance 4.5, and gets a 400. With 1 or 2 steps and guidance 0, the one-step poster arrived in about 1.1 seconds. The SDK example's README says so; the tester's defaults have not changed.

For two steps the authors suggest a 0.38 GB add-on. It makes the first step half Z-Image-Turbo; the student finishes alone.

GPU time is only the drawing. The round trip adds the request, PNG encoding and the network, and at one step it nearly doubles the time.

Steps GPU time Round trip through the API
1 0.78 to 0.82 s 1.45 to 1.50 s
2 1.32 to 1.33 s 1.95 to 2.00 s
4 2.42 s 3.08 s

Through the API, that is about 40 images a minute at one step and about 30 at two. Log both numbers while you tune. Requests ran one at a time: no batching (several prompts in one GPU pass), no concurrency, no eight-step baseline. Our 4090 was a 48 GB card, capped to act like the usual 24 GB one.

The seed is the random starting point of an image. With the authors' cat-and-sign prompt and seed 42, the 4090 wrote "HELLO WORd" at one step and "Hello World" at two.

On the 16 GB card, that seed at one step spelled "HELLO WORLD" correctly. A fixed seed does not reproduce a picture on another card, so one seed per prompt is a smoke test, not a quality score.

Short, big lettering usually survived one step: the Lisbon tram poster spelled "LISBOA" and "Tram 28 - every 12 minutes" correctly at one and two steps and on the 16 GB card. Small lettering did not: the cafe menu wanted "SOURDOUGH 4.50", and at one, two and four steps the 4090 wrote "SOURDOAGH". The paper admits "a substantial gap" on text rendering. In its long-text test, one step scores 43 out of 100, two steps 76, and eight-step Z-Image-Turbo 92. Those are the authors' figures; we did not reproduce them.

So text, not speed, decides. One step for previews, two for short headlines you check by eye. For menus, labels and prices, overlay real text afterwards, or switch to eight-step Z-Image-Turbo.

NitroFusion2, its paper and code are by Dar-Yen Chen and Yi-Zhe Song (paper on arXiv, code on GitHub, weights and GGUF copies on Hugging Face). It builds on NitroFusion by Dar-Yen Chen, Hmrishav Bandyopadhyay, Kai Zou and Yi-Zhe Song. The base model and text encoder are Tongyi-MAI's Z-Image-Turbo. The diffusers maintainers wrote ZImagePipeline. PedroMarinhoDev made community ComfyUI builds (untested by us), and AI Search's news video is where we found the model. We wrote the custom backend, deployed it, and ran the timings and memory tests. The NitroFusion2 deployment notes with the memory ladder and per-request measurements also cover the request fields and startup time.

To run it on your own card, start from the NitroFusion2 article on inferencekey.com and its SDK example.

── more in #generative-ai 4 stories · sorted by recency
── more on @nitrofusion2 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/serving-nitrofusion2…] indexed:0 read:5min 2026-11-22 · —