ComfyUI > Nodes > ComfyUI-NegiTools > Composite Images 🧅

ComfyUI Node: Composite Images 🧅

Class Name

NegiTools_CompositeImages

Category
utils
Author
natto-maki (Account age: 395days)
Extension
ComfyUI-NegiTools
Latest Updated
2024-09-15
Github Stars
0.03K

How to Install ComfyUI-NegiTools

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

Composite Images 🧅 Description

Versatile image blending node with various compositing methods for AI artists to create unique visuals.

Composite Images 🧅:

NegiTools_CompositeImages is a versatile node designed to combine two images using various compositing methods. This node allows you to blend images in multiple ways, such as multiplying, dividing, overlaying, and more, to achieve different visual effects. It is particularly useful for AI artists who want to experiment with image blending techniques to create unique and compelling visuals. The node supports a range of methods that can be selected to determine how the images are combined, providing flexibility and creative control. Additionally, it includes options for adjusting the transparency of the composite and applying a mask to control the blending effect more precisely.

Composite Images 🧅 Input Parameters:

image_B

This parameter represents the background image that will be used in the compositing process. It serves as the base layer onto which the foreground image will be applied using the selected method.

image_F

This parameter represents the foreground image that will be combined with the background image. The way this image interacts with the background image depends on the chosen compositing method.

method

This parameter determines the compositing method used to blend the foreground and background images. Available options include "default", "thru_B", "thru_F", "multiply", "divide", "screen", "overlay", "dodge", "burn", "hard_light", "soft_light", "difference", "add", "subtract", "lighten", and "darken". Each method applies a different mathematical operation to combine the images, resulting in various visual effects.

alpha

This parameter controls the transparency of the composite image. It is a float value ranging from 0.0 to 1.0, with a default value of 1.0. A value of 0.0 makes the composite fully transparent, while a value of 1.0 makes it fully opaque. The alpha value can be adjusted to achieve the desired level of blending between the images.

mask_opt

This optional parameter allows you to provide a mask that controls the blending effect. The mask is applied to the composite image, with the alpha value modulating the transparency based on the mask's values. This can be useful for creating more complex and nuanced blending effects.

Composite Images 🧅 Output Parameters:

IMAGE

The output of this node is the composite image resulting from the blending of the background and foreground images using the selected method. The output image reflects the combined visual effect based on the chosen compositing method, alpha value, and optional mask.

Composite Images 🧅 Usage Tips:

  • Experiment with different compositing methods to achieve various visual effects. For example, use "multiply" to darken the image or "screen" to lighten it.
  • Adjust the alpha parameter to fine-tune the transparency of the composite image, allowing for subtle blending effects.
  • Utilize the mask_opt parameter to apply a mask and control the blending effect more precisely, enabling more complex and creative compositions.

Composite Images 🧅 Common Errors and Solutions:

ValueError

  • Explanation: This error occurs when the resulting composite image (image_r) is None, indicating that the selected method did not produce a valid output.
  • Solution: Ensure that you have selected a valid compositing method and that both input images (image_B and image_F) are correctly provided.

TypeError

  • Explanation: This error may occur if the input images are not in the expected format or type.
  • Solution: Verify that the input images are correctly formatted and compatible with the node's requirements. Ensure that the images are provided as numpy arrays or tensors as expected by the node.

Invalid alpha value

  • Explanation: This error occurs if the alpha parameter is set to a value outside the valid range (0.0 to 1.0).
  • Solution: Adjust the alpha parameter to a value within the valid range to ensure proper transparency control.

Composite Images 🧅 Related Nodes

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