Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Practical-Tools > Mask Brightness

ComfyUI Node: Mask Brightness

Class Name

wcx_MaskBrightness

Category
Practical-Tools/Mask
Author
wenchengxiang (Account age: 0days)
Extension
ComfyUI-Practical-Tools
Latest Updated
2026-11-03
Github Stars
0.0K

How to Install ComfyUI-Practical-Tools

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

Mask Brightness Description

Scales mask strength by a brightness factor, clamping values to 0–1 while preserving shape.

Mask Brightness:

This node adjusts the strength of a mask by multiplying its values by a brightness factor, then limiting the result to the range from 0 to 1. It can make partially masked areas stronger or weaker while preserving the mask’s shape. Values that reach the upper limit stay at 1, so increasing brightness can cause lighter areas to become equally strong rather than retaining every subtle difference.

Mask Brightness Input Parameters:

mask

The MASK to adjust. Each value represents a point in the mask and is multiplied by the brightness setting. The node does not alter the mask’s dimensions or apply a blur; it changes the values already present. The source specifies no default, minimum, or maximum for this input. Regardless of the incoming values, the resulting mask is limited to values from 0 to 1.

brightness

Controls how strongly the mask values are multiplied. The default is 1.0, the minimum is 0.0, the maximum is 2.0, and the adjustment step is 0.01. At 1.0, values already between 0 and 1 remain unchanged. Below 1.0, nonnegative mask values become weaker; at 0.0, every resulting value is 0. Above 1.0, values become stronger, but any result above 1 is capped at 1. For example, an incoming value of 0.4 becomes 0.6 at brightness 1.5, while an incoming value of 0.8 becomes 1.0 rather than 1.2.

Mask Brightness Output Parameters:

mask

The adjusted MASK, returned through the node’s only output socket. Each output value is the corresponding input value multiplied by brightness and then clamped to the range from 0 to 1. A value of 0 remains 0 at any permitted brightness setting, while a value that reaches 1 cannot increase further. Connect this output wherever you need the adjusted mask; its practical effect depends on how the next node uses mask values.

Mask Brightness Usage Tips:

  • Start at brightness 1.0 to keep a mask that already contains values from 0 to 1 unchanged, then adjust in 0.01 steps while checking the result.
  • Use a value below 1.0 when partially masked areas are too strong. For example, 0.5 halves each incoming value before the result is clamped.
  • Use a value above 1.0 to strengthen partially masked areas. Check for lost variation in lighter areas: once values reach 1, increasing brightness cannot distinguish them further.
  • Set brightness to 0.0 when you need an all-zero result from this node. If you only want to soften a mask, choose a value between 0 and 1 instead.
  • This node does not turn zero-valued areas into nonzero areas, blur boundaries, or change the mask’s shape. Use other mask operations if your task requires those changes.

Mask Brightness Common Errors and Solutions:

Missing required input: mask

  • Explanation: The node requires a MASK to process. The exact validation message depends on the interface running the node.
  • Solution: Connect a MASK-producing node to the mask input and confirm the connection reaches the correct socket.

Missing required input: brightness

  • Explanation: The node requires a brightness value. Its configured default is 1.0, but an incomplete or invalid workflow may still report a missing value.
  • Solution: Set brightness to a valid number; use 1.0 as a starting point.

Invalid value for brightness

  • Explanation: The declared setting accepts a FLOAT from 0.0 to 2.0. An out-of-range or nonnumeric value may be rejected by the interface; the exact error wording is not defined in this node’s source.
  • Solution: Enter a numeric value within 0.0–2.0, using 0.01 increments when adjusting the control.

Invalid input type for mask

  • Explanation: The node multiplies mask by a number and then applies torch.clamp. An incompatible value cannot complete those operations. The exact runtime message depends on the value supplied.
  • Solution: Connect an output of type MASK rather than text, an image socket, or another incompatible value.

Result appears unchanged or fully saturated

  • Explanation: These are possible visual outcomes, not error messages defined by the source. Brightness 1.0 leaves values already in the 0–1 range unchanged; higher settings cap any multiplied value above 1 at 1. Zero-valued areas also remain zero.
  • Solution: Check the incoming mask and try a moderate setting above or below 1.0. If you need to add coverage to zero-valued areas or preserve detail after values reach 1, this multiplication-based adjustment alone cannot do that.

Mask Brightness Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Practical-Tools
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 Models, enabling artists to harness the latest AI tools to create incredible art.

Mask Brightness