ComfyUI > Nodes > ComfyUI-HunyuanVideoWrapper > HunyuanVideo STG

ComfyUI Node: HunyuanVideo STG

Class Name

HyVideoSTG

Category
HunyuanVideoWrapper
Author
kijai (Account age: 2506days)
Extension
ComfyUI-HunyuanVideoWrapper
Latest Updated
2025-05-12
Github Stars
2.4K

How to Install ComfyUI-HunyuanVideoWrapper

Install this extension via the ComfyUI Manager by searching for ComfyUI-HunyuanVideoWrapper
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-HunyuanVideoWrapper in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

HunyuanVideo STG Description

Enhance video quality and coherence with spatial and temporal adjustments using HyVideoSTG node from HunyuanVideoWrapper suite.

HunyuanVideo STG:

The HyVideoSTG node is designed to provide Spatio Temporal Guidance (STG) for video processing tasks, enhancing the quality and coherence of video outputs by applying specific guidance techniques. This node is part of the HunyuanVideoWrapper suite, which integrates advanced video processing capabilities into your workflow. The primary goal of the HyVideoSTG node is to allow users to apply spatial and temporal adjustments to video data, ensuring that the resulting video maintains a high level of detail and consistency across frames. By leveraging the STG method, this node helps in refining video outputs, making them more visually appealing and aligned with the desired artistic vision. The node is particularly beneficial for AI artists looking to enhance video content with precise control over spatial and temporal elements.

HunyuanVideo STG Input Parameters:

stg_mode

The stg_mode parameter allows you to select the mode of Spatio Temporal Guidance to be applied. It offers two options: "STG-A" and "STG-R". Each mode provides a different approach to guidance, affecting how spatial and temporal adjustments are made. Choosing the appropriate mode can significantly impact the final video output, allowing for either more aggressive or subtle guidance effects.

stg_block_idx

The stg_block_idx parameter specifies the block index where the STG should be applied. It accepts integer values ranging from -1 to 39, with a default value of 0. This parameter allows you to target specific blocks within the video processing pipeline, enabling fine-tuned control over where the guidance is applied. Adjusting this index can help in focusing the STG effects on particular sections of the video, enhancing the desired areas while leaving others untouched.

stg_scale

The stg_scale parameter determines the intensity of the Spatio Temporal Guidance. It is a floating-point value that ranges from 0.0 to 10.0, with a default of 1.0. The recommended values are ≤2.0 to maintain a balanced effect. This parameter controls the strength of the guidance applied, allowing you to adjust the level of detail and coherence in the video. A higher scale can lead to more pronounced effects, while a lower scale provides a subtler touch.

stg_start_percent

The stg_start_percent parameter defines the starting point of the STG application as a percentage of the total processing steps. It accepts floating-point values from 0.0 to 1.0, with a default of 0.0. This parameter allows you to specify when the guidance should begin during the video processing, providing control over the temporal aspect of the STG. By adjusting this value, you can ensure that the guidance is applied at the most impactful moments in the video.

stg_end_percent

The stg_end_percent parameter sets the endpoint of the STG application as a percentage of the total processing steps. It also accepts floating-point values from 0.0 to 1.0, with a default of 1.0. This parameter complements the stg_start_percent by defining when the guidance should cease. Together, these parameters allow you to bracket the STG application within a specific timeframe, ensuring that the guidance is applied precisely where needed.

HunyuanVideo STG Output Parameters:

stg_args

The stg_args output parameter provides a collection of arguments that encapsulate the settings and configurations used for the Spatio Temporal Guidance. This output is crucial for understanding the specific guidance applied to the video, as it contains all the input parameters and their values. By examining the stg_args, you can verify the settings used and make adjustments if necessary to achieve the desired video output.

HunyuanVideo STG Usage Tips:

  • Experiment with different stg_mode settings to find the best fit for your video content, as each mode offers unique guidance characteristics.
  • Use the stg_scale parameter judiciously; starting with the recommended values can help maintain a balanced effect without overwhelming the video.
  • Adjust the stg_start_percent and stg_end_percent to focus the guidance on specific parts of the video, enhancing key moments while conserving resources.

HunyuanVideo STG Common Errors and Solutions:

Invalid block index

  • Explanation: The stg_block_idx value is outside the allowed range of -1 to 39. - Solution: Ensure that the block index is set within the valid range to avoid processing errors.

Scale value too high

  • Explanation: The stg_scale value exceeds the recommended maximum, potentially leading to exaggerated effects.
  • Solution: Reduce the scale value to ≤2.0 to maintain a balanced and visually appealing output.

Start and end percentages overlap

  • Explanation: The stg_start_percent is greater than the stg_end_percent, causing an invalid guidance timeframe.
  • Solution: Adjust the start and end percentages to ensure that the start is less than the end, defining a valid timeframe for guidance application.

HunyuanVideo STG Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-HunyuanVideoWrapper
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.