ComfyUI  >  Nodes  >  comfyui_bmab >  BMAB Resize By Ratio

ComfyUI Node: BMAB Resize By Ratio

Class Name

BMAB Resize By Ratio

Category
BMAB/resize
Author
portu-sim (Account age: 343 days)
Extension
comfyui_bmab
Latest Updated
6/9/2024
Github Stars
0.1K

How to Install comfyui_bmab

Install this extension via the ComfyUI Manager by searching for  comfyui_bmab
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui_bmab 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

BMAB Resize By Ratio Description

Resize images maintaining aspect ratio using specified ratio, alignment, dilation; essential for AI artists.

BMAB Resize By Ratio:

The BMAB Resize By Ratio node is designed to resize images based on a specified ratio, ensuring that the resized image maintains a certain aspect ratio relative to the original. This node is particularly useful for AI artists who need to adjust the dimensions of their images while preserving the visual integrity and proportions of the content. By leveraging advanced resizing techniques, the node can stretch or shrink images to meet the desired ratio, making it an essential tool for preparing images for various applications, such as digital art, web design, and more. The node also offers options for alignment and dilation, providing flexibility in how the resizing is applied.

BMAB Resize By Ratio Input Parameters:

bind

This parameter accepts a BMAB bind object, which contains the image data and context required for processing. It ensures that the node has access to the necessary information to perform the resizing operation.

steps

This integer parameter specifies the number of steps to be used in the resizing process. It has a default value of 20, with a minimum of 0 and a maximum of 10000. Adjusting this value can impact the quality and speed of the resizing operation.

cfg_scale

This float parameter controls the configuration scale, influencing the intensity of the resizing effect. It has a default value of 8.0, with a range from 0.0 to 100.0, adjustable in steps of 0.1. Fine-tuning this parameter can help achieve the desired balance between image quality and processing time.

sampler_name

This parameter allows you to select the sampler to be used during the resizing process. It includes options such as Use same sampler and various samplers from comfy.samplers.KSampler.SAMPLERS. The choice of sampler can affect the smoothness and accuracy of the resized image.

scheduler

This parameter lets you choose the scheduler for the resizing operation, with options like Use same scheduler and others from comfy.samplers.KSampler.SCHEDULERS. The scheduler determines the order and timing of the resizing steps.

denoise

This float parameter specifies the denoising level to be applied during resizing. It has a default value of 0.5, with a range from 0.0 to 1.0, adjustable in steps of 0.01. Denoising can help reduce artifacts and improve the visual quality of the resized image.

method

This parameter allows you to select the resizing method, with options including stretching, inpaint, and inpaint+lama. Each method offers a different approach to resizing, providing flexibility in how the image is adjusted.

alignment

This parameter specifies the alignment of the resized image, with options such as bottom, top, top-right, right, bottom-right, bottom-left, left, top-left, and center. Alignment determines how the image content is positioned within the new dimensions.

ratio

This float parameter defines the target ratio for resizing, with a default value of 0.85, a minimum of 0.1, and a maximum of 0.95, adjustable in steps of 0.01. The ratio determines the aspect ratio of the resized image relative to the original.

dilation

This integer parameter controls the dilation level applied during resizing, with a default value of 30, a minimum of 4, and a maximum of 128, adjustable in steps of 1. Dilation can affect the spread and coverage of the resizing effect.

image

This optional parameter accepts an IMAGE input, allowing you to provide the image to be resized. If not provided, the node will use the image data from the bind parameter.

BMAB Resize By Ratio Output Parameters:

BMAB bind

This output parameter returns a BMAB bind object containing the resized image data and updated context. It ensures that the resized image is properly integrated into the workflow.

image

This output parameter returns the resized IMAGE, allowing you to use the adjusted image in subsequent nodes or processes. The resized image maintains the specified ratio and alignment, ensuring it meets the desired specifications.

BMAB Resize By Ratio Usage Tips:

  • To achieve the best results, experiment with different method and alignment settings to see which combination works best for your specific image and desired outcome.
  • Adjust the ratio parameter carefully to maintain the visual integrity of the image. A ratio too far from the original may distort the image content.
  • Use the denoise parameter to reduce artifacts, especially when working with high-resolution images or images with a lot of detail.

BMAB Resize By Ratio Common Errors and Solutions:

No boxes detected

  • Explanation: This error occurs when no bounding boxes are detected in the image, which means the node cannot identify the content to resize.
  • Solution: Ensure that the image contains recognizable content and that the detection model is appropriate for the image type. You may need to adjust the detection threshold or use a different model.

Image ratio too small

  • Explanation: This error occurs when the calculated image ratio is too small, making it impossible to resize the image to the desired ratio.
  • Solution: Increase the ratio parameter to a value closer to the original image's aspect ratio, or provide an image with a more suitable aspect ratio for resizing.

Invalid alignment option

  • Explanation: This error occurs when an invalid alignment option is selected.
  • Solution: Ensure that the alignment parameter is set to one of the valid options: bottom, top, top-right, right, bottom-right, bottom-left, left, top-left, or center.

Invalid method option

  • Explanation: This error occurs when an invalid method option is selected.
  • Solution: Ensure that the method parameter is set to one of the valid options: stretching, inpaint, or inpaint+lama.

BMAB Resize By Ratio Related Nodes

Go back to the extension to check out more related nodes.
comfyui_bmab
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.