ComfyUI > Nodes > ComfyUI-HunyuanVideoWrapper > HunyuanVideo Get Closest Bucket Size

ComfyUI Node: HunyuanVideo Get Closest Bucket Size

Class Name

HyVideoGetClosestBucketSize

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 Get Closest Bucket Size Description

Resize images to closest original training bucket size for video processing, maintaining aspect ratios and resolution consistency.

HunyuanVideo Get Closest Bucket Size:

The HyVideoGetClosestBucketSize node is designed to assist in resizing images to the closest original training bucket size, which is particularly useful in video processing tasks where maintaining aspect ratios and resolution consistency is crucial. This node calculates the most suitable dimensions for an image based on predefined bucket sizes, ensuring that the image is resized to a dimension that closely matches the original training data. This process helps in optimizing the image for further processing or analysis, maintaining the quality and integrity of the visual data. By leveraging this node, you can ensure that your images are resized efficiently, preserving the aspect ratio and minimizing distortion, which is essential for high-quality video outputs.

HunyuanVideo Get Closest Bucket Size Input Parameters:

image

The image parameter represents the input image that you want to resize. It is crucial for the node's operation as it determines the dimensions and aspect ratio that need to be adjusted. The image should be provided in a format that the node can process, typically as a multi-dimensional array representing the pixel data.

base_size

The base_size parameter allows you to specify the target base size for resizing the image. It offers options such as "360", "540", and "720", with "540" being the default value. This parameter impacts the resizing process by determining the base dimensions to which the image will be adjusted. Selecting an appropriate base size ensures that the image is resized to a dimension that closely matches the original training bucket size, optimizing it for further processing.

HunyuanVideo Get Closest Bucket Size Output Parameters:

width

The width output parameter provides the calculated width of the resized image. This value is determined based on the closest bucket size that matches the original aspect ratio of the input image. It is essential for ensuring that the resized image maintains the desired dimensions and aspect ratio.

height

The height output parameter provides the calculated height of the resized image. Similar to the width, this value is determined based on the closest bucket size that matches the original aspect ratio of the input image. It ensures that the resized image maintains the desired dimensions and aspect ratio, which is crucial for high-quality video processing.

HunyuanVideo Get Closest Bucket Size Usage Tips:

  • Ensure that the input image is in a compatible format and has the correct dimensions to avoid errors during processing.
  • Choose a base_size that closely matches the original dimensions of your image to minimize distortion and maintain quality.
  • Use this node in conjunction with other video processing nodes to optimize the overall workflow and achieve the best results.

HunyuanVideo Get Closest Bucket Size Common Errors and Solutions:

Base size <base_size> not implemented

  • Explanation: This error occurs when an unsupported base size is provided as input.
  • Solution: Ensure that the base_size parameter is set to one of the supported values: "360", "540", or "720". If you need a different size, consider adjusting your workflow to accommodate the available options.

AssertionError: max_ratio must be >= 1

  • Explanation: This error indicates that the max_ratio parameter in the generate_crop_size_list function is set to a value less than 1, which is not allowed.
  • Solution: Ensure that the max_ratio parameter is set to a value greater than or equal to 1 to avoid this error. Adjust the parameter in the function call if necessary.

HunyuanVideo Get Closest Bucket Size 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.