Add files via upload
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
# ComfyUI-RMBG
|
||||
|
||||
A ComfyUI custom node designed for advanced image background removal utilizing multiple models, including RMBG-2.0, INSPYRENET, and BEN.
|
||||
A ComfyUI custom node designed for advanced image background removal and object segmentation, utilizing multiple models including RMBG-2.0, INSPYRENET, BEN, SAM, and GroundingDINO.
|
||||
|
||||
$${\color{red}If\ this\ custom\ node\ helps\ you\ or\ you\ like\ my\ work,\ please\ give\ me⭐on\ this\ repo!}$$
|
||||
$${\color{red}It's\ a\ greatest\ encouragement\ for\ my\ efforts!}$$
|
||||
|
||||
## News & Updates
|
||||
- 2024/12/23: Update ComfyUI-RMBG to v1.3.0 with new Segment node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v140-20241222) )
|
||||
- Added text-prompted object segmentation
|
||||
- Support both tag-style ("cat, dog") and natural language ("a person wearing red jacket") prompts
|
||||
- Multiple models: SAM (vit_h/l/b) and GroundingDINO (SwinT/B) (as always model file will be downloaded automatically when first time using the specific model)
|
||||
- This update requires install requirements.txt
|
||||
|
||||
- 2024/12/12: Update Comfyui-RMBG ComfyUI Custom Node to v1.2.2 ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v122-20241212) )
|
||||

|
||||
|
||||
- 2024/12/02: Update Comfyui-RMBG ComfyUI Custom Node to v1.2.1 ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v121-20241202) )
|
||||
- 2024/12/02: Update Comfyui-RMBG ComfyUI Custom Node to v1.2.1 ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.mdv121-20241202) )
|
||||

|
||||
|
||||
- 2024/11/29: Update Comfyui-RMBG ComfyUI Custom Node to v1.2.0 ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v120-20241129) )
|
||||
@@ -19,19 +25,28 @@ $${\color{red}It's\ a\ greatest\ encouragement\ for\ my\ efforts!}$$
|
||||

|
||||
|
||||
## Features
|
||||
- Background Removal (RMBG Node)
|
||||
- Multiple models: RMBG-2.0, INSPYRENET, BEN
|
||||
- Various background options
|
||||
- Batch processing support
|
||||
|
||||
- Object Segmentation (Segment Node)
|
||||
- Text-prompted object detection
|
||||
- Support both tag-style and natural language inputs
|
||||
- High-precision segmentation with SAM
|
||||
- Flexible parameter controls
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
1. install on ComfyUI-Manager, search `Comfyui-RMBG` and install.
|
||||

|
||||
Install the dependencies `requirements.txt` file within the ComfyUI-RMBG folder.
|
||||
1. install on ComfyUI-Manager, search `Comfyui-RMBG` and install
|
||||
install requirment.txt in the ComfyUI-RMBG folder
|
||||
```bash
|
||||
./ComfyUI/python_embeded/python -m pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. Clone this repository to your ComfyUI custom_nodes folder:
|
||||
2. Clone this repository to your ComfyUI custom_nodes folder:
|
||||
```bash
|
||||
cd ComfyUI/custom_nodes
|
||||
git clone https://github.com/1038lab/ComfyUI-RMBG
|
||||
@@ -42,8 +57,11 @@ git clone https://github.com/1038lab/ComfyUI-RMBG
|
||||
- Manually download the RMBG-2.0 model by visiting this [link](https://huggingface.co/briaai/RMBG-2.0/tree/main), then download the files and place them in the `/ComfyUI/models/RMBG/RMBG-2.0` folder.
|
||||
- Manually download the INSPYRENET models by visiting the [link](https://huggingface.co/1038lab/inspyrenet), then download the files and place them in the `/ComfyUI/models/INSPYRENET` folder.
|
||||
- Manually download the BEN model by visiting the [link](https://huggingface.co/PramaLLC/BEN), then download the files and place them in the `/ComfyUI/models/BEN` folder.
|
||||
- Manually download the SAM models by visiting the [link](https://huggingface.co/1038lab/sam), then download the files and place them in the `/ComfyUI/models/SAM` folder.
|
||||
- Manually download the GroundingDINO models by visiting the [link](https://huggingface.co/1038lab/GroundingDINO), then download the files and place them in the `/ComfyUI/models/grounding-dino` folder.
|
||||
|
||||
## Usage
|
||||
### RMBG Node
|
||||

|
||||
|
||||
### Optional Settings :bulb: Tips
|
||||
@@ -75,6 +93,16 @@ git clone https://github.com/1038lab/ComfyUI-RMBG
|
||||
- `invert_output`: Flip mask and image output
|
||||
- `optimize`: Toggle model optimization
|
||||
|
||||
### Segment Node
|
||||
1. Load `Segment (RMBG)` node from the `🧪AILab/🧽RMBG` category
|
||||
2. Connect an image to the input
|
||||
3. Enter text prompt (tag-style or natural language)
|
||||
4. Select SAM and GroundingDINO models
|
||||
5. Adjust parameters as needed:
|
||||
- Threshold: 0.25-0.35 for broad detection, 0.45-0.55 for precision
|
||||
- Mask blur and offset for edge refinement
|
||||
- Background color options
|
||||
|
||||
<details>
|
||||
<summary><h2>About Models</h2></summary>
|
||||
|
||||
@@ -103,6 +131,26 @@ BEN is robust on various image types, offering:
|
||||
- Good balance between speed and accuracy
|
||||
- Effective on both simple and complex scenes
|
||||
- Suitable for batch processing
|
||||
|
||||
## SAM
|
||||
SAM is a powerful model for object detection and segmentation, offering:
|
||||
- High accuracy in complex environments
|
||||
- Precise edge detection and preservation
|
||||
- Excellent handling of fine details
|
||||
- Support for multiple objects in a single image
|
||||
- Output Comparison
|
||||
- Output with background
|
||||
- Batch output for video
|
||||
|
||||
## GroundingDINO
|
||||
GroundingDINO is a model for text-prompted object detection and segmentation, offering:
|
||||
- High accuracy in complex environments
|
||||
- Precise edge detection and preservation
|
||||
- Excellent handling of fine details
|
||||
- Support for multiple objects in a single image
|
||||
- Output Comparison
|
||||
- Output with background
|
||||
- Batch output for video
|
||||
</details>
|
||||
|
||||
|
||||
@@ -123,6 +171,8 @@ BEN is robust on various image types, offering:
|
||||
- RMBG-2.0: https://huggingface.co/briaai/RMBG-2.0
|
||||
- INSPYRENET: https://github.com/plemeri/InSPyReNet
|
||||
- BEN: https://huggingface.co/PramaLLC/BEN
|
||||
- SAM: https://huggingface.co/facebook/sam-vit-base
|
||||
- GroundingDINO: https://github.com/IDEA-Research/GroundingDINO
|
||||
- Created by: [1038 Lab](https://github.com/1038lab)
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user