Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Rebalance-Pack > Uncrop Mask

ComfyUI Node: Uncrop Mask

Class Name

UncropMask

Category
Rebalance-Pack/mask
Author
nova452 (Account age: 1390days)
Extension
Rebalance-Pack
Latest Updated
2026-07-30
Github Stars
0.47K

How to Install Rebalance-Pack

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

Uncrop Mask Description

Integrates cropped masks back into original image context for precise editing and manipulation.

Uncrop Mask:

The UncropMask node is designed to seamlessly integrate a cropped mask back into its original context within an image. This node is particularly useful when you have extracted a specific region of interest from a mask and need to restore it to its original position in the full image. By doing so, it ensures that any modifications or analyses performed on the cropped section can be accurately reflected in the larger image. This capability is essential for maintaining the integrity of the mask's spatial information, allowing for precise image editing and manipulation tasks. The UncropMask node effectively handles the alignment and placement of the cropped mask, ensuring that it fits perfectly back into its original location, thus preserving the continuity and coherence of the image data.

Uncrop Mask Input Parameters:

original_mask

The original_mask parameter represents the full-sized mask from which a section was previously cropped. It serves as the reference for where the cropped mask should be placed back. This parameter is crucial as it provides the spatial context needed to accurately position the cropped mask. The original_mask should be in the same format and dimensions as it was before cropping to ensure proper alignment.

cropped_mask

The cropped_mask parameter is the smaller, extracted portion of the original mask that you wish to reintegrate. This parameter contains the specific region of interest that was previously isolated for detailed analysis or modification. The cropped_mask must be correctly aligned with the original_mask to ensure that it is placed back in the correct position. The dimensions of the cropped_mask should match the area it was extracted from to avoid any misalignment.

Uncrop Mask Output Parameters:

out_mask

The out_mask is the resulting mask after the cropped section has been successfully reintegrated into the original mask. This output reflects the full mask with the cropped region accurately placed back in its original position. The out_mask maintains the same dimensions as the original_mask, ensuring that the spatial integrity of the image is preserved. This output is essential for further image processing tasks that require the complete mask with all its regions intact.

Uncrop Mask Usage Tips:

  • Ensure that the original_mask and cropped_mask are in compatible formats and dimensions to avoid alignment issues when reintegrating the cropped section.
  • Use the UncropMask node when you need to perform localized modifications on a mask and then restore it to its original context for comprehensive image analysis.

Uncrop Mask Common Errors and Solutions:

Mismatched Dimensions

  • Explanation: This error occurs when the dimensions of the cropped_mask do not align with the expected region in the original_mask.
  • Solution: Verify that the cropped_mask was extracted from the original_mask using the correct coordinates and dimensions. Ensure both masks are in the same format and have compatible dimensions.

Empty Output Mask

  • Explanation: This issue arises when the cropped_mask is not correctly placed back into the original_mask, resulting in an empty or incorrect out_mask.
  • Solution: Check the coordinates and dimensions used during the cropping process to ensure they match the intended region in the original_mask. Adjust the placement logic if necessary to ensure proper alignment.

Uncrop Mask Related Nodes

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

Uncrop Mask