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 > ComfyUI-RefineNode > RefineNode Match Product Angle

ComfyUI Node: RefineNode Match Product Angle

Class Name

RefineNodeMatchProductAngle

Category
RefineNode/Transform
Author
1Kynx (Account age: 102days)
Extension
ComfyUI-RefineNode
Latest Updated
2026-05-10
Github Stars
0.02K

How to Install ComfyUI-RefineNode

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

RefineNode Match Product Angle Description

Align images by matching principal axis angles of masks for orientation consistency in image compositing workflows.

RefineNode Match Product Angle:

The RefineNodeMatchProductAngle is designed to align images by matching the principal axis angles of a source mask and a reference mask. This node is particularly useful in scenarios where you need to ensure that two images or their masked regions are oriented similarly, which can be crucial for tasks like image compositing or alignment in artistic workflows. By calculating the principal axis angles of the masks, the node determines the necessary rotation to align the source image with the reference. This alignment process helps maintain consistency in orientation across different images, enhancing the visual coherence of the final output.

RefineNode Match Product Angle Input Parameters:

image

The image parameter expects a tensor representation of the image you wish to align. This image serves as the primary subject that will be rotated to match the orientation of the reference mask. The alignment process is crucial for ensuring that the visual elements in the image are correctly oriented relative to the reference.

source_mask

The source_mask parameter is a tensor that defines the region of interest within the source image. This mask is used to calculate the principal axis angle, which is essential for determining how the image should be rotated to achieve alignment with the reference mask.

reference_mask

The reference_mask parameter is a tensor representing the region of interest in the reference image. The principal axis angle of this mask is used as the target orientation for aligning the source image. This ensures that the source image is rotated to match the orientation of the reference.

canvas_expand

The canvas_expand parameter controls the expansion of the canvas during the rotation process. It can be a float, int, or a list of floats or ints, and it determines how much additional space is added around the image to accommodate the rotation. This parameter helps prevent clipping of the image content during rotation.

RefineNode Match Product Angle Output Parameters:

output_images

The output_images parameter provides the aligned images as a list of PIL images. These images have been rotated to match the orientation of the reference mask, ensuring consistent alignment across different visual elements.

output_masks

The output_masks parameter outputs the aligned masks as a list of PIL images. These masks correspond to the rotated images and maintain the same orientation as the reference mask, ensuring that the regions of interest are correctly aligned.

angles

The angles parameter is a list of floats representing the rotation angles applied to each image. These angles indicate the degree of rotation needed to align the source image with the reference mask, providing insight into the alignment process.

RefineNode Match Product Angle Usage Tips:

  • Ensure that both the source and reference masks are well-defined and accurately represent the regions of interest to achieve optimal alignment results.
  • Use the canvas_expand parameter to prevent clipping of image content during rotation, especially if the rotation angle is significant.
  • Consider preprocessing your images and masks to enhance contrast and clarity, which can improve the accuracy of the principal axis angle calculation.

RefineNode Match Product Angle Common Errors and Solutions:

"Connect at least one mask input."

  • Explanation: This error occurs when neither the source mask nor the reference mask is provided, which are essential for calculating the principal axis angles.
  • Solution: Ensure that you provide at least one valid mask input for both the source and reference images to enable the alignment process.

"Invalid angle value."

  • Explanation: This error might occur if the angle calculation results in a non-finite value, possibly due to poorly defined masks.
  • Solution: Verify that your masks are correctly defined and contain sufficient detail to calculate a valid principal axis angle. Consider refining the mask boundaries or increasing the contrast.

RefineNode Match Product Angle Related Nodes

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

RefineNode Match Product Angle