ComfyUI > Nodes > ComfyUI Level Pixel > Cropped Free Size Parameters [LP]

ComfyUI Node: Cropped Free Size Parameters [LP]

Class Name

CroppedFreeSizeParameters|LP

Category
LevelPixel/Inpaint
Author
LevelPixel (Account age: 647days)
Extension
ComfyUI Level Pixel
Latest Updated
2026-02-24
Github Stars
0.03K

How to Install ComfyUI Level Pixel

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

Cropped Free Size Parameters [LP] Description

Facilitates dynamic image cropping with flexible size adjustment using masks and rescale factors.

Cropped Free Size Parameters [LP]| Cropped Free Size Parameters [LP]:

The CroppedFreeSizeParameters| Cropped Free Size Parameters [LP] node is designed to facilitate the cropping of images with a flexible size adjustment based on a given mask and rescale factor. This node is particularly useful in scenarios where you need to dynamically adjust the size of an image region for inpainting or other image processing tasks. By leveraging a mask to define the area of interest, the node calculates the appropriate dimensions for cropping, allowing for a seamless integration into workflows that require precise control over image dimensions. The node's ability to handle optional context masks further enhances its versatility, making it a valuable tool for AI artists looking to manipulate image sizes without being constrained by fixed dimensions.

Cropped Free Size Parameters [LP]| Cropped Free Size Parameters [LP] Input Parameters:

mask

The mask parameter is a crucial input that defines the area of the image to be considered for cropping. It is typically a binary mask where the regions of interest are marked. The mask's dimensions directly influence the cropping operation, as the node uses it to determine the boundaries of the area to be resized. This parameter does not have explicit minimum, maximum, or default values, as it depends on the specific image being processed.

rescale_factor

The rescale_factor parameter determines how much the cropped region should be resized. It is a multiplier applied to the dimensions of the cropped area, allowing you to increase or decrease its size proportionally. This parameter is essential for adjusting the final output size to meet specific requirements. The value should be a positive number, with no strict minimum or maximum, but it should be chosen carefully to avoid excessively large or small outputs.

cropping_form

The cropping_form parameter specifies the shape of the cropping operation. It can take values such as "square form," which indicates that the cropping should maintain a square aspect ratio. This parameter helps in controlling the geometric shape of the cropped region, ensuring that it aligns with the desired output format.

optional_context_mask

The optional_context_mask is an additional parameter that can be used to provide more context for the cropping operation. When supplied, it must match the dimensions of the mask parameter. This mask can be used to include additional areas in the cropping process, offering more flexibility in defining the region of interest. If not provided, the node will default to using only the primary mask.

Cropped Free Size Parameters [LP]| Cropped Free Size Parameters [LP] Output Parameters:

cropped_size_parameters

The cropped_size_parameters output is a dictionary containing the calculated dimensions for the cropped region. It includes keys such as target_height and target_width, which specify the final size of the cropped area after applying the rescale factor. Additionally, it contains a batch_mode key, indicating whether the operation is intended for batch processing. This output is crucial for downstream processes that require precise size specifications for further image manipulation or analysis.

Cropped Free Size Parameters [LP]| Cropped Free Size Parameters [LP] Usage Tips:

  • Ensure that the mask and optional_context_mask have matching dimensions to avoid errors and achieve accurate cropping results.
  • Use the rescale_factor to fine-tune the size of the cropped region, but be cautious with extreme values to maintain image quality.
  • When working with square outputs, set the cropping_form to "square form" to automatically adjust the aspect ratio.

Cropped Free Size Parameters [LP]| Cropped Free Size Parameters [LP] Common Errors and Solutions:

optional_context_mask dimensions do not match mask dimensions

  • Explanation: This error occurs when the optional_context_mask provided does not have the same dimensions as the mask.
  • Solution: Ensure that both the mask and optional_context_mask have identical dimensions before passing them to the node.

AssertionError: max_width must be greater than or equal to min_width

  • Explanation: This error indicates that the maximum width specified is less than the minimum width, which is not allowed.
  • Solution: Verify and adjust the max_width and min_width values to ensure that the maximum is greater than or equal to the minimum.

Cropped Free Size Parameters [LP] Related Nodes

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

Cropped Free Size Parameters [LP]