41 Commits
Author SHA1 Message Date
Lê Trung Hiếu a059e7eba5 Update README.md 2024-12-04 23:19:55 +07:00
Lê Trung Hiếu 4bb10aa253 Update README.md 2024-12-04 23:12:45 +07:00
Lê Trung Hiếu d19883998a Update README.md 2024-12-04 23:07:22 +07:00
Lê Trung Hiếu 08afdc12fe Update README.md 2024-12-04 23:06:39 +07:00
Lê Trung Hiếu 29846c2ace Rename utils.py to BiRefNetutils.py 2024-12-04 22:59:24 +07:00
Lê Trung Hiếu f08eb04512 Update build_backbone.py 2024-12-04 22:59:04 +07:00
Lê Trung Hiếu ce98f1b83e Update BiRefNet_node.py 2024-12-04 22:58:43 +07:00
Xu Yang 484c90b74c Merge pull request #18 from mymusise/main
Add automatic model download feature
2024-08-18 00:38:15 +08:00
mymusise 1cf6d9fe31 add automatically download models
Signed-off-by: mymusise <mymusise1@gmail.com>
2024-08-08 09:16:07 +00:00
Xu Yang 2513956d1e Update publish.yml 2024-06-20 23:25:48 +08:00
Xu Yang f82a3ac8f4 Update pyproject.toml 2024-06-20 23:15:37 +08:00
Xu Yang 917a69a120 Update publish.yml 2024-06-20 23:14:34 +08:00
Xu Yang 59099ffb94 Update publish.yml 2024-06-20 23:13:27 +08:00
Xu Yang 317ae76c01 Update pyproject.toml 2024-06-20 23:10:57 +08:00
Xu Yang 3fdea071ff Update publish.yml 2024-06-20 23:07:18 +08:00
Xu Yang 413d9f9981 Merge pull request #15 from haohaocreates/publish
Add Github Action for Publishing to Comfy Registry
2024-06-20 22:53:32 +08:00
Xu Yang c0fb83a521 Merge pull request #7 from carstenli/patch-4
README.md update
2024-06-20 22:51:26 +08:00
Xu Yang c4abef1ade Merge pull request #16 from haohaocreates/pyproject
Add pyproject.toml for Custom Node Registry
2024-06-20 22:44:42 +08:00
haohaocreates 22faa2a7d4 chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-05-22 20:18:01 -04:00
haohaocreates d6cf24ee14 chore(publish): Add Github Action for Publishing to Comfy Registry 2024-05-22 20:17:58 -04:00
Carsten Li ed99ffd5a3 Update README.md
Expanded the download model section using Git LFS.
2024-03-25 12:02:18 +01:00
Xu Yang e813c30d28 Merge pull request #6 from carstenli/patch-2
BiRefNet_node.py update to make it work on Apple Silicon devices
2024-03-25 18:49:47 +08:00
Xu Yang d420895ab2 Merge pull request #5 from carstenli/patch-3
build_backbone.py update to make it work on Apple Silicon devices
2024-03-25 18:49:36 +08:00
Carsten Li 1db48c0b97 Update build_backbone.py
Modifications to make it work on Apple Silicon devices:

1. Modified the load_weights() function to use torch.load() with map_location=torch.device('cpu') when loading the pre-trained model weights. This ensures that the weights are loaded onto the CPU, avoiding the attempt to deserialize them on a CUDA device when CUDA is not available.

2. Added error handling to gracefully handle cases where the loaded weights do not match the expected format or structure. If the loaded weights are not compatible, an informative message is printed, and the function returns None.

These changes address the issues related to loading the pre-trained model weights on different devices (CPU, MPS, or CUDA) and ensure that the BiRefNet node works correctly on various hardware configurations, including MacBook Pro M2 with MPS.

The modifications improve the compatibility and robustness of the code, allowing users to run the BiRefNet node seamlessly on their specific hardware setup without encountering errors related to device mismatches or unsupported CUDA operations.
2024-03-25 11:46:33 +01:00
Carsten Li bc26fdd5de Update BiRefNet_node.py
Modifications to make it work on Apple Silicon devices:

1. Modified the load() method to handle loading the model weights based on the selected device (CPU, MPS, or CUDA). The map_location parameter is set accordingly to ensure the weights are loaded onto the correct device.

2. Updated the INPUT_TYPES() method to correctly define the available device options based on the availability of MPS and CUDA devices.

3. In the matting() method, added a step to move the model to the selected device (self.model.to(device)) before performing the forward pass. This ensures that both the input tensor and the model weights are on the same device, avoiding device mismatch errors.

These changes address the issues related to loading the pre-trained model weights on different devices (CPU, MPS, or CUDA) and ensure that the BiRefNet node works correctly on various hardware configurations, including MacBook Pro M2 with MPS.

The modifications improve the compatibility and robustness of the code, allowing users to run the BiRefNet node seamlessly on their specific hardware setup without encountering errors related to device mismatches or unsupported CUDA operations.
2024-03-25 11:45:06 +01:00
yang shawn 03bed543ed remove an empty file
probably fix the conflict with SDUltimate node
2024-03-22 16:35:10 +08:00
yang shawn 025063a00e update readme 2024-03-22 14:19:01 +08:00
yang shawn c72dd74232 update workflow 2024-03-22 14:17:49 +08:00
yang shawn 9a9556270a update gitignore 2024-03-22 14:17:42 +08:00
yang shawn 6e08ffec04 add segmentation samples 2024-03-22 10:47:51 +08:00
yang shawn 1aca549818 fix auto device 2024-03-22 10:33:54 +08:00
yang shawn 0c3066f4e9 fix auto device 2024-03-22 10:23:17 +08:00
yang shawn 50e248b929 update requirements.txt 2024-03-21 20:42:23 +08:00
yang shawn 8a1435ad98 add Acknowledgments 2024-03-21 20:38:31 +08:00
yang shawn c85ed5fce9 readme 2024-03-21 20:37:02 +08:00
yang shawn 0bf9cdb916 update checkpoints info 2024-03-21 20:31:31 +08:00
yang shawn ef78e07590 usage update 2024-03-21 20:29:56 +08:00
yang shawn 9a1486a06a add usage 2024-03-21 20:29:07 +08:00
yang shawn a12cacf752 init this repo 2024-03-21 19:24:54 +08:00
yang shawn 6a7eca8087 update gitignore 2024-03-21 19:24:40 +08:00
Xu Yang eb007a7b66 Initial commit 2024-03-21 19:09:28 +08:00