Nodes/Comfy_HunyuanImage3/Hunyuan Instruct Image Edit
ComfyUI Node

Hunyuan Instruct Image Edit

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 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)

NameTypeDefaultDescription
modelHUNYUAN_INSTRUCT_MODEL
imageIMAGE
instructionSTRINGChange the background to a sunset sceneInstruction for how to modify the image
bot_taskCOMBOimageControls 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.
seedINT-1-1–2147483647-1 for random seed
system_promptoptCOMBOdynamicSystem 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_sizeoptBOOLEANtrueWhen 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.
resolutionoptCOMBOautoOutput resolution. 'auto' lets the model pick (or matches input if align_output_size=True). Otherwise overrides with a fixed preset.
stepsoptINT-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_scaleoptFLOAT-1.0-1–20CFG scale. -1 = auto (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).
max_new_tokensoptINT2048256–8192Maximum tokens for CoT reasoning and instruction rewriting. Only used with recaption or think_recaption modes. 2048 is usually sufficient.
verboseoptINT00–2Verbosity level. 0=silent (recommended), 1=info (shows full system prompt), 2=debug

Outputs (3)

NameTypeDescription
imageIMAGE
cot_reasoningSTRING
statusSTRING