Visit ComfyUI Online for ready-to-use ComfyUI environment
Automated image resizing based on detected person size for focal point emphasis and consistent results.
BMAB Resize By Person is a specialized node designed to resize images based on the presence and size of a person detected within the image. This node leverages advanced object detection techniques to identify the largest person in the image and adjusts the image dimensions accordingly. The primary goal of this node is to ensure that the person remains the focal point of the image, maintaining a specific aspect ratio and alignment. This is particularly useful for applications where the subject's prominence and positioning are crucial, such as in portrait photography, social media content, and other visual arts. By automating the resizing process, BMAB Resize By Person helps you save time and achieve consistent results, enhancing the overall quality and impact of your images.
This parameter is of type BMAB bind
and is required. It serves as a binding context for the node, ensuring that the necessary configurations and settings are applied during the image processing.
This integer parameter defines the number of steps for 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 precision and quality of the resizing operation.
This float parameter, with a default value of 8.0, controls the configuration scale. It ranges from 0.0 to 100.0, with increments of 0.1. This parameter influences the overall scaling factor applied during the resizing process.
This parameter allows you to select the sampler to be used. It includes options like Use same sampler
and other samplers available in comfy.samplers.KSampler.SAMPLERS
. The choice of sampler can affect the quality and style of the resized image.
Similar to sampler_name
, this parameter lets you choose the scheduler for the process. Options include Use same scheduler
and those listed in comfy.samplers.KSampler.SCHEDULERS
. The scheduler determines the sequence and timing of the resizing steps.
This float parameter, ranging from 0.0 to 1.0 with a default value of 0.5, controls the level of denoising applied to the image. Adjusting this value can help reduce noise and improve the clarity of the resized image.
This parameter specifies the resizing method to be used. Available options are stretching
, inpaint
, and inpaint+lama
. Each method offers a different approach to resizing, affecting the final appearance of the image.
This parameter determines the alignment of the resized image. Options include bottom
, top
, top-right
, right
, bottom-right
, bottom-left
, left
, top-left
, and center
. The alignment setting ensures that the person remains properly positioned within the resized image.
This float parameter, with a default value of 0.85, defines the aspect ratio for resizing. It ranges from 0.1 to 0.95, with increments of 0.01. The ratio helps maintain the proportionality of the person within the image.
This integer parameter, with a default value of 30, controls the dilation applied to the image. It ranges from 4 to 128, with increments of 1. Dilation can affect the boundaries and edges of the resized image, enhancing the prominence of the person.
This optional parameter allows you to provide an image for processing. If not provided, the node will use the default image from the binding context.
This output parameter returns the updated BMAB bind
context, reflecting the changes and settings applied during the resizing process. It ensures that subsequent nodes can utilize the updated context for further processing.
This output parameter returns the resized image. The image is adjusted based on the presence and size of the person, maintaining the specified aspect ratio and alignment. The output image is ready for further use or display.
method
and alignment
settings to find the optimal configuration for your specific use case.ratio
parameter to maintain the desired aspect ratio, especially when working with images of varying dimensions.denoise
parameter to reduce noise and enhance the clarity of the resized image, particularly in low-light conditions.ratio
parameter is set to a value outside the acceptable range.ratio
parameter to a value between 0.1 and 0.95.© Copyright 2024 RunComfy. All Rights Reserved.