ComfyUI > Nodes > Allor Plugin > ImageCompositeRelativeByContainer

ComfyUI Node: ImageCompositeRelativeByContainer

Class Name

ImageCompositeRelativeByContainer

Category
image/composite
Author
Nourepide (Account age: 2900days)
Extension
Allor Plugin
Latest Updated
2024-05-22
Github Stars
0.2K

How to Install Allor Plugin

Install this extension via the ComfyUI Manager by searching for Allor Plugin
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Allor Plugin 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageCompositeRelativeByContainer Description

Facilitates compositing two images in a container with relative positioning for dynamic layouts.

ImageCompositeRelativeByContainer:

The ImageCompositeRelativeByContainer node is designed to facilitate the compositing of two images within a specified container, using relative positioning. This node allows you to place images A and B within a container based on percentage offsets, making it easier to manage dynamic layouts where the container size may vary. The primary benefit of this node is its ability to handle image placement in a flexible and intuitive manner, ensuring that the images are positioned correctly relative to the container's dimensions. This is particularly useful for creating complex image compositions where precise control over the placement of each image is required.

ImageCompositeRelativeByContainer Input Parameters:

container

The container parameter represents the canvas or background on which the images will be composited. It defines the overall dimensions within which the images will be placed. The size of the container must be large enough to accommodate the maximum dimensions of the images being composited. If the container is smaller than the largest image, an error will be raised.

images_a

The images_a parameter is the first set of images to be composited. These images will be placed within the container based on the specified relative offsets. The dimensions of these images are used to calculate their placement within the container.

images_b

The images_b parameter is the second set of images to be composited. Similar to images_a, these images will be placed within the container based on the specified relative offsets. The dimensions of these images are also used to calculate their placement within the container.

images_a_x

The images_a_x parameter specifies the horizontal offset for images_a as a percentage of the container's width. This determines how far from the left edge of the container the images will be placed. The value should be a float between 0.0 and 1.0, where 0.0 represents the left edge and 1.0 represents the right edge.

images_a_y

The images_a_y parameter specifies the vertical offset for images_a as a percentage of the container's height. This determines how far from the top edge of the container the images will be placed. The value should be a float between 0.0 and 1.0, where 0.0 represents the top edge and 1.0 represents the bottom edge.

images_b_x

The images_b_x parameter specifies the horizontal offset for images_b as a percentage of the container's width. This determines how far from the left edge of the container the images will be placed. The value should be a float between 0.0 and 1.0, where 0.0 represents the left edge and 1.0 represents the right edge.

images_b_y

The images_b_y parameter specifies the vertical offset for images_b as a percentage of the container's height. This determines how far from the top edge of the container the images will be placed. The value should be a float between 0.0 and 1.0, where 0.0 represents the top edge and 1.0 represents the bottom edge.

background

The background parameter determines which image set (images_a or images_b) will be used as the background layer in the compositing process. This affects the layering order of the images when they are combined.

method

The method parameter specifies the compositing method to be used. This could include various blending or overlay techniques to achieve the desired visual effect when combining the images.

ImageCompositeRelativeByContainer Output Parameters:

composited_image

The composited_image parameter is the final output of the node, representing the combined image created by compositing images_a and images_b within the specified container. This image will reflect the relative positioning and compositing method applied to the input images.

ImageCompositeRelativeByContainer Usage Tips:

  • Ensure that the container size is large enough to accommodate the largest dimensions of the input images to avoid errors.
  • Use percentage values for the images_a_x, images_a_y, images_b_x, and images_b_y parameters to achieve flexible and dynamic image placements.
  • Experiment with different background and method settings to achieve various visual effects and layering orders.

ImageCompositeRelativeByContainer Common Errors and Solutions:

Container can't be smaller than max width or height of images.

  • Explanation: This error occurs when the container size is smaller than the largest dimensions of the input images.
  • Solution: Ensure that the container dimensions are at least as large as the largest width and height of the input images.

Invalid percentage value for image offset.

  • Explanation: This error occurs when the percentage values for the image offsets are outside the range of 0.0 to 1.0.
  • Solution: Verify that the images_a_x, images_a_y, images_b_x, and images_b_y parameters are set to values between 0.0 and 1.0.

ImageCompositeRelativeByContainer Related Nodes

Go back to the extension to check out more related nodes.
Allor Plugin
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.