ComfyUI  >  Nodes  >  ComfyI2I >  Color Transfer

ComfyUI Node: Color Transfer

Class Name

Color Transfer

Category
I2I
Author
ManglerFTW (Account age: 664 days)
Extension
ComfyI2I
Latest Updated
6/14/2024
Github Stars
0.1K

How to Install ComfyI2I

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

Color Transfer Description

Seamlessly transfer color palettes between images for consistent visual aesthetics using advanced color matching techniques.

Color Transfer:

The Color Transfer node is designed to seamlessly transfer the color palette from a source image to a target image, allowing you to harmonize the color schemes between different images. This node is particularly useful for creating consistent visual aesthetics across multiple images or for applying a specific color style from one image to another. By leveraging advanced color matching techniques, the Color Transfer node ensures that the transferred colors maintain the natural look and feel of the target image, enhancing its visual appeal without introducing unnatural artifacts. This node is ideal for AI artists looking to achieve a cohesive color theme in their artwork or to experiment with different color styles effortlessly.

Color Transfer Input Parameters:

source_image

The source image from which the color palette will be extracted. This image serves as the reference for the color transfer process. The colors from this image will be applied to the target image to achieve the desired color harmony.

target_image

The target image to which the color palette from the source image will be applied. This image will undergo color transformation to match the color scheme of the source image, resulting in a visually cohesive output.

no_of_colors

Specifies the number of colors to be extracted from the source image and applied to the target image. This parameter controls the granularity of the color transfer process. A higher number of colors can result in a more detailed and accurate color transfer, while a lower number of colors can create a more stylized effect. The minimum value is 1, and the maximum value depends on the color diversity in the source image.

blur_radius

Defines the radius of the blur applied to the transferred colors. Blurring can help to smooth out transitions between different colors, creating a more natural and visually pleasing result. The minimum value is 0 (no blur), and higher values increase the blur effect.

blur_amount

Controls the intensity of the blur effect applied to the transferred colors. This parameter works in conjunction with the blur radius to determine the overall smoothness of the color transitions. The minimum value is 0 (no blur), and higher values increase the blur intensity.

strength

Determines the strength of the color transfer effect. A higher strength value results in a more pronounced color transfer, while a lower strength value creates a subtler effect. This parameter allows you to fine-tune the intensity of the color transformation to achieve the desired visual impact.

gamma

Adjusts the gamma correction applied to the final image. Gamma correction can enhance the overall brightness and contrast of the image, making the colors appear more vibrant. The minimum value is 0.1, and the maximum value is 10, with a default value of 1 (no gamma correction).

contrast

Controls the contrast adjustment applied to the final image. Increasing the contrast can make the colors more distinct and vivid, while decreasing the contrast can create a softer look. The minimum value is -100, and the maximum value is 100, with a default value of 0 (no contrast adjustment).

brightness

Adjusts the brightness of the final image. This parameter allows you to make the image lighter or darker to achieve the desired visual effect. The minimum value is -100, and the maximum value is 100, with a default value of 0 (no brightness adjustment).

mask (optional)

An optional mask image that defines the areas of the target image where the color transfer should be applied. The mask can be used to selectively apply the color transfer effect to specific regions of the image, leaving other areas unchanged. If no mask is provided, the color transfer will be applied to the entire target image.

Color Transfer Output Parameters:

final_img_tensor

The final image tensor containing the target image with the transferred color palette. This output represents the result of the color transfer process, with the colors from the source image applied to the target image. The output image maintains the original structure and details of the target image while adopting the color scheme of the source image.

Color Transfer Usage Tips:

  • Experiment with different values for no_of_colors to achieve various artistic effects. A lower number of colors can create a more stylized look, while a higher number of colors can result in a more accurate color transfer.
  • Use the mask parameter to apply the color transfer effect selectively to specific regions of the target image. This can be useful for creating complex compositions where only certain areas need color adjustment.
  • Adjust the gamma, contrast, and brightness parameters to fine-tune the overall appearance of the final image. These adjustments can help enhance the visual impact of the color transfer.

Color Transfer Common Errors and Solutions:

"Invalid number of colors specified"

  • Explanation: The value provided for no_of_colors is either too low or exceeds the number of unique colors in the source image.
  • Solution: Ensure that the no_of_colors parameter is set to a value that is within the range of unique colors present in the source image.

"Source or target image not provided"

  • Explanation: One or both of the required images (source or target) are missing.
  • Solution: Make sure to provide both the source image and the target image as input parameters to the node.

"Invalid mask dimensions"

  • Explanation: The dimensions of the provided mask do not match the dimensions of the target image.
  • Solution: Ensure that the mask image has the same dimensions as the target image to apply the color transfer effect correctly.

"Blur radius or blur amount out of range"

  • Explanation: The values provided for blur_radius or blur_amount are outside the acceptable range.
  • Solution: Check the values for blur_radius and blur_amount and ensure they are within the specified range. Adjust them to appropriate values to achieve the desired blur effect.

Color Transfer Related Nodes

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