HunyuanVideo STG
Spatio-temporal guidance without doubling your compute
- stg_args
STG stands for Spatio-Temporal Guidance, and if the name sounds like it's chasing the same goal as classifier-free guidance, that's basically right - it's an alternative way to push a video model toward better-formed motion and detail, from the STGuidance paper that the node's own description links to. The same technique (sometimes called Spatiotemporal Skip Guidance in community shorthand) shows up in LTX-Video's wrapper too, which is a decent sign it's a real, reasonably well-established trick rather than something Hunyuan-specific and obscure.
The mechanism, in plain terms: instead of running a full separate unconditional pass the way CFG does - which roughly doubles your compute per step - STG perturbs the model's behavior at one specific transformer block and uses the difference between the normal and perturbed output as its guidance signal. Cheaper than CFG, and it targets motion/spatial coherence specifically rather than general prompt adherence.
This node doesn't run anything itself - it's a settings bundle. stg_mode picks between two variants, STG-A and STG-R (the paper's own naming; the node doesn't tell you which to prefer, and neither will most guides - try both on your workflow and see which holds up better for your content, since the "right" one seems to depend on what you're generating). stg_block_idx picks which of the model's blocks gets perturbed, ranging 0–39 with a tooltip literally saying "Block index to apply STG" - no map exists telling you which block does what, so this is genuinely a tune-by-feel parameter unless you're reading the STGuidance paper directly.
The one field with real guidance attached is stg_scale: the slider goes up to 10, but the tooltip is blunt about it - "Recommended values are ≤2.0." That's worth taking seriously; a control surface that lets you crank something to 10 doesn't mean 10 is a good idea, and STG at high scale is a classic way to get an "exaggerated and unnatural" look (the same failure mode reported for over-applied STG on LTX-Video, where it shows up as distorted hair and skin). Start low. stg_start_percent and stg_end_percent window the effect to a portion of your sampling steps - same pattern you'll see on other guidance-style nodes in this pack, so you're not forced to apply it across the whole denoising process if you only want it kicking in partway through.
Output is stg_args, a bundle that wires into the wrapper's main sampler node's STG input - this particular node is a settings producer, not a consumer, so you'll always be pairing it with something else downstream.
Installing the pack: ComfyUI Manager, search "HunyuanVideoWrapper," or by hand - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper, then pip install -r requirements.txt inside that folder before restarting. Skipping the pip step is the single most common reason people end up with half the nodes missing after an install that "looked successful" in Manager.
This node needs no extra models beyond the base Hunyuan checkpoint you're already running - it's pure sampling logic, not a separate weight file. The main thing to actually watch for in practice is exactly what the tooltip warns about: cranking stg_scale past the recommended ceiling because the slider lets you. If your output starts looking oversharpened or textures go weird on skin and hair, that's your first suspect - dial it back before you start second-guessing your prompt or your LoRA.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| stg_mode | COMBO | 2 options: STG-A, STG-R | |
| stg_block_idx | INT | 0-1–39 | Block index to apply STG |
| stg_scale | FLOAT | 1.000–10 | Recommended values are ≤2.0 |
| stg_start_percent | FLOAT | 0.000–1 | Start percentage of the steps to apply STG |
| stg_end_percent | FLOAT | 1.000–1 | End percentage of the steps to apply STG |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| stg_args | STGARGS | — |