Nodes/Comfy_HunyuanImage3/Hunyuan Instruct Generate
ComfyUI Node

Hunyuan Instruct Generate

A ComfyUI node in Hunyuan/Instruct with 13 inputs and 3 outputs.

By EricRollei·Created 9 months ago·Updated 3 months ago· 64
Hunyuan Instruct Generate
  • model
  • image
  • cot_reasoning
  • status
promptA beautiful sunset over mountains with dramatic clouds
bot_taskimage
system_promptdynamic
resolution1024x1024 (1:1 Square)
seed-1
steps-1
guidance_scale-1.0
flow_shift2.80
max_new_tokens2048
verbose0
vae_tilingauto
vae_offloadauto
CategoryHunyuan/Instruct

Inputs (13)

NameTypeDefaultDescription
modelHUNYUAN_INSTRUCT_MODEL
promptSTRINGA beautiful sunset over mountains with dramatic cloudsText prompt for image generation
bot_taskCOMBOimageControls how the model processes your prompt before generating. • image: Direct generation — your prompt is used as-is with no enhancement. • recaption: The model rewrites your prompt into a detailed, structured description (photography terms, composition, lighting, etc.) then generates from that enhanced prompt. • think_recaption: (BEST QUALITY) The model first reasons about your prompt using Chain-of-Thought (CoT), analyzing intent, style, composition, then rewrites the prompt, then generates. Slower but produces the highest quality results. The CoT reasoning text is returned via the cot_reasoning output. WARNING: recaption and think_recaption add several minutes of autoregressive text generation before the image starts. Even after recent decode-path fixes the cost is significant on long prompts. Use 'image' for direct generation when you already have a well-structured prompt.
system_promptCOMBOdynamicSystem prompt that guides how the model interprets and processes your input. • dynamic: (RECOMMENDED) Auto-selects the best prompt for your bot_task — no system prompt for image (clean T2I), en_recaption for recaption, en_unified for think_recaption. • en_unified: Comprehensive prompt covering T2I, editing, recaption, and CoT. • en_recaption: Focused on prompt rewriting — best with bot_task=recaption. • en_think_recaption: Focused on CoT + rewriting — best with think_recaption. • en_vanilla: Minimal prompt — just 'generate a high-quality image'. • none: No system prompt sent to the model at all. For bot_task=image, system prompt text can interfere with image quality. For recaption/think_recaption, system prompts guide CoT reasoning and are beneficial.
resolutionCOMBO1024x1024 (1:1 Square)Output image resolution
seedINT-1-1–2147483647-1 for random seed
stepsoptINT-1-1–100-1 for auto (8 for Distil, 40 for full Instruct). For full Instruct, higher step counts (50–80) reduce flow-matching artifacts at 2K+ resolutions but generation time scales linearly — expect a much longer wait.
guidance_scaleoptFLOAT-1.0-1–20CFG scale. -1 = auto (uses model's recommended value, typically 2.5)
flow_shiftoptFLOAT2.800–10Flow shift for the diffusion scheduler. Controls denoising schedule shape. Default 2.8 is balanced. Presets: Portraits / faces: 2.0–2.5 (sharper detail). Landscapes / illustrations: 3.5–5.0 (cleaner gradients, less high-frequency noise).
max_new_tokensoptINT2048256–8192Maximum tokens the model can generate for CoT reasoning and prompt rewriting. Only used when bot_task is recaption or think_recaption. Higher values allow more detailed reasoning but use more time and memory. 2048 is usually sufficient; increase if CoT output is getting truncated.
verboseoptINT00–2Verbosity level. 0=silent (recommended), 1=info (shows full system prompt), 2=debug
vae_tilingoptCOMBOautoVAE decode tiling. • auto: Enable tiling automatically when free VRAM is below the safety threshold (post block-swap release). • on: Always tile (slower but lowest VRAM, recommended for >=2K outputs on ≤24GB cards). • off: Never tile (fastest, may OOM at high resolution).
vae_offloadoptCOMBOautoVAE GPU↔CPU offload around decode. • auto: Move VAE to GPU just for decode and back to CPU after, when VRAM is tight. • on: Always offload VAE to CPU when idle. • off: Keep VAE on GPU at all times (fastest).

Outputs (3)

NameTypeDescription
imageIMAGE
cot_reasoningSTRING
statusSTRING