ComfyUI > Nodes > ComfyUI-FramePackWrapper_PlusOne > Find Nearest Bucket

ComfyUI Node: Find Nearest Bucket

Class Name

FramePackFindNearestBucket

Category
FramePackWrapper
Author
xhiroga (Account age: 3803days)
Extension
ComfyUI-FramePackWrapper_PlusOne
Latest Updated
2025-08-08
Github Stars
0.04K

How to Install ComfyUI-FramePackWrapper_PlusOne

Install this extension via the ComfyUI Manager by searching for ComfyUI-FramePackWrapper_PlusOne
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-FramePackWrapper_PlusOne 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

Find Nearest Bucket Description

Resize images by finding closest resolution bucket, maintaining aspect ratio for efficient processing within `FramePackWrapper`.

Find Nearest Bucket:

The FramePackFindNearestBucket node is designed to assist in resizing images by finding the closest resolution bucket that matches the original image's dimensions. This node is particularly useful in scenarios where images need to be resized to fit specific resolution constraints while maintaining the aspect ratio as closely as possible. By leveraging a predefined set of resolution buckets, the node ensures that the resized image is optimized for encoding or further processing tasks. The primary goal of this node is to streamline the image resizing process, making it efficient and effective for users who need to work with images of varying sizes. This node is part of the FramePackWrapper category, indicating its role in handling image frames within a larger processing framework.

Find Nearest Bucket Input Parameters:

image

The image parameter represents the image that you want to resize. It is crucial for the node's operation as it provides the dimensions that need to be adjusted to fit into the nearest resolution bucket. This parameter is expected to be in the form of an image object, and it serves as the primary input for the resizing process. The node uses the dimensions of this image to calculate the closest matching resolution bucket.

base_resolution

The base_resolution parameter defines the width of the image to encode, serving as a reference point for resizing. It allows you to specify a target resolution, which the node uses to scale the nearest bucket dimensions accordingly. The default value is 640, with a minimum of 64 and a maximum of 2048, adjustable in steps of 16. This parameter is essential for customizing the output resolution to meet specific requirements, ensuring that the resized image aligns with your desired output size.

Find Nearest Bucket Output Parameters:

width

The width output parameter represents the width of the resized image after it has been adjusted to fit the nearest resolution bucket. This value is crucial for understanding the new dimensions of the image, ensuring that it meets the specified resolution requirements while maintaining the aspect ratio as closely as possible.

height

The height output parameter indicates the height of the resized image, similar to the width parameter. It provides the new height dimension after the image has been resized to fit the nearest resolution bucket. This output is essential for confirming that the image has been resized correctly and is ready for further processing or encoding.

Find Nearest Bucket Usage Tips:

  • To achieve optimal results, ensure that the base_resolution parameter is set to a value that closely matches your desired output resolution. This will help the node find the most suitable resolution bucket for your image.
  • When working with images of varying sizes, use the FramePackFindNearestBucket node to standardize the dimensions, making it easier to process multiple images consistently.

Find Nearest Bucket Common Errors and Solutions:

Image shape mismatch

  • Explanation: This error occurs when the input image does not have the expected shape or dimensions, which can prevent the node from calculating the nearest bucket correctly.
  • Solution: Ensure that the input image is in the correct format and has the necessary dimensions. Verify that the image is properly loaded and passed to the node.

Invalid base_resolution value

  • Explanation: This error arises when the base_resolution parameter is set to a value outside the allowed range (64 to 2048).
  • Solution: Adjust the base_resolution parameter to fall within the specified range, ensuring it is a multiple of 16 for optimal performance.

Find Nearest Bucket Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-FramePackWrapper_PlusOne
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 Models, enabling artists to harness the latest AI tools to create incredible art.