ComfyUI > Nodes > ComfyUI > SolidMask

ComfyUI Node: SolidMask

Class Name

SolidMask

Category
mask
Author
ComfyAnonymous (Account age: 598days)
Extension
ComfyUI
Latest Updated
2024-08-12
Github Stars
45.85K

How to Install ComfyUI

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

SolidMask Description

Generate uniform masks with specified values for image processing tasks, controlling transparency and intensity effectively.

SolidMask:

The SolidMask node is designed to generate a uniform mask with a specified value across its entire area. This node is particularly useful when you need a consistent mask for various image processing tasks, such as masking out certain regions or applying uniform effects. By creating a mask with a single value, you can easily control the transparency or intensity of the effect applied to the masked area. The SolidMask node is straightforward to use and provides a reliable way to generate masks with precise dimensions and values, making it an essential tool for AI artists working with image manipulation and compositing.

SolidMask Input Parameters:

value

The value parameter determines the intensity of the mask, ranging from 0.0 to 1.0. A value of 0.0 represents complete transparency, while a value of 1.0 represents full opacity. The default value is set to 1.0, ensuring the mask is fully opaque unless specified otherwise. Adjusting this parameter allows you to control the strength of the mask's effect on the image.

width

The width parameter specifies the width of the mask in pixels. It accepts integer values with a minimum of 1 and a maximum defined by MAX_RESOLUTION. The default width is set to 512 pixels. This parameter allows you to define the horizontal size of the mask, ensuring it fits the dimensions of the target image or region.

height

The height parameter defines the height of the mask in pixels. Similar to the width parameter, it accepts integer values ranging from 1 to MAX_RESOLUTION, with a default value of 512 pixels. This parameter controls the vertical size of the mask, allowing you to match the mask's dimensions to the specific requirements of your project.

SolidMask Output Parameters:

MASK

The output of the SolidMask node is a MASK, which is a tensor filled with the specified value across the defined width and height. This mask can be used in various image processing tasks to uniformly apply effects or isolate regions within an image. The consistent value across the mask ensures predictable and controlled results when used in conjunction with other nodes or image manipulation techniques.

SolidMask Usage Tips:

  • Use the value parameter to control the opacity of the mask, setting it to 1.0 for full opacity or lower values for partial transparency.
  • Adjust the width and height parameters to match the dimensions of the image or region you want to mask, ensuring the mask fits perfectly.
  • Combine the SolidMask node with other nodes, such as InvertMask or FeatherMask, to create more complex masking effects and achieve the desired results.

SolidMask Common Errors and Solutions:

ValueError: "Width and height must be positive integers."

  • Explanation: This error occurs when the width or height parameters are set to values less than 1. - Solution: Ensure that both the width and height parameters are set to positive integers, with a minimum value of 1.

ValueError: "Value must be between 0.0 and 1.0."

  • Explanation: This error is raised when the value parameter is set outside the range of 0.0 to 1.0.
  • Solution: Adjust the value parameter to be within the valid range, ensuring it is between 0.0 and 1.0.

RuntimeError: "Mask creation failed due to invalid dimensions."

  • Explanation: This error can occur if the width or height parameters exceed the maximum allowed resolution.
  • Solution: Verify that the width and height parameters do not exceed the MAX_RESOLUTION limit and adjust them accordingly.

SolidMask Related Nodes

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