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-CustomNodePacks > Advanced Paint Canvas (C2C)

ComfyUI Node: Advanced Paint Canvas (C2C)

Class Name

MECAdvancedPaintCanvas

Category
C2C/Paint
Author
Code2Collapse (Account age: 1184days)
Extension
ComfyUI-CustomNodePacks
Latest Updated
2026-07-29
Github Stars
0.05K

How to Install ComfyUI-CustomNodePacks

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

Advanced Paint Canvas (C2C) Description

Interactive tool for artists to create advanced procedural masks with precise control over characteristics for compositing and creative work.

Advanced Paint Canvas (C2C):

The MECAdvancedPaintCanvas node is an interactive tool designed for artists who want to leverage advanced procedural mask mathematics similar to those found in Nuke, a popular compositing software. This node provides a dynamic canvas where you can paint directly, and it processes your strokes to create sophisticated masks. The canvas captures your artwork as a base64-encoded PNG, which is then decoded and optionally composited over a reference image. The node processes the alpha channel of your painted strokes through a series of stages, including raw mask creation, hardness adjustment, expansion, and blurring, to produce a refined mask. This approach allows for precise control over the mask's characteristics, making it ideal for tasks that require detailed masking, such as compositing, inpainting, or any creative work that benefits from procedural mask manipulation.

Advanced Paint Canvas (C2C) Input Parameters:

alpha

The alpha parameter represents the transparency channel of the painted strokes on the canvas. It is a crucial input as it determines the initial mask's opacity, with values normalized between 0 and 1. A value of 0 indicates full transparency, while 1 indicates full opacity. This parameter is essential for defining the base mask that will undergo further processing stages.

hardness

The hardness parameter controls the threshold at which painted pixels become fully opaque. It ranges from 0.0 to 1.0, where a higher value results in a more solid inner core of the mask. Pixels with brightness above the threshold `(1

  • hardness)` are clamped to 1.0, creating a distinct boundary within the mask. This parameter is vital for achieving sharp edges and precise mask delineation.

expansion

The expansion parameter dictates how much the mask should grow or shrink. It is an integer value that specifies the number of pixels by which the mask should be expanded. Positive values increase the mask size, while negative values decrease it. This parameter is useful for adjusting the mask's coverage area, allowing for fine-tuning of the mask's influence on the underlying image.

blur_radius

The blur_radius parameter defines the radius of the blur applied to the mask. It is a floating-point value that determines the extent of the blur effect, with larger values resulting in a more pronounced blur. This parameter helps in softening the mask edges, creating a smoother transition between masked and unmasked areas.

blur_strength

The blur_strength parameter controls the intensity of the blur effect applied to the mask. It is a floating-point value that adjusts the strength of the blur, with higher values leading to a more significant blurring effect. This parameter is essential for achieving the desired level of softness in the mask, allowing for subtle blending and integration with the background.

Advanced Paint Canvas (C2C) Output Parameters:

processed_mask

The processed_mask is the final output of the node, representing the refined mask derived from the painted strokes. It incorporates all the adjustments made through the hardness, expansion, and blur stages, resulting in a mask that is ready for use in compositing or other creative applications. This output is crucial for artists who need precise and customizable masks for their projects.

Advanced Paint Canvas (C2C) Usage Tips:

  • Experiment with the hardness parameter to achieve the desired edge sharpness in your mask. A higher hardness value will create a more defined boundary, which can be useful for isolating specific areas in your artwork.
  • Use the expansion parameter to adjust the mask's coverage area. This can be particularly helpful when you need to fine-tune the mask's influence on the underlying image, either by expanding it to cover more area or contracting it for a tighter fit.
  • Adjust the blur_radius and blur_strength parameters to control the softness of the mask edges. This is especially useful for creating smooth transitions and avoiding harsh lines in your final composition.

Advanced Paint Canvas (C2C) Common Errors and Solutions:

Canvas decode failed

  • Explanation: This error occurs when the node fails to decode the base64-encoded PNG data from the canvas. It could be due to corrupted data or an issue with the encoding process.
  • Solution: Ensure that the canvas data is correctly encoded and not corrupted. If the problem persists, try clearing the canvas and starting a new painting session to generate fresh data.

Invalid hardness value

  • Explanation: This error arises when the hardness parameter is set outside its valid range of 0.0 to 1.0.
  • Solution: Check the hardness value and ensure it is within the acceptable range. Adjust the value accordingly to avoid this error.

Expansion value out of range

  • Explanation: This error occurs when the expansion parameter is set to an excessively large or small value, causing the mask to expand or contract beyond reasonable limits.
  • Solution: Review the expansion value and set it to a more moderate number that aligns with the intended mask size adjustments.

Advanced Paint Canvas (C2C) Related Nodes

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

Advanced Paint Canvas (C2C)