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 > Spline Mask — Edit/Track/Flow-Path (C2C)

ComfyUI Node: Spline Mask — Edit/Track/Flow-Path (C2C)

Class Name

SplineMaskMEC

Category
C2C/Spline
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

Spline Mask — Edit/Track/Flow-Path (C2C) Description

Versatile node for creating and manipulating masks with spline-based techniques in ComfyUI, unifying mask editing, tracking, and procedural effects.

Spline Mask — Edit/Track/Flow-Path (C2C):

The SplineMaskMEC node is a versatile tool designed for creating and manipulating masks using spline-based techniques within the ComfyUI environment. It unifies the functionalities of three previously separate nodes: the SplineMaskEditorMEC for interactive mask editing, the SplineMaskTrackerMEC for tracking masks across multiple frames using optical flow, and the SplinePathFlowMaskMEC for generating procedural effects like ribbons, waves, and dust along a spline path. This node allows you to switch between these modes using a single interface, providing a seamless experience for both static and animated mask creation. The integration of a rich JavaScript spline canvas widget ensures that you can interactively edit control points, making it easier to achieve precise and dynamic mask effects. Whether you are working on a single frame or a sequence of frames, SplineMaskMEC offers a comprehensive solution for mask editing, tracking, and procedural path effects, enhancing your creative workflow with its robust and flexible capabilities.

Spline Mask — Edit/Track/Flow-Path (C2C) Input Parameters:

mode

The mode parameter determines which of the three functionalities of the SplineMaskMEC node is active: editing, tracking, or flow-path generation. This selection dictates the behavior of the node and the type of mask manipulation that will be performed. The available options are edit, track, and flow_path. Choosing the correct mode is crucial for achieving the desired effect, as each mode offers distinct capabilities tailored to specific tasks.

spline_data

The spline_data parameter is a structured input that contains the spline's control points and other relevant data. This input is essential for defining the shape and behavior of the spline used in mask creation or manipulation. It allows for precise control over the spline's geometry, which is critical for accurate mask editing and procedural effects.

pattern

The pattern parameter is used in the flow-path mode to define the type of procedural effect applied along the spline path. Options include ribbon, wave, flow, dust, river, and smoke, each offering a unique visual effect. This parameter influences the appearance and dynamics of the generated mask, allowing for creative and varied outcomes.

frames

The frames parameter specifies the number of frames to be processed or generated, particularly relevant in tracking and flow-path modes. It determines the temporal extent of the mask effect, enabling animations and dynamic transitions across multiple frames. The choice of frames impacts the smoothness and duration of the resulting animation.

thickness

The thickness parameter controls the width of the mask band along the spline path in flow-path mode. It affects the visual prominence of the mask and can be adjusted to achieve the desired aesthetic effect. A thicker band may be used for bold, striking effects, while a thinner band can create subtle, delicate visuals.

seed

The seed parameter is used to initialize random processes within the node, ensuring reproducibility of results. It is particularly useful in procedural generation, where randomness plays a role in the final output. By setting a specific seed value, you can achieve consistent results across different runs.

Spline Mask — Edit/Track/Flow-Path (C2C) Output Parameters:

MASK

The MASK output is a rasterized representation of the spline-based mask, applicable in all modes. It provides a binary or grayscale image where the mask is applied, serving as the primary output for further processing or compositing in your workflow.

STRING (coords_json)

The coords_json output is a JSON string containing the coordinates of the spline's control points, formatted for compatibility with SAM (Segment Anything Model) in edit mode. This output is useful for integrating with other systems or tools that require precise point data for mask generation or manipulation.

SPLINE_DATA

The SPLINE_DATA output is a structured payload that contains detailed information about the spline, including its geometry and attributes. This data can be used for downstream processing or analysis, providing a comprehensive representation of the spline's characteristics.

STRING (info_json)

The info_json output provides diagnostic information or parameters related to the tracking or flow-path processes. It includes details such as tracking diagnostics, flow parameters, or bounding box data, offering insights into the node's operation and results.

BBOX

The BBOX output is a bounding box array [x, y, w, h] that defines the spatial extent of the spline's control points. It is useful for understanding the area affected by the mask and can be used for alignment or positioning purposes in your projects.

Spline Mask — Edit/Track/Flow-Path (C2C) Usage Tips:

  • Use the edit mode for precise mask creation on single frames, leveraging the interactive canvas to adjust control points easily.
  • In track mode, ensure that the input image sequence is well-lit and has distinct features for optimal optical flow tracking results.
  • Experiment with different pattern options in flow_path mode to create unique procedural effects that enhance your visual storytelling.
  • Adjust the thickness parameter to balance between subtle and bold mask effects, depending on the visual impact you wish to achieve.
  • Utilize the seed parameter to maintain consistency across different runs, especially when working with procedural effects that involve randomness.

Spline Mask — Edit/Track/Flow-Path (C2C) Common Errors and Solutions:

"track mode requires image input"

  • Explanation: This error occurs when the track mode is selected, but no image input is provided for the tracking process.
  • Solution: Ensure that you supply a valid image sequence as input when using the track mode to enable the optical flow tracking functionality.

"Invalid mode selected"

  • Explanation: This error indicates that an unsupported mode has been chosen, which is not recognized by the SplineMaskMEC node.
  • Solution: Verify that the mode parameter is set to one of the supported options: edit, track, or flow_path. Adjust the mode selection accordingly to proceed.

Spline Mask — Edit/Track/Flow-Path (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.