Nodes/Comfy_HunyuanImage3/Hunyuan 3 Generate
ComfyUI Node

Hunyuan 3 Generate

The Hunyuan 3 Generate node that actually makes the picture

By EricRollei·Created 10 months ago·Updated 4 months ago· 65
Hunyuan 3 Generate
  • model
  • image
  • rewritten_prompt
  • status
  • trigger
promptA beautiful landscape
seed0
steps25
resolution
guidance_scale6.0
post_actionkeep_loaded
enable_prompt_rewritefalse
rewrite_stylenone
api_urlhttps://api.deepseek.com/v1/chat/completions
model_namedeepseek-chat

If you've got the VRAM to hold a Hunyuan 3 model on the GPU, this is the node you reach for. Hunyuan 3 Generate is the plain, no-nonsense generator in the Comfy_HunyuanImage3 pack - no CPU offload games, no memory budget math, just prompt in, image out. It's the fastest path from a loaded model to a picture, and it's the right tool whenever you're at 48GB+ of VRAM and your render is under ~2MP.

The model behind it is Tencent's HunyuanImage-3.0, an 80-billion-parameter MoE (64 experts, 13B active per token) that's autoregressive rather than diffusion-based. Two practical consequences: it doesn't support negative prompts, and it's absolutely enormous. The Comfy_HunyuanImage3 pack is the community bridge that makes this thing runnable at all, via quantized weights (NF4/INT8), block swap, and a web of VRAM-management nodes. This node is the un-fancy core of that web.

What you actually set

The loader hands this node a HUNYUAN_MODEL, and the rest is straightforward:

  • prompt - a plain text prompt. Be explicit and descriptive; there's no negative prompt sidecar to mop up what you didn't want.
  • steps - default 25. 30–40 is a sweet spot for quality; the model's Instruct-Distil sibling runs in 8.
  • resolution - a dropdown of the model's native bucket resolutions, all ~1MP. Pick "Auto (model default)" or any of the 34 preset aspect ratios.
  • guidance_scale - default 6.0. Higher sticks closer to the prompt, lower gets more creative.
  • seed - same seed, same image, full reproducibility.
  • post_action - what happens to the model after sampling: keep_loaded (fast reruns), soft_unload_to_cpu (~10s restore), or full_unload (free VRAM and RAM, ~35s reload).

The optional enable_prompt_rewrite block wires into an OpenAI-compatible LLM API (DeepSeek by default) to expand your prompt before sampling - handy, but it needs an API key and only matters if you want it.

Outputs are image (wire it to Save Image / Preview Image), rewritten_prompt (a STRING, useful for inspecting what the rewriter did), status (a STRING you can log or display), and trigger (a pass-through you can chain into downstream nodes).

Installing it

Grab the pack via ComfyUI Manager (search "Comfy_HunyuanImage3") or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Comfy_HunyuanImage3
cd Comfy_HunyuanImage3
pip install -r requirements.txt

Then restart ComfyUI and download a model into ComfyUI/models/ (the loader scans that folder; NF4 is the recommended starting point):

huggingface-cli download EricRollei/HunyuanImage-3-NF4-v2 --local-dir HunyuanImage-3-NF4

Where people get burned

The classic mistake is pairing this node with a quantized model on a 24–32GB card. This node assumes the model is fully on GPU - if your NF4 model is being offloaded via device_map, use the Low VRAM variants instead, or you'll hit dispatch errors or crawling speeds. And remember the sizing reality: community testing found NF4 wants roughly 60GB of effective memory to be pleasant; on a 24GB 4090 it works with the rest spilling to system RAM, but generation slows to a crawl. 12GB cards are a non-starter, full stop.

One more thing to know: this node keeps the model cached after a run by default, which is what makes successive generations fast. If you're switching to a different model afterward, flip post_action or hit an unload node, or you'll be staring at a nearly-full VRAM monitor wondering where your memory went.

CategoryHunyuanImage3

Inputs (11)

NameTypeDefaultDescription
modelHUNYUAN_MODEL
promptSTRINGA beautiful landscape
seedINT00–18446744073709550000
stepsINT251–100
resolutionCOMBO34 options: Auto (model default), 768x1344 - 9:16 (1.0MP), 768x1280 - 5:8 (1.0MP), 832x1216 - 2:3 (1.0MP), 896x1152 - 3:4 (1.0MP), 896x1088 - 4:5 (1.0MP), +28
guidance_scaleFLOAT6.01–20
post_actionCOMBOkeep_loadedAfter generation: keep_loaded (fastest reruns), soft_unload_to_cpu (free VRAM, ~10s restore), full_unload (free VRAM+RAM, ~35s reload)
enable_prompt_rewriteoptBOOLEANfalse
rewrite_styleoptCOMBOnone3 options: none, en_recaption, en_think_recaption
api_urloptSTRINGhttps://api.deepseek.com/v1/chat/completions
model_nameoptSTRINGdeepseek-chat

Outputs (4)

NameTypeDescription
imageIMAGE
rewritten_promptSTRING
statusSTRING
trigger*