Nodes/HunyuanVideo-1.5 nodes/HunyuanVideo CFG
ComfyUI Node

HunyuanVideo CFG

The settings hub of the complete HunyuanVideo 1.5 workflow

By yuanyuan-spec·Created 10 months ago·Updated 10 months ago· 28
HunyuanVideo CFG
  • transformer_config
  • sr_transformer_config
  • reference_image
  • hyvid_cfg
  • hyvid_sr_cfg
promptA close-up shot captures a scene on a polished, light-colored granite kitchen counter, illuminated by soft natural light from an unseen window. Initially, the frame focuses on a tall, clear glass filled with golden, translucent apple juice standing next to a single, shiny red apple with a green leaf still attached to its stem. The camera moves horizontally to the right. As the shot progresses, a white ceramic plate smoothly enters the frame, revealing a fresh arrangement of about seven or eight more apples, a mix of vibrant reds and greens, piled neatly upon it. A shallow depth of field keeps the focus sharply on the fruit and glass, while the kitchen backsplash in the background remains softly blurred. The scene is in a realistic style.
negative_promptAerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion
prompt_rewritefalse
flow_shift
guidance_scale6.00
num_videos_per_prompt1
video_length121
seed0
task_typei2v

In the complete HunyuanVideo 1.5 workflow, HyVideo15CFG is where you live. It's the node that holds the prompt, the guidance scale, the frame count, the seed, and the scheduler shift - and nearly every other node in the graph reads from it. Think of it as the "settings" node that passes a big hyvid_cfg dict around instead of you having to re-type the prompt into a dozen places. It's the first node in the complete example workflows, and everything hangs off it.

What it sets

The inputs split into "things you'll actually touch" and "leave it alone":

  • prompt / negative_prompt - your text. The default negative is the standard Hunyuan-quality one ("Aerial view, overexposed, low quality..."), and it's honestly a fine starting point.
  • guidance_scale (6) - the CFG scale. Per the tooltip, values above 1 enable classifier-free guidance. 6 is the sensible default for this model.
  • video_length (121) - frames. The model's native default; 121 is the sweet spot for 1.5.
  • flow_shift (None) - this is the flow-matching scheduler's shift. Leave it None and the node auto-picks it from resolution: 5 for 480p, 7 for 720p. That's the official recommendation and you rarely need to override it.
  • seed - 0 by default; set it if you want reproducibility.
  • task_type (i2v) - t2v or i2v. This determines the mask behavior downstream.
  • num_videos_per_prompt (1) - how many videos per run. More than 1 mostly means more VRAM.
  • transformer_config - wire in the config output of HyVideo15TransformerLoader (or the SR loader's config). The node reads the model's ideal resolution and task from this to auto-set flow_shift.
  • sr_transformer_config - same idea for the SR branch.
  • reference_image - the same image you'll feed the encode nodes; kept here so the config knows it's an I2V job.
  • prompt_rewrite (false) - this one's a trap. Turning it on sends your prompt to an LLM via the T2V_REWRITE_BASE_URL / T2V_REWRITE_MODEL_NAME env vars (an OpenAI-compatible endpoint). It does nothing without those set, so leave it off unless you've configured a rewrite service.

It outputs two dicts: hyvid_cfg and hyvid_sr_cfg. hyvid_cfg goes everywhere (encoders, latents prep, transformer, decode); hyvid_sr_cfg feeds the SR branch nodes.

The big picture

The complete workflow exists so you can swap pieces - a different text encoder, a custom frame sequence, your own scheduler settings. HyVideo15CFG is the hub that keeps it coherent, and honestly it's also why the complete workflow is only worth it once you've outgrown the simplified sampler. For plain T2V or I2V, HyVideo15ModelLoader + HyVideo15I2VSampler is two nodes and done.

Installing it

Part of comfyui_hunyuanvideo_1.5_plugin. ComfyUI Manager → search "HunyuanVideo-1.5 nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/yuanyuan-spec/comfyui_hunyuanvideo_1.5_plugin
cd comfyui_hunyuanvideo_1.5_plugin
pip install -r requirements.txt

Restart. The node itself needs no models - it's pure config - but the workflow it anchors does.

Common issues

The two mistakes people make here: forgetting to wire transformer_config, which breaks the flow_shift auto-pick and gives you subtly wrong sampling, and leaving prompt_rewrite on without a backend, which either errors or silently passes your prompt through unchanged (the code catches the failure and keeps the original). Also remember the license context - 1.5 is under the Tencent Hunyuan Community License, which restricts use in the EU, UK, and South Korea and bans training another model on its outputs. Locally, it's a strong, slightly lonely I2V model in a Wan-dominated 2026.

CategoryHunyuanVideoWrapper1.5

Inputs (12)

NameTypeDefaultDescription
promptSTRINGA close-up shot captures a scene on a polished, light-colored granite kitchen counter, illuminated by soft natural light from an unseen window. Initially, the frame focuses on a tall, clear glass filled with golden, translucent apple juice standing next to a single, shiny red apple with a green leaf still attached to its stem. The camera moves horizontally to the right. As the shot progresses, a white ceramic plate smoothly enters the frame, revealing a fresh arrangement of about seven or eight more apples, a mix of vibrant reds and greens, piled neatly upon it. A shallow depth of field keeps the focus sharply on the fruit and glass, while the kitchen backsplash in the background remains softly blurred. The scene is in a realistic style.
negative_promptSTRINGAerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortionNegative prompt(s) that describe what should NOT be shown in the generated video.
prompt_rewriteBOOLEANfalseWhether to rewrite the prompt.
flow_shiftFLOATWhen the resolution is 480p, the recommended shift value is 5, and when the resolution is 720p, the recommended shift value is 7. If you do not set this value, it will be automatically configured according to the recommendations of this rule.
guidance_scaleoptFLOAT6.00Scale to encourage the model to better follow the prompt. `guidance_scale > 1` enables classifier-free guidance.
num_videos_per_promptoptINT11–100Number of videos to generate per prompt.
video_lengthoptINT1211–200Number of frames to generate.
seedoptINT00–2147483647
transformer_configoptHYVID15TRANSFORMERCONFIG
task_typeoptCOMBOi2v2 options: t2v, i2v
sr_transformer_configoptHYVID15TRANSFORMERCONFIG
reference_imageoptIMAGEReference image.

Outputs (2)

NameTypeDescription
hyvid_cfgHYVID15CFG
hyvid_sr_cfgHYVID15CFG