├── .github └── workflows │ └── publish.yml ├── .gitignore ├── BiRefNet_node.py ├── README.md ├── __init__.py ├── assets ├── 00.jpg ├── 01.jpg ├── 02.jpg └── Screenshot-2024-03-21-at-19.26.21.png ├── config.py ├── dataset.py ├── debug.ipynb ├── install.py ├── models ├── __init__.py ├── backbones │ ├── __init__.py │ ├── build_backbone.py │ ├── pvt_v2.py │ └── swin_v1.py ├── baseline.py ├── modules │ ├── __init__.py │ ├── aspp.py │ ├── attentions.py │ ├── decoder_blocks.py │ ├── deform_conv.py │ ├── ing.py │ ├── lateral_blocks.py │ ├── mlp.py │ └── utils.py └── refinement │ ├── __init__.py │ ├── refiner.py │ └── stem_layer.py ├── preproc.py ├── pyproject.toml ├── requirements.txt ├── utils.py └── workflow └── example_workflow.json /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | __pycache__/ 3 | 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /BiRefNet_node.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/BiRefNet_node.py -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/README.md -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/__init__.py -------------------------------------------------------------------------------- /assets/00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/assets/00.jpg -------------------------------------------------------------------------------- /assets/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/assets/01.jpg -------------------------------------------------------------------------------- /assets/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/assets/02.jpg -------------------------------------------------------------------------------- /assets/Screenshot-2024-03-21-at-19.26.21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/assets/Screenshot-2024-03-21-at-19.26.21.png -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/config.py -------------------------------------------------------------------------------- /dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/dataset.py -------------------------------------------------------------------------------- /debug.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/debug.ipynb -------------------------------------------------------------------------------- /install.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/install.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/backbones/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/backbones/build_backbone.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/backbones/build_backbone.py -------------------------------------------------------------------------------- /models/backbones/pvt_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/backbones/pvt_v2.py -------------------------------------------------------------------------------- /models/backbones/swin_v1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/backbones/swin_v1.py -------------------------------------------------------------------------------- /models/baseline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/baseline.py -------------------------------------------------------------------------------- /models/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/modules/aspp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/aspp.py -------------------------------------------------------------------------------- /models/modules/attentions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/attentions.py -------------------------------------------------------------------------------- /models/modules/decoder_blocks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/decoder_blocks.py -------------------------------------------------------------------------------- /models/modules/deform_conv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/deform_conv.py -------------------------------------------------------------------------------- /models/modules/ing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/ing.py -------------------------------------------------------------------------------- /models/modules/lateral_blocks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/lateral_blocks.py -------------------------------------------------------------------------------- /models/modules/mlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/mlp.py -------------------------------------------------------------------------------- /models/modules/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/modules/utils.py -------------------------------------------------------------------------------- /models/refinement/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/refinement/refiner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/refinement/refiner.py -------------------------------------------------------------------------------- /models/refinement/stem_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/models/refinement/stem_layer.py -------------------------------------------------------------------------------- /preproc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/preproc.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/pyproject.toml -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | kornia 2 | loguru 3 | opencv-python 4 | timm 5 | prettytable 6 | scipy -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/utils.py -------------------------------------------------------------------------------- /workflow/example_workflow.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperyl/ComfyUI-BiRefNet/HEAD/workflow/example_workflow.json --------------------------------------------------------------------------------