ComfyUI > Nodes > comfy_Pond_Nodes > 🐳遮罩对齐扩展

ComfyUI Node: 🐳遮罩对齐扩展

Class Name

MaskSizeAlign

Category
🐳Pond/mask
Author
Pondowner857 (Account age: 730days)
Extension
comfy_Pond_Nodes
Latest Updated
2026-01-28
Github Stars
0.04K

How to Install comfy_Pond_Nodes

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

🐳遮罩对齐扩展 Description

Aligns `mask2` to a base mask with options for centering, edge, or corner alignment.

🐳遮罩对齐扩展:

The MaskSizeAlign node is designed to facilitate the precise alignment of one mask (mask2) to a base mask. This node is particularly useful in scenarios where you need to overlay or align masks with specific alignment preferences, such as centering, edge alignment, or corner alignment. By providing a variety of alignment options, this node allows you to control how mask2 is positioned relative to the base mask, ensuring that the masks are aligned according to your artistic or compositional needs. The node calculates the necessary transformations to align mask2 based on the specified alignment method, making it a powerful tool for artists who need to manipulate mask positions with precision and ease.

🐳遮罩对齐扩展 Input Parameters:

基准遮罩 (Base Mask)

This parameter represents the base mask to which mask2 will be aligned. It serves as the reference point for alignment operations. The base mask should be a single-channel image, and its dimensions determine the canvas size for the alignment process. There are no specific minimum or maximum values, but the mask should be appropriately sized for your project.

遮罩2 (Mask2)

Mask2 is the mask that you want to align to the base mask. Like the base mask, it should be a single-channel image. The dimensions of mask2 will affect how it is aligned and positioned relative to the base mask. Ensure that mask2 is correctly sized and formatted for your intended alignment.

对齐方式 (Alignment Method)

This parameter specifies the alignment method to be used for positioning mask2 relative to the base mask. Options include "居中对齐" (center alignment), "左对齐" (left alignment), "右对齐" (right alignment), "上对齐" (top alignment), "下对齐" (bottom alignment), "左上对齐" (top-left alignment), "右上对齐" (top-right alignment), "左下对齐" (bottom-left alignment), and "右下对齐" (bottom-right alignment). Each option determines a different alignment strategy, allowing for flexible positioning of mask2.

🐳遮罩对齐扩展 Output Parameters:

Aligned Mask

The output is the aligned version of mask2, positioned according to the specified alignment method relative to the base mask. This output is a single-channel image that reflects the new position of mask2 on the canvas defined by the base mask. The aligned mask can be used in further processing or compositing tasks, providing a seamless integration of the two masks.

🐳遮罩对齐扩展 Usage Tips:

  • To achieve precise alignment, ensure that both the base mask and mask2 are correctly sized and formatted as single-channel images.
  • Experiment with different alignment methods to find the best fit for your artistic composition, especially when working with complex mask arrangements.
  • Use center alignment for symmetrical compositions, and edge or corner alignments for more structured or grid-like layouts.

🐳遮罩对齐扩展 Common Errors and Solutions:

"Mask dimensions do not match"

  • Explanation: This error occurs when the dimensions of the base mask and mask2 are incompatible for the chosen alignment method.
  • Solution: Ensure that both masks are appropriately sized and formatted as single-channel images. Adjust the dimensions if necessary to match the alignment requirements.

"Invalid alignment method"

  • Explanation: This error indicates that the specified alignment method is not recognized or supported by the node.
  • Solution: Double-check the alignment method parameter to ensure it matches one of the supported options, such as "居中对齐", "左对齐", etc. Correct any typos or unsupported values.

🐳遮罩对齐扩展 Related Nodes

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

🐳遮罩对齐扩展