ComfyUI > Nodes > Comfy_Felsirnodes > Focal Rescale Rel

ComfyUI Node: Focal Rescale Rel

Class Name

Focal Rescale Rel

Category
Felsir
Author
Felsir (Account age: 3861days)
Extension
Comfy_Felsirnodes
Latest Updated
2026-03-10
Github Stars
0.02K

How to Install Comfy_Felsirnodes

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

Focal Rescale Rel Description

Adjusts image size while maintaining a focal point, emphasizing specific areas post-resize.

Focal Rescale Rel:

The Focal Rescale Rel node is designed to adjust the size of an image while maintaining a specific focal point, allowing you to emphasize a particular area of interest within the image. This node is particularly useful for AI artists who want to ensure that a specific part of an image remains prominent after resizing. By using relative focal coordinates and coverage settings, the node provides flexibility in defining which part of the image should be the center of attention. The node calculates a rectangle around the focal point, ensuring that the desired aspect ratio is maintained and the focal area is centered. This approach is beneficial for creating visually appealing compositions where the focus is on a specific subject or detail within the image.

Focal Rescale Rel Input Parameters:

image_in

This parameter accepts the input image that you want to resize. The image should be in a format compatible with the node, such as a tensor or PIL image. The input image serves as the base for the resizing operation, and its content will be adjusted according to the other parameters specified.

width

This parameter specifies the target width for the resized image. It determines how wide the final image will be, with a default value of 512 pixels. The minimum value is 16 pixels, and the maximum is 2048 pixels. Adjusting this parameter affects the horizontal dimension of the output image.

height

This parameter specifies the target height for the resized image. It determines how tall the final image will be, with a default value of 512 pixels. The minimum value is 16 pixels, and the maximum is 2048 pixels. Adjusting this parameter affects the vertical dimension of the output image.

focal_x

This parameter defines the horizontal position of the focal point as a relative value between 0 and 1, with a default of 0.5. A value of 0.5 centers the focal point horizontally, while values closer to 0 or 1 shift it towards the left or right edge, respectively. This parameter is crucial for determining which part of the image should remain prominent after resizing.

focal_y

This parameter defines the vertical position of the focal point as a relative value between 0 and 1, with a default of 0.5. A value of 0.5 centers the focal point vertically, while values closer to 0 or 1 shift it towards the top or bottom edge, respectively. This parameter works in conjunction with focal_x to pinpoint the area of interest in the image.

coverage

This parameter controls the size of the focal area relative to the image dimensions, with a default value of 0.5. It ranges from 0 to 1, where higher values increase the size of the focal area, allowing more of the image to be included around the focal point. This parameter helps in balancing the focus and the surrounding context in the resized image.

fit_inside

This boolean parameter determines whether the resized image should fit entirely within the specified dimensions (True) or if it can extend beyond them (False). The default value is False. Setting this to True ensures that the entire image fits within the target dimensions, which may result in additional padding or cropping.

Focal Rescale Rel Output Parameters:

IMAGE

This output is the resized image, adjusted according to the specified width, height, and focal parameters. The image is returned in a format compatible with further processing or display, such as a tensor or PIL image.

rect_left

This output provides the left coordinate of the calculated rectangle that defines the focal area within the image. It indicates the horizontal starting point of the focal area in the resized image.

rect_top

This output provides the top coordinate of the calculated rectangle that defines the focal area within the image. It indicates the vertical starting point of the focal area in the resized image.

rect_width

This output specifies the width of the calculated rectangle that defines the focal area. It represents the horizontal extent of the focal area in the resized image.

rect_height

This output specifies the height of the calculated rectangle that defines the focal area. It represents the vertical extent of the focal area in the resized image.

Focal Rescale Rel Usage Tips:

  • To maintain the focus on a specific subject, adjust the focal_x and focal_y parameters to center the focal point on the desired area of the image.
  • Use the coverage parameter to control how much of the surrounding area is included around the focal point, balancing focus and context.
  • If you want the entire image to fit within the specified dimensions without cropping, set the fit_inside parameter to True.

Focal Rescale Rel Common Errors and Solutions:

Image size mismatch

  • Explanation: The input image dimensions do not match the expected size for processing.
  • Solution: Ensure that the input image is correctly formatted and within the acceptable size range specified by the node.

Invalid focal point coordinates

  • Explanation: The focal_x or focal_y values are outside the valid range of 0 to 1. - Solution: Adjust the focal_x and focal_y parameters to be within the range of 0 to 1 to correctly position the focal point.

Coverage value out of range

  • Explanation: The coverage parameter is set outside the valid range of 0 to 1.
  • Solution: Set the coverage parameter to a value between 0 and 1 to ensure proper calculation of the focal area.

Focal Rescale Rel Related Nodes

Go back to the extension to check out more related nodes.
Comfy_Felsirnodes
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.