ComfyUI Node
Hunyuan Instruct Image Edit
A ComfyUI node in Hunyuan/Instruct with 13 inputs and 3 outputs.
Hunyuan Instruct Image Edit
- model
- image
- image
- cot_reasoning
- status
◄instructionChange the background to a sunset scene►
◄bot_taskimage►
◄seed-1►
◄system_promptdynamic►
◄align_output_sizetrue►
◄resolutionauto►
◄steps-1►
◄guidance_scale-1.0►
◄flow_shift2.80►
◄max_new_tokens2048►
◄verbose0►
CategoryHunyuan/Instruct
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| model | HUNYUAN_INSTRUCT_MODEL | — | |
| image | IMAGE | — | |
| instruction | STRING | Change the background to a sunset scene | Instruction for how to modify the image |
| bot_task | COMBO | image | Controls how the model processes your edit instruction. • image: Direct edit — your instruction is applied as-is. • recaption: The model rewrites your instruction into a detailed edit description (preserving elements, specifying changes) then applies the edit. • think_recaption: (BEST QUALITY) The model first reasons about what to change and what to preserve using CoT analysis, rewrites the instruction, then edits. Best for complex edits like style transfer, element replacement, or multi-step changes. WARNING: recaption and think_recaption add several minutes of autoregressive text generation before the edit starts. Use 'image' for direct editing when your instruction is already clear. |
| seed | INT | -1-1–2147483647 | -1 for random seed |
| system_promptopt | COMBO | dynamic | System prompt guiding the model's edit behavior. dynamic (recommended) auto-selects the best prompt for your bot_task. en_unified covers all editing modes including replacement, addition, removal, style transfer, and text editing. The model understands both English and Chinese instructions natively. |
| align_output_sizeopt | BOOLEAN | true | When resolution='auto': True (default): generate at the input image's exact dimensions (snapped to a multiple of 16 for VAE/patch alignment). The default bucket-snapping in the upstream image_processor is bypassed for this call so 2K+ inputs stay at 2K+. Higher resolutions use significantly more VRAM. False: let upstream pick the closest trained aspect-ratio bucket (~1MP). Ignored when resolution is set to a specific preset. |
| resolutionopt | COMBO | auto | Output resolution. 'auto' lets the model pick (or matches input if align_output_size=True). Otherwise overrides with a fixed preset. |
| stepsopt | INT | -1-1–100 | -1 for auto (8 for Distil, 50 for full Instruct). Higher step counts (60–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 (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). |
| max_new_tokensopt | INT | 2048256–8192 | Maximum tokens for CoT reasoning and instruction rewriting. Only used with recaption or think_recaption modes. 2048 is usually sufficient. |
| verboseopt | INT | 00–2 | Verbosity level. 0=silent (recommended), 1=info (shows full system prompt), 2=debug |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| cot_reasoning | STRING | — |
| status | STRING | — |