ComfyUI Node
Hunyuan Instruct Generate
A ComfyUI node in Hunyuan/Instruct with 13 inputs and 3 outputs.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| model | HUNYUAN_INSTRUCT_MODEL | — | |
| prompt | STRING | A beautiful sunset over mountains with dramatic clouds | Text prompt for image generation |
| bot_task | COMBO | image | Controls 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_prompt | COMBO | dynamic | System 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. |
| resolution | COMBO | 1024x1024 (1:1 Square) | Output image resolution |
| seed | INT | -1-1–2147483647 | -1 for random seed |
| stepsopt | INT | -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_scaleopt | FLOAT | -1.0-1–20 | CFG scale. -1 = auto (uses model's recommended value, typically 2.5) |
| flow_shiftopt | FLOAT | 2.800–10 | Flow 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_tokensopt | INT | 2048256–8192 | Maximum 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. |
| verboseopt | INT | 00–2 | Verbosity level. 0=silent (recommended), 1=info (shows full system prompt), 2=debug |
| vae_tilingopt | COMBO | auto | VAE 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_offloadopt | COMBO | auto | VAE 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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| cot_reasoning | STRING | — |
| status | STRING | — |