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-Desert-Pixel-Nodes > DP Mask Settings

ComfyUI Node: DP Mask Settings

Class Name

DP Mask Settings

Category
DP/mask
Author
DesertPixelAi (Account age: 840days)
Extension
ComfyUI-Desert-Pixel-Nodes
Latest Updated
2025-06-22
Github Stars
0.03K

How to Install ComfyUI-Desert-Pixel-Nodes

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

DP Mask Settings Description

The DP Mask Settings node refines image masks for seamless transitions and realistic compositions.

DP Mask Settings:

The DP Mask Settings node is designed to provide advanced manipulation of image masks, allowing you to refine and adjust masks for better integration into your digital artwork. This node is particularly useful for AI artists who need to enhance or modify masks to achieve specific visual effects or to prepare images for further processing. By offering functionalities such as mask expansion and blurring, the node enables you to control the mask's boundaries and smoothness, which can be crucial for achieving seamless transitions and realistic compositions. The node's ability to convert images to masks and vice versa adds versatility, making it a valuable tool in your creative workflow.

DP Mask Settings Input Parameters:

expand

The expand parameter allows you to adjust the size of the mask by expanding or contracting its boundaries. This is achieved through dilation or erosion processes, where a positive value will expand the mask outward, and a negative value will contract it inward. The parameter accepts integer values ranging from -256 to 256, with a default value of 0, meaning no expansion or contraction. Adjusting this parameter can help in refining the mask's edges to better fit the desired area of interest in your image.

blur

The blur parameter controls the amount of Gaussian blur applied to the mask, which can help in softening the edges and creating smoother transitions. This parameter accepts integer values from 0 to 256, with a default value of 0, indicating no blur. Increasing the blur value will result in a more pronounced smoothing effect, which can be useful for blending the mask seamlessly into the surrounding image or reducing harsh edges.

mask

The mask parameter is an optional input that allows you to provide an existing mask for processing. If no mask is provided, the node can generate one from the image_input. This flexibility enables you to either refine an existing mask or create a new one from an image, depending on your project's needs.

image_input

The image_input parameter is an optional input that allows you to provide an image from which a mask will be generated if no mask is supplied. This feature is particularly useful when you want to create a mask based on the luminance or specific features of an image, providing a starting point for further mask refinement.

DP Mask Settings Output Parameters:

mask

The mask output is the processed mask after applying the specified expansion and blur settings. This output is crucial for further image processing tasks, as it defines the areas of interest or exclusion in your artwork. The refined mask can be used in various applications, such as compositing, masking effects, or as input for other nodes in your workflow.

image

The image output is the visual representation of the processed mask, converted into an RGB image format. This output allows you to visually inspect the mask's effect and ensure it meets your artistic requirements. It provides a convenient way to preview the mask's impact on your image composition before applying it to your final artwork.

DP Mask Settings Usage Tips:

  • Use the expand parameter to fine-tune the mask's boundaries, ensuring it accurately covers the desired area without affecting unintended regions.
  • Apply the blur parameter to soften the mask's edges, which can help in creating more natural transitions and reducing the appearance of harsh lines in your composition.
  • When starting with an image, use the image_input to generate a mask that captures the essential features or luminance, providing a solid foundation for further refinement.

DP Mask Settings Common Errors and Solutions:

"Either mask or image_input must be provided"

  • Explanation: This error occurs when neither a mask nor an image input is supplied to the node, leaving it without any data to process.
  • Solution: Ensure that you provide either a mask or an image_input to the node. If you intend to create a mask from an image, make sure the image_input is correctly connected.

"Invalid mask shape"

  • Explanation: This error may arise if the provided mask does not have the expected dimensions or format, which can prevent proper processing.
  • Solution: Verify that the mask input has the correct shape, typically a 2D array for grayscale masks. If necessary, adjust the mask's dimensions to match the expected input format.

DP Mask Settings Related Nodes

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

DP Mask Settings