8000 GitHub - KytraScript/ComfyUI_MatAnyone_Kytra: Kytra's MatAnyone implementation for use in ComfyUI
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

KytraScript/ComfyUI_MatAnyone_Kytra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kytra's MatAnyone implementation for ComfyUI

This is a ComfyUI node for MatAnyone, a state-of-the-art video matting model that can remove backgrounds from videos using just a single mask for the first frame for enhanced/guided video matting.

How To Use:

MatAnyone only requires that you provide the first single frame alpha mask (solid white for the subject against a solid black background for the stuff you don't want in the final output). My example workflow uses the Rembg+ Session nodes from Comfy Essentials to automatically create the first frame alpha mask for you. The dance video example and the anime example videos below both used that method. Alternatively, you can provide the first frame alpha mask yourself and bypass those nodes. It's really that simple. Check the workflow directory in this repo for the example workflow.

Installation

  1. Clone this repository into your ComfyUI custom_nodes folder:
cd ComfyUI/custom_nodes
git clone https://github.com/KytraScript/ComfyUI_MatAnyone_Kytra.git
  1. Install pip requirements
cd ComfyUI/custom_nodes/ComfyUI_MatAnyone_Kytra
pip install -r requirements.txt
  1. The model weights are automatically downloaded during your first run from: https://huggingface.co/Mothersuperior/ComfyUI_MatAnyone_Kytra and they will be placed in the ComfyUI_MatAnyone_Kytra/model folder

Outdoor Lighting dance example:

MatAnyone_Kytra_Dance_Example.mp4

Realism with low light:

MatAnyone_KytraScript_Example.mp4

Anime using an AI created animation:

Recording.2025-03-09.144015.mp4

Blue car against a blue sky:

MatAnyone_Kytra_Car_Example.mp4

Parameters

  • video_frames: Video image batch (example workflow uses VHS Video Loader)
  • mask: First frame mask (subject rgb(255,255,255))
  • warmup_frames: Number of warmup iterations (default: 10)
  • erode_kernel: Erosion kernel size (default: 10)
  • dilate_kernel: Dilation kernel size (default: 10)
  • bg_red & bg_green & bg_blue: Set values for background color for composite video output

Example Workflow

  • Provided in the repository 'workflow' directory

Credits

License

This project is licensed under the same license as the original MatAnyone project.

About

Kytra's MatAnyone implementation for use in ComfyUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0