ComfyUI > Nodes > ComfyUI-YCNodes > Remap Mask Range (YC)

ComfyUI Node: Remap Mask Range (YC)

Class Name

YCRemapMaskRange

Category
YCNode/Mask
Author
yichengup (Account age: 473days)
Extension
ComfyUI-YCNodes
Latest Updated
2025-06-03
Github Stars
0.02K

How to Install ComfyUI-YCNodes

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

Run ComfyUI Online

Remap Mask Range (YC) Description

Adjust mask value range for flexibility and control in AI art.

Remap Mask Range (YC):

The YCRemapMaskRange node is designed to adjust the range of values within a mask, allowing you to redefine the minimum and maximum values that the mask can take. This is particularly useful in scenarios where you need to normalize or scale mask values to fit a specific range, enhancing the flexibility and control over mask data. By remapping the mask values, you can ensure that the mask aligns with the desired intensity levels, which can be crucial for subsequent processing steps or visualizations. This node is an essential tool for AI artists who need to manipulate mask data to achieve specific artistic effects or to prepare data for further processing.

Remap Mask Range (YC) Input Parameters:

mask

The mask parameter represents the input mask that you want to remap. It is the primary data that will be processed by the node. The mask is typically a tensor containing values that represent different levels of intensity or coverage. This parameter is crucial as it forms the basis of the remapping operation, and its values will be adjusted according to the specified min and max parameters.

min

The min parameter defines the new minimum value for the mask after remapping. It allows you to set the lower bound of the mask's value range. The default value is 0.0, with a minimum possible value of -10.0 and a maximum of 1.0. Adjusting this parameter can help in normalizing the mask values or in setting a specific baseline for the mask's intensity levels.

max

The max parameter specifies the new maximum value for the mask after remapping. It sets the upper bound of the mask's value range. The default value is 1.0, with a minimum possible value of 0.0 and a maximum of 10.0. This parameter is essential for scaling the mask values to a desired intensity level, ensuring that the mask's highest values are appropriately adjusted.

Remap Mask Range (YC) Output Parameters:

mask

The output mask is the remapped version of the input mask, with its values adjusted to fit within the specified min and max range. This output is crucial as it provides the modified mask that can be used for further processing or visualization. The remapped mask ensures that the intensity levels are consistent with the desired range, making it suitable for various artistic or technical applications.

Remap Mask Range (YC) Usage Tips:

  • To achieve a normalized mask with values between 0 and 1, set the min parameter to 0.0 and the max parameter to 1.0.
  • If you need to emphasize certain features in the mask, consider setting a higher max value to increase the contrast between different mask regions.
  • Use the min parameter to adjust the baseline intensity of the mask, which can be useful for ensuring that all mask values are above a certain threshold.

Remap Mask Range (YC) Common Errors and Solutions:

Mask value out of range

  • Explanation: This error occurs when the remapped mask values exceed the expected range, possibly due to incorrect min or max settings.
  • Solution: Ensure that the min and max parameters are set within the valid range and that they are appropriate for the input mask's data.

Division by zero

  • Explanation: This error might happen if the maximum value in the input mask is zero, leading to a division by zero during the remapping process.
  • Solution: The node automatically handles this by setting the maximum mask value to 1 if it is zero. Ensure that the input mask is not entirely zero to avoid this situation.

Remap Mask Range (YC) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-YCNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.