ComfyUI  >  Nodes  >  ComfyUI_yanc >  😼> Light Source Mask

ComfyUI Node: 😼> Light Source Mask

Class Name

> Light Source Mask

Category
YANC/😼 Masking
Author
ALatentPlace (Account age: 1499 days)
Extension
ComfyUI_yanc
Latest Updated
7/26/2024
Github Stars
0.0K

How to Install ComfyUI_yanc

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

😼> Light Source Mask Description

Generates mask highlighting image areas based on light intensity for AI artists to isolate and manipulate light-affected regions.

😼> Light Source Mask:

The Light Source Mask node is designed to generate a mask that highlights areas of an image based on light intensity. This node is particularly useful for AI artists who want to isolate and manipulate regions of an image that are affected by light sources. By applying a threshold to the image, the node identifies and enhances areas with higher light intensity, making it easier to apply further effects or adjustments. The node uses a Gaussian blur to smooth the mask, ensuring a natural transition between light and dark areas. This functionality is essential for creating realistic lighting effects and enhancing the overall visual quality of your artwork.

😼> Light Source Mask Input Parameters:

image

The image parameter is the input image from which the light source mask will be generated. This parameter expects an image tensor with dimensions corresponding to batch size, height, width, and color channels. The image serves as the basis for identifying areas of high light intensity.

threshold

The threshold parameter determines the light intensity level above which areas of the image will be included in the mask. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 0.33. A lower threshold will include more areas in the mask, while a higher threshold will be more selective, focusing only on the brightest regions.

😼> Light Source Mask Output Parameters:

mask

The mask output is a tensor that represents the areas of the input image that exceed the specified light intensity threshold. This mask can be used to isolate and manipulate these regions in subsequent processing steps. The mask values range from 0.0 to 1.0, where higher values indicate stronger light intensity.

😼> Light Source Mask Usage Tips:

  • Adjust the threshold parameter to fine-tune the sensitivity of the mask. Lower values will capture more subtle lighting effects, while higher values will focus on the brightest areas.
  • Use the generated mask in combination with other nodes to apply specific effects to the highlighted regions, such as color adjustments or blurring.
  • Experiment with different images and lighting conditions to understand how the threshold parameter affects the mask generation.

😼> Light Source Mask Common Errors and Solutions:

"Input image tensor is not in the expected format"

  • Explanation: This error occurs when the input image does not have the correct dimensions or data type.
  • Solution: Ensure that the input image is a tensor with dimensions corresponding to batch size, height, width, and color channels. Verify that the data type is compatible with the node's requirements.

"Threshold value out of range"

  • Explanation: This error occurs when the threshold parameter is set to a value outside the allowed range of 0.0 to 1.0.
  • Solution: Adjust the threshold parameter to a value within the specified range. The default value is 0.33, which can be a good starting point.

"Gaussian blur kernel size calculation error"

  • Explanation: This error occurs if the calculated kernel size for the Gaussian blur is not an odd number.
  • Solution: The node automatically adjusts the kernel size to ensure it is an odd number. If you encounter this error, it may indicate an issue with the input image dimensions. Verify that the input image dimensions are correct.

😼> Light Source Mask Related Nodes

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