ComfyUI  >  Nodes  >  comfyui-mixlab-nodes >  OutlineMask

ComfyUI Node: OutlineMask

Class Name

OutlineMask

Category
♾️Mixlab/Mask
Author
shadowcz007 (Account age: 3323 days)
Extension
comfyui-mixlab-nodes
Latest Updated
6/23/2024
Github Stars
0.9K

How to Install comfyui-mixlab-nodes

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

OutlineMask Description

Enhance mask images with customizable outline effect for distinct boundaries and visual appeal.

OutlineMask:

The OutlineMask node is designed to enhance your mask images by adding an outline around the masked areas. This can be particularly useful for creating distinct boundaries or emphasizing specific regions within your artwork. The node works by expanding and contracting the mask to generate an outline effect, which can be customized in terms of width and corner style. This functionality is essential for artists looking to add a professional touch to their compositions, ensuring that masked areas are clearly defined and visually appealing.

OutlineMask Input Parameters:

mask

The mask parameter is the primary input for the node, representing the mask image that you want to outline. This input should be a binary or grayscale image where the masked areas are typically represented by white (or high intensity) and the unmasked areas by black (or low intensity). The quality and detail of the mask will directly affect the resulting outline.

outline_width

The outline_width parameter determines the thickness of the outline to be added around the mask. It accepts integer values with a default of 10, a minimum of 1, and a maximum defined by the system's maximum resolution (MAX_RESOLUTION). Adjusting this value allows you to control how prominent the outline will be, with larger values creating thicker outlines.

tapered_corners

The tapered_corners parameter is a boolean option that specifies whether the corners of the outline should be tapered (smoothed) or not. The default value is True, which means the corners will be smoothed to create a more natural and less jagged appearance. Setting this to False will result in sharper, more angular corners.

OutlineMask Output Parameters:

MASK

The output of the OutlineMask node is a modified mask image with the added outline. This output retains the same format as the input mask, but with the outlined areas clearly defined. The resulting mask can be used in subsequent processing steps or directly in your artwork to highlight specific regions.

OutlineMask Usage Tips:

  • Experiment with different outline_width values to achieve the desired thickness for your outlines. Thicker outlines can make masked areas more prominent, while thinner outlines provide a subtle enhancement.
  • Use the tapered_corners option to smooth out the corners of your outlines, especially if you are working with organic shapes or want a more polished look.
  • Combine the OutlineMask node with other mask processing nodes, such as FeatherMask or InvertMask, to create complex and visually appealing effects.

OutlineMask Common Errors and Solutions:

"Invalid mask input"

  • Explanation: This error occurs when the input mask is not in the expected format (binary or grayscale).
  • Solution: Ensure that your input mask is a binary or grayscale image. Convert your image to the appropriate format before using the OutlineMask node.

"Outline width out of range"

  • Explanation: The outline_width value is set outside the allowed range.
  • Solution: Adjust the outline_width parameter to be within the specified range (1 to MAX_RESOLUTION).

"Mask processing failed"

  • Explanation: An internal error occurred during the mask processing.
  • Solution: Check the input mask for any anomalies or corruption. Ensure that the mask image is correctly formatted and try again. If the problem persists, consider reducing the complexity of the mask or the outline width.

OutlineMask Related Nodes

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