Nodes Browser
ComfyDeploy: How ComfyUI_BiRefNet_ll works in ComfyUI?
What is ComfyUI_BiRefNet_ll?
Sync with version of BiRefNet. NODES:AutoDownloadBiRefNetModel, LoadRembgByBiRefNetModel, RembgByBiRefNet.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI_BiRefNet_ll
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
Support the use of new and old versions of BiRefNet models
Preview
Install
- Manual
cd custom_nodes
git clone https://github.com/lldacing/ComfyUI_BiRefNet_ll.git
cd ComfyUI_BiRefNet_ll
pip install -r requirements.txt
# restart ComfyUI
- Via ComfyUI Manager
Models
The available newest models are:
- General: A pre-trained model for general use cases.
- General-Lite: A light pre-trained model for general use cases.
- General-Lite-2K: A light pre-trained model for general use cases in high resolution (2560x1440).
- Portrait: A pre-trained model for human portraits.
- Matting: A pre-trained model for general trimap-free matting use.
- DIS: A pre-trained model for dichotomous image segmentation (DIS).
- HRSOD: A pre-trained model for high-resolution salient object detection (HRSOD).
- COD: A pre-trained model for concealed object detection (COD).
- DIS-TR_TEs: A pre-trained model with massive dataset.
Model files go here (when use AutoDownloadBiRefNetModel automatically downloaded if the folder is not present during first run): ${comfyui_rootpath}/models/BiRefNet
.
If necessary, they can be downloaded from:
- General ➔
model.safetensors
must be renamedGeneral.safetensors
- General-Lite ➔
model.safetensors
must be renamedGeneral-Lite.safetensors
- General-Lite-2K ➔
model.safetensors
must be renamedGeneral-Lite-2K.safetensors
- Portrait ➔
model.safetensors
must be renamedPortrait.safetensors
- Matting ➔
model.safetensors
must be renamedMatting.safetensors
- DIS ➔
model.safetensors
must be renamedDIS.safetensors
- HRSOD ➔
model.safetensors
must be renamedHRSOD.safetensors
- COD ➔
model.safetensors
must be renamedCOD.safetensors
- DIS-TR_TEs ➔
model.safetensors
must be renamedDIS-TR_TEs.safetensors
Some models on GitHub: BiRefNet Releases
Old models:
Weight Models (Optional)
- swin_large_patch4_window12_384_22kto1k.pth(not General-Lite and General-Lite-2K model)
- swin_tiny_patch4_window7_224_22kto1k_finetune.pth(just General-Lite and General-Lite-2K model)
Nodes
- AutoDownloadBiRefNetModel
- Automatically download the model into
${comfyui_rootpath}/models/BiRefNet
, do not support weight model
- Automatically download the model into
- LoadRembgByBiRefNetModel
- Can select model from
${comfyui_rootpath}/models/BiRefNet
or the path ofbirefnet
configured in the extra YAML file - You can download latest models from BiRefNet Releases or old models BiRefNet-DIS_ep580.pth and BiRefNet-ep480.pth
- When param use_weight is True, need download weight model swin_large_patch4_window12_384_22kto1k.pth
model General-Lite must use weight model swin_tiny_patch4_window7_224_22kto1k_finetune.pth
- Can select model from
- RembgByBiRefNet