ComfyUI > Nodes > ComfyUI_ColorMod > ColorMod (edges)

ComfyUI Node: ColorMod (edges)

Class Name

ColorModEdges

Category
ColorMod
Author
city96 (Account age: 552days)
Extension
ComfyUI_ColorMod
Latest Updated
2024-08-06
Github Stars
0.07K

How to Install ComfyUI_ColorMod

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

ColorMod (edges) Description

Adjust image edges' intensity values for enhanced contrast and artistic effects, with clipping option for valid output range.

ColorMod (edges):

The ColorModEdges node is designed to modify the edges of an image by adjusting the intensity values based on specified parameters. This node is particularly useful for enhancing or diminishing the contrast of edges within an image, allowing for more dynamic and visually appealing results. By manipulating the low, pivot, and high values, you can control how the image's intensity values are redistributed, which can be beneficial for various artistic effects or preprocessing steps in image analysis. The node also offers an option to clip the output values to ensure they remain within a valid range, maintaining the integrity of the image data.

ColorMod (edges) Input Parameters:

image

The image parameter is the input image that you want to process. This image should be in a format compatible with the node, typically a tensor representing the image data.

low

The low parameter adjusts the intensity values below the pivot point. It has a default value of 1.0, with a minimum of 0.0 and a maximum of 2.0, and can be adjusted in steps of 0.01. Lowering this value will decrease the intensity of the lower range, while increasing it will enhance the lower intensity values.

pivot

The pivot parameter sets the pivot point around which the intensity values are adjusted. It has a default value of 0.5, with a minimum of 0.0 and a maximum of 1.0, and can be adjusted in steps of 0.01. This value determines the threshold that separates the low and high intensity adjustments.

high

The high parameter adjusts the intensity values above the pivot point. It has a default value of 1.0, with a minimum of 0.0 and a maximum of 2.0, and can be adjusted in steps of 0.01. Lowering this value will decrease the intensity of the higher range, while increasing it will enhance the higher intensity values.

clip

The clip parameter is a boolean option that determines whether the output values should be clipped to the range [0.0, 1.0]. The default value is True. When set to True, the output values are constrained within this range, preventing any overflow or underflow in the image data.

ColorMod (edges) Output Parameters:

image

The image parameter is the processed image output from the node. This image will have its intensity values adjusted based on the specified low, pivot, and high parameters, and optionally clipped to ensure they remain within a valid range. The output image retains the same dimensions and format as the input image.

ColorMod (edges) Usage Tips:

  • Experiment with different low, pivot, and high values to achieve the desired contrast enhancement or reduction in your image. Small adjustments can lead to significant changes in the visual output.
  • Use the clip parameter to ensure that the output image values remain within a valid range, especially if you are planning to use the image in further processing steps.
  • Combining this node with other color modification nodes can create complex and visually appealing effects, enhancing the overall quality of your artwork.

ColorMod (edges) Common Errors and Solutions:

ValueError: Unknown mode 'mode'

  • Explanation: This error occurs when an invalid mode is passed to the node.
  • Solution: Ensure that the mode parameter is set to one of the valid options: "clip", "normalize", or "compress".

AssertionError: Color conversion failed! Missing cv2 op 'COLOR_src2dst'

  • Explanation: This error occurs when the specified color conversion operation is not available in the installed version of OpenCV.
  • Solution: Verify that the source and destination color spaces are supported by your version of OpenCV. Update OpenCV if necessary.

RuntimeError: Expected tensor for argument #1 'input' to have the same type as tensor for argument #2 'other'; but type torch.FloatTensor does not equal torch.cuda.FloatTensor

  • Explanation: This error occurs when there is a mismatch in the tensor types, typically between CPU and GPU tensors.
  • Solution: Ensure that all tensors are on the same device (either all on CPU or all on GPU) before performing operations on them. Use .to(device) to move tensors to the appropriate device.

ColorMod (edges) Related Nodes

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