You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-23Lines changed: 44 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,47 @@
1
1
# ComfyUI-RMBG
2
2
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.
4
4
5
5
$$\textcolor{red}{\Huge \text{If this custom node helps you or you like my work, please give me ⭐ on this repo!}}$$
6
6
$$\textcolor{red}{\Huge \text{It's a great encouragement for my efforts!}}$$
7
7
8
8
## 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) )
10
9
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) )
- 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) )
- Added new foreground refinement feature for better transparency handling
14
22
- Improved edge quality and detail preservation
15
23
- Enhanced memory optimization
16
24
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) )
18
26
- 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) )
- Enhanced BiRefNet model performance and stability
23
31
- Improved memory management for large images
24
32
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) )
** (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) )
- Support high resolution image processing (up to 2048x2048)
31
38
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) )
- 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) )
- 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!}}$$
43
50
- Multiple feature selection for combined segmentation
44
51
- Same parameter controls as other RMBG nodes
45
52
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) )
- Added a new custom node for fashion segmentation.
50
57
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) )
- Added intelligent clothes segmentation with 18 different categories
55
62
- Support multiple item selection and combined segmentation
56
63
- Same parameter controls as other RMBG nodes
57
64
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) )
59
66
- Enhanced background handling to support RGBA output when "Alpha" is selected.
60
67
- Ensured RGB output for all other background color selections.
61
68
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) )
63
70
- Fixed an issue with mask processing when the model returns a list of masks.
64
71
- Improved handling of image formats to prevent processing errors.
65
72
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) )
- Support both tag-style ("cat, dog") and natural language ("a person wearing red jacket") prompts
71
78
- 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)
- The model will be automatically downloaded to `ComfyUI/models/RMBG/` when first time using the custom node.
120
139
- 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.
121
140
- 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
128
147
- 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.
129
148
- 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.
@@ -141,6 +160,7 @@ install requirment.txt in the ComfyUI-RMBG folder
141
160
|**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. |
142
161
|**Background**| Choose output background color | Alpha (transparent background) Black, White, Green, Blue, Red |
143
162
|**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 |
144
164
|**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. |
145
165
146
166
### Basic Usage
@@ -217,7 +237,7 @@ BIREFNET is a powerful model for image segmentation, offering:
217
237
- BiRefNet-HR-matting model (high resolution matting)
218
238
- BiRefNet_lite model (lightweight version for faster processing)
219
239
- BiRefNet_lite-2K model (lightweight version for 2K resolution)
220
-
240
+
221
241
## SAM
222
242
SAM is a powerful model for object detection and segmentation, offering:
223
243
- High accuracy in complex environments
@@ -262,6 +282,7 @@ GroundingDINO is a model for text-prompted object detection and segmentation, of
0 commit comments