Skip to content

Commit 85a7b69

Browse files
authored
Update README.md
1 parent c704f59 commit 85a7b69

File tree

1 file changed

+44
-23
lines changed

1 file changed

+44
-23
lines changed

README.md

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,47 @@
11
# ComfyUI-RMBG
22

3-
A ComfyUI custom node designed for advanced image background removal and object, face, clothes, and fashion segmentation, utilizing multiple models including RMBG-2.0, INSPYRENET, BEN, BEN2, BiRefNet models, SAM, and GroundingDINO.
3+
A ComfyUI custom node designed for advanced image background removal and object, face, clothes, and fashion segmentation, utilizing multiple models including RMBG-2.0, INSPYRENET, BEN, BEN2, BiRefNet-HR, SAM, and GroundingDINO.
44

55
$$\textcolor{red}{\Huge \text{If this custom node helps you or you like my work, please give me ⭐ on this repo!}}$$
66
$$\textcolor{red}{\Huge \text{It's a great encouragement for my efforts!}}$$
77

88
## News & Updates
9-
- 2025/02/24: Update ComfyUI-RMBG to v1.9.3 Clean up the code and fix the issue ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v193-20250224) )
109

11-
- 2025/02/21: Update ComfyUI-RMBG to v1.9.2 with Fast Foreground Color Estimation ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v192-20250221) )
10+
- **2025/03/13**: Update ComfyUI-RMBG to **v2.0.0** ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v200-20250313) )
11+
![image_mask_preview](https://github.com/user-attachments/assets/5e2b2679-4b63-4db1-a6c1-3b26b6f97df3)
12+
13+
- Added Image and Mask Tools improved functionality.
14+
- Enhanced code structure and documentation for better usability.
15+
- Introduced a new category path: `🧪AILab/🛠️UTIL/🖼️IMAGE`.
16+
17+
- **2025/02/24**: Update ComfyUI-RMBG to **v1.9.3** Clean up the code and fix the issue ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v193-20250224) )
18+
19+
- **2025/02/21**: Update ComfyUI-RMBG to **v1.9.2** with Fast Foreground Color Estimation ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v192-20250221) )
1220
![RMBG_V1 9 2](https://github.com/user-attachments/assets/aaf51bff-931b-47ef-b20b-0dabddc49873)
1321
- Added new foreground refinement feature for better transparency handling
1422
- Improved edge quality and detail preservation
1523
- Enhanced memory optimization
1624

17-
- 2025/02/20: Update ComfyUI-RMBG to v1.9.1 ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v191-20250220) )
25+
- **2025/02/20**: Update ComfyUI-RMBG to **v1.9.1** ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v191-20250220) )
1826
- Changed repository for model management to the new repository and Reorganized models files structure for better maintainability.
19-
20-
- 2025/02/19: Update ComfyUI-RMBG to v1.9.0 with BiRefNet model improvements ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v190-20250219) )
27+
28+
- **2025/02/19**: Update ComfyUI-RMBG to **v1.9.0** with BiRefNet model improvements ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v190-20250219) )
2129
![rmbg_v1 9 0](https://github.com/user-attachments/assets/a7649781-42c9-4af4-94c7-6841e9395f5a)
2230
- Enhanced BiRefNet model performance and stability
2331
- Improved memory management for large images
2432

25-
- 2025/02/07: Update ComfyUI-RMBG to v1.8.0 with new BiRefNet-HR model ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v180-20250207) )
26-
![BiRefNet-HR](https://github.com/user-attachments/assets/c27bf3c5-92b9-472d-b097-5fed0f182d47)
27-
** (To ensure compatibility with the old V1.8.0 workflow, we have replaced this image with the new BiRefNet Node) (2025/03/01)
33+
- **2025/02/07**: Update ComfyUI-RMBG to **v1.8.0** with new BiRefNet-HR model ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v180-20250207) )
34+
![RMBG-v1 8 0](https://github.com/user-attachments/assets/d4a1309c-a635-443a-97b5-2639fb48c27a)
2835

2936
- Added a new custom node for BiRefNet-HR model.
3037
- Support high resolution image processing (up to 2048x2048)
3138

32-
- 2025/02/04: Update ComfyUI-RMBG to v1.7.0 with new BEN2 model ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v170-20250204) )
39+
- **2025/02/04**: Update ComfyUI-RMBG to **v1.7.0** with new BEN2 model ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v170-20250204) )
3340
![rmbg_v1 7 0](https://github.com/user-attachments/assets/22053105-f3db-4e24-be66-ae0ad2cc248e)
3441

3542
- Added a new custom node for BEN2 model.
3643

37-
- 2025/01/22: Update ComfyUI-RMBG to v1.6.0 with new Face Segment custom node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v160-20250122) )
44+
- **2025/01/22**: Update ComfyUI-RMBG to **v1.6.0** with new Face Segment custom node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v160-20250122) )
3845
![RMBG_v1 6 0](https://github.com/user-attachments/assets/9ccefec1-4370-4708-a12d-544c90888bf2)
3946

4047
- Added a new custom node for face parsing and segmentation
@@ -43,44 +50,44 @@ $$\textcolor{red}{\Huge \text{It's a great encouragement for my efforts!}}$$
4350
- Multiple feature selection for combined segmentation
4451
- Same parameter controls as other RMBG nodes
4552

46-
- 2025/01/05: Update ComfyUI-RMBG to v1.5.0 with new Fashion and accessories Segment custom node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v150-20250105) )
53+
- **2025/01/05**: Update ComfyUI-RMBG to **v1.5.0** with new Fashion and accessories Segment custom node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v150-20250105) )
4754
![RMBGv_1 5 0](https://github.com/user-attachments/assets/a250c1a6-8425-4902-b902-a6e1a8bfe959)
4855

4956
- Added a new custom node for fashion segmentation.
5057

51-
- 2025/01/02: Update ComfyUI-RMBG to v1.4.0 with new Clothes Segment node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v140-20250102) )
58+
- **2025/01/02**: Update ComfyUI-RMBG to **v1.4.0** with new Clothes Segment node ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v140-20250102) )
5259
![rmbg_v1 4 0](https://github.com/user-attachments/assets/978c168b-03a8-4937-aa03-06385f34b820)
5360

5461
- Added intelligent clothes segmentation with 18 different categories
5562
- Support multiple item selection and combined segmentation
5663
- Same parameter controls as other RMBG nodes
5764

58-
- 2024/12/29: Update ComfyUI-RMBG to v1.3.2 with background handling ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v132-20241229) )
65+
- **2024/12/29**: Update ComfyUI-RMBG to **v1.3.2** with background handling ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v132-20241229) )
5966
- Enhanced background handling to support RGBA output when "Alpha" is selected.
6067
- Ensured RGB output for all other background color selections.
6168

62-
- 2024/12/25: Update ComfyUI-RMBG to v1.3.1 with bug fixes ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v131-20241225) )
69+
- **2024/12/25**: Update ComfyUI-RMBG to **v1.3.1** with bug fixes ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v131-20241225) )
6370
- Fixed an issue with mask processing when the model returns a list of masks.
6471
- Improved handling of image formats to prevent processing errors.
6572

66-
- 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) )
73+
- **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) )
6774
![rmbg v1.3.0](https://github.com/user-attachments/assets/7607546e-ffcb-45e2-ab90-83267292757e)
6875

6976
- Added text-prompted object segmentation
7077
- Support both tag-style ("cat, dog") and natural language ("a person wearing red jacket") prompts
7178
- 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)
7279
- This update requires install requirements.txt
7380

74-
- 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) )
81+
- **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) )
7582
![RMBG1 2 2](https://github.com/user-attachments/assets/cb7b1ad0-a2ca-4369-9401-54957af6c636)
7683

77-
- 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) )
84+
- **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) )
7885
![GIF_TO_AWEBP](https://github.com/user-attachments/assets/7f8275d5-06e5-4880-adfe-930f045df673)
7986

80-
- 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) )
87+
- **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) )
8188
![RMBGv1 2 0](https://github.com/user-attachments/assets/4fd10123-6c95-4f9e-8d25-fdb39b5fc792)
8289

83-
- 2024/11/21: Update Comfyui-RMBG ComfyUI Custom Node to v1.1.0 ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v110-20241121) )
90+
- **2024/11/21**: Update Comfyui-RMBG ComfyUI Custom Node to **v1.1.0** ( [update.md](https://github.com/1038lab/ComfyUI-RMBG/blob/main/update.md#v110-20241121) )
8491
![comfyui-rmbg version compare](https://github.com/user-attachments/assets/2d23cf42-ca74-49e5-a8bf-9de377bd71aa)
8592

8693
## Features
@@ -115,7 +122,19 @@ install requirment.txt in the ComfyUI-RMBG folder
115122
./ComfyUI/python_embeded/python -m pip install -r requirements.txt
116123
```
117124

118-
### 3. Manually download the models:
125+
### Method 3: Install via Comfy CLI
126+
Ensure `pip install comfy-cli` is installed.
127+
Installing ComfyUI `comfy install` (if you don't have ComfyUI Installed)
128+
install the ComfyUI-RMBG, use the following command:
129+
```bash
130+
comfy node install ComfyUI-RMBG
131+
```
132+
install requirment.txt in the ComfyUI-RMBG folder
133+
```bash
134+
./ComfyUI/python_embeded/python -m pip install -r requirements.txt
135+
```
136+
137+
### 4. Manually download the models:
119138
- The model will be automatically downloaded to `ComfyUI/models/RMBG/` when first time using the custom node.
120139
- Manually download the RMBG-2.0 model by visiting this [link](https://huggingface.co/1038lab/RMBG-2.0), then download the files and place them in the `/ComfyUI/models/RMBG/RMBG-2.0` folder.
121140
- 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/RMBG/INSPYRENET` folder.
@@ -128,7 +147,7 @@ install requirment.txt in the ComfyUI-RMBG folder
128147
- Manually download the Fashion Segment model by visiting the [link](https://huggingface.co/1038lab/segformer_fashion), then download the files and place them in the `/ComfyUI/models/RMBG/segformer_fashion` folder.
129148
- Manually download BiRefNet models by visiting the [link](https://huggingface.co/1038lab/BiRefNet), then download the files and place them in the `/ComfyUI/models/RMBG/BiRefNet` folder.
130149

131-
## Usage
150+
## Usage
132151
### RMBG Node
133152
![RMBG](https://github.com/user-attachments/assets/cd0eb92e-8f2e-4ae4-95f1-899a6d83cab6)
134153

@@ -141,6 +160,7 @@ install requirment.txt in the ComfyUI-RMBG folder
141160
| **Mask Offset** | Allows for expanding or shrinking the mask boundary. Positive values expand the boundary, while negative values shrink it. | Default value is 0. Adjust based on the specific image, typically fine-tuning between -10 and 10. |
142161
| **Background** | Choose output background color | Alpha (transparent background) Black, White, Green, Blue, Red |
143162
| **Invert Output** | Flip mask and image output | Invert both image and mask output |
163+
| **Refine Foreground** | Use Fast Foreground Color Estimation to optimize transparent background | Enable for better edge quality and transparency handling |
144164
| **Performance Optimization** | Properly setting options can enhance performance when processing multiple images. | If memory allows, consider increasing `process_res` and `mask_blur` values for better results, but be mindful of memory usage. |
145165

146166
### Basic Usage
@@ -217,7 +237,7 @@ BIREFNET is a powerful model for image segmentation, offering:
217237
- BiRefNet-HR-matting model (high resolution matting)
218238
- BiRefNet_lite model (lightweight version for faster processing)
219239
- BiRefNet_lite-2K model (lightweight version for 2K resolution)
220-
240+
221241
## SAM
222242
SAM is a powerful model for object detection and segmentation, offering:
223243
- High accuracy in complex environments
@@ -262,6 +282,7 @@ GroundingDINO is a model for text-prompted object detection and segmentation, of
262282
- tqdm>=4.65.0
263283
- transformers>=4.35.0
264284
- transparent-background>=1.2.4
285+
- opencv-python>=4.7.0
265286

266287
## Credits
267288
- RMBG-2.0: https://huggingface.co/briaai/RMBG-2.0

0 commit comments

Comments
 (0)