Zum Inhalt springen
Node packÜberprüftExtern
Quelle öffnen

MatAnyone2_ComfyUI

Interactive video matting custom nodes for ComfyUI powered by MatAnyone2 and SAM

Betreuer@dreamrecC · adoptionBewertung

Paketprofil

Status
Überprüft
Verleger
@dreamrec
Quelle
GitHub

README

MatAnyone2 banner

MatAnyone2 Video Matting for ComfyUI

Smoke Test Registry License Python Nodes

Interactive video matting inside ComfyUI with a built-in SAM point editor and MatAnyone2 propagation. Queue once to open the editor on the first frame, queue again to render a clean foreground pass, alpha matte, and preview composite across the full clip.

Features

  • Two-pass interactive workflow: fast first queue to open the editor, full second queue to render the matte.
  • Built-in SAM overlay: positive and negative point editing happens directly in ComfyUI.
  • Multi-target masking: create and compare multiple mask targets before committing.
  • Pinned vendor snapshots: the package ships known-good MatAnyone2 and Segment Anything source snapshots in vendor/.
  • Bundled starter clip: the sample workflow ships with a tiny demo video that install.py copies into ComfyUI/input/.
  • Manager-ready packaging: requirements.txt, install.py, workflow example, and registry metadata are all included.

Installation

ComfyUI Manager

Search for MatAnyone2 Video Matting or MatAnyone2 in ComfyUI Manager and install the latest stable version.

Registry page: registry.comfy.org/nodes/matanyone2-video-matting

Manager will:

  1. Install Python dependencies from requirements.txt
  2. Run install.py to validate the bundled vendor snapshots and copy matanyone2-demo-input.mp4 into ComfyUI/input/
  3. Ask for a ComfyUI restart

Manual Install

cd ComfyUI/custom_nodes
git clone https://github.com/dreamrec/MatAnyone2_ComfyUI.git
cd MatAnyone2_ComfyUI
python -m pip install -r requirements.txt
python install.py

Restart ComfyUI after installation.

Companion Node for the Demo Workflow

The bundled workflow uses ComfyUI-VideoHelperSuite for video input and output.

Models

Models download automatically on first use if they are missing.

ModelDefault locationAuto-download
MatAnyone2 checkpointComfyUI/models/matanyone/Yes
SAM ViT-HComfyUI/models/sams/Yes
SAM ViT-LComfyUI/models/sams/Yes
SAM ViT-BComfyUI/models/sams/Yes

Included Workflows

Basic Demo

workflows/matanyone2_demo.json is a ready-to-run example that wires video loading, frame selection, the interactive editor, and final matte export.

It defaults to the bundled matanyone2-demo-input.mp4 starter clip that install.py copies into ComfyUI/input/. Swap the Load Video node to your own footage whenever you are ready.

LoadVideo -> SliceFrames -> SelectFrame -> Interactive SAM -> Matte -> SaveVideo x3

How to use it:

  1. Drag workflows/matanyone2_demo.json onto the ComfyUI canvas.
  2. Queue once on the bundled starter clip, or replace Load Video with your own clip first.
  3. Queue once to open the editor on the first frame.
  4. Left-click for foreground points and right-click for background points.
  5. Click Apply in the editor.
  6. Queue again to render the full matte outputs.

Extended Demo (All 12 Nodes)

workflows/matanyone2_extended_demo.json showcases every

Knoten in diesem Paket

12 Knoten (Plural)
  • MatAnyoneAddPoint
  • MatAnyoneInteractiveSAM
  • MatAnyoneMatte
  • MatAnyoneMergeMasks
  • MatAnyoneModelLoader
  • MatAnyonePreviewMasks
  • MatAnyonePromptFromText
  • MatAnyonePromptStart
  • MatAnyoneSAMLoader
  • MatAnyoneSAMRefine
  • MatAnyoneSelectFrame
  • MatAnyoneSliceFrames

Quellen

3 Quellen
GitHubQuelle
github.com/dreamrec/MatAnyone2_ComfyUI

Verifiziert 5. Nov.

GitHubQuelleVersion 5a6d9eabe9370f022ee15d6bb7460611fc6b10a0
github.com/dreamrec/MatAnyone2_ComfyUI

Verifiziert 8. Okt.

Quellenauszüge

1 Auszug

Source context: Repo dreamrec/MatAnyone2_ComfyUI