51 Commits
Author SHA1 Message Date
Jan Minar ad4c25a0a6 Merge pull request #7 from coderobe/master
add accelerated apple silicon support and cpu fallback
2025-03-14 10:49:55 +00:00
Mara Broda 802e8e9688 add accelerated apple silicon support and cpu fallback 2025-01-05 08:40:21 +01:00
Jan Minar 92a1093643 update example workflow 2024-10-25 10:09:31 +01:00
Jan Minar 3ae2228e89 Offload models in low-VRAM environments
Performance should now match https://github.com/kijai/ComfyUI-Florence2
2024-10-23 21:04:19 +00:00
Jan Minar 48a1e1a455 Add back license
Upstream code is distributed under the Apache v2 license, so add it back
2024-10-22 02:44:49 +01:00
Jan Minar 487b0510ab fixes (hopefully): torch.OutOfMemoryError: Allocation on device
- Fix the SAM2 model being loaded on every run due to string being compared to
  class instance
- Manually unload the old SAM2 model from VRAM before loading the new one
- For a good measure, garbage-collect the RAM version as well
2024-10-09 20:17:31 +01:00
Jan Minar 7b191f63cf allow to select device
this should fix the problem of not being able to run the node on Windows
-- just select device: "cpu" in the dropdown
2024-10-04 01:27:36 +01:00
Jan Minar 2c89b43499 Update __init__.py 2024-10-04 00:21:24 +01:00
Jan Minar 1e29b26c61 more fixes 2024-10-03 21:02:44 +01:00
Jan Minar ce72ccd554 fix: No available kernel. Aborting execution. 2024-10-03 20:50:41 +01:00
Jan Minar dcf633f93f Build dependency; getting errors so try putting it in requirements.txt 2024-10-03 20:29:27 +01:00
Jan Minar af204ed1ff Put the correct package in
it's samv2, not sam2
2024-10-03 04:14:30 +01:00
Jan Minar 6bc05e8595 Update requirements.txt 2024-10-03 03:36:43 +01:00
Jan Minar 5f67f35d79 fix package url in requirements.txt 2024-10-03 03:32:57 +01:00
Jan Minar bd8154881a Update requirements.txt with the forked samv2
Install samv2 from git to avoid crashing on Windows
2024-10-03 03:10:15 +01:00
Jan Minar 978b5ef6ab Update sam.py -- third time's the charm
actually use the constructed full path variable 🤦
2024-10-02 22:51:17 +01:00
Jan Minar 5e49cf7a29 fix module paths (for real this time)
use the folder_paths module, like we should

on Windows, there is an extra ComfyUI subdir in the path

the folder_paths module should take care of all that
2024-10-02 22:30:25 +01:00
Jan Minar 19322e7fc8 Fix paths for windows
windows install has an extra subdirectory 'ComfyUI' in the path

beats me
2024-10-02 22:16:44 +01:00
Jan Minar af5d09af56 fix indentation 2024-10-02 20:48:35 +01:00
Jan Minar b86df9a1b0 Instrument sam.py 2024-10-02 17:16:39 +01:00
Jan Minar 79a498a874 Refactor: Use platform-independent path construction for model loading
- Replaced hardcoded directory separators with `os.path.join` for portability
- Ensures compatibility across Windows, macOS, and Linux environments
2024-10-02 16:55:31 +01:00
Jan Minar 21a48b7262 Flesh out explanation for tensor2pil and pil2tensor
We differ from the LayerStyle implementation; explain why we're right and they're wrong
2024-09-30 13:08:01 +01:00
Jan Minar 682bfe3a24 fix workflow
- fix the prompt to match the results

the prompt went back to the default ("subject") after I had reloaded the node
2024-09-30 12:38:52 +01:00
Jan Minar 2105474132 Merge branch 'master' of github.com:rdancer/ComfyUI_Florence2SAM2 2024-09-30 03:24:00 +00:00
Jan Minar 456b323e70 fix workflow image 2024-09-30 03:22:57 +00:00
Jan Minar 43565338f4 Update README.md
add pretty pictures and a few words
2024-09-30 04:13:50 +01:00
Jan Minar 8432c4a772 Fix model paths
* move SAM2 models to models/sam2, to mirror the .../ComfyUI/models/sam2
  directory structure
* fix the command-line interface
* add masked output images to the test/ directory
2024-09-30 03:04:22 +00:00
Jan Minar 8ef5c9a74e update workflow 2024-09-30 02:43:26 +00:00
Jan Minar e5dffea0c6 Make good
* add masked image output
* label node outputs
* lazy load models
* add SAM model selector to the node
2024-09-30 02:32:52 +00:00
Jan Minar 459e9fa9a6 works in ComfyUI
note that this breaks the command-line interface
2024-09-30 01:30:41 +00:00
Jan Minar 014a3ad88d working from the commandline
Various changes made to make it work from the command line

- Most of the functionality has been commented out
    - Gradio-specific code
    - HTML UI
    - Video processing
    - Operation modes other than mask generation
2024-09-29 20:39:16 +00:00
Jan Minar 6cb0f99037 modify gitignore 2024-09-29 20:34:28 +00:00
Jan Minar 05cf75c9ed copy code from https://huggingface.co/spaces/SkalskiP/florence-sam 2024-09-29 20:21:09 +01:00
SkalskiP c803a91309 Florence-2 + SAM2 video demo fix 2024-08-06 00:45:35 +02:00
SkalskiP 25b18cc930 example videos 2024-08-06 00:39:38 +02:00
SkalskiP 4a3364a0c3 add mp4 to lfs 2024-08-06 00:39:11 +02:00
SkalskiP 488d99ebc8 ready to migrate to ZERO 2024-08-06 00:11:21 +02:00
SkalskiP c4ec446147 markdown improvements 2024-08-05 17:19:17 +02:00
SkalskiP ae5c0ef4dd markdown improvements 2024-08-05 17:10:49 +02:00
SkalskiP 5ae5bcae46 use smaller model to improve CUDA usage 2024-08-01 14:58:49 +02:00
SkalskiP 576e22aaff open vocabulary detection with Florence2 + masks with SAM2 2024-08-01 14:42:04 +02:00
SkalskiP d1212b2598 update device to CUDA 2024-08-01 13:08:20 +02:00
SkalskiP 57700a8675 label text color updated 2024-08-01 13:01:38 +02:00
SkalskiP 2fbf361078 SAM2 added 2024-08-01 12:47:29 +02:00
SkalskiP 30bfb85506 sam2 weights 2024-08-01 11:54:52 +02:00
SkalskiP bcf6cac437 Merge remote-tracking branch 'origin/main' 2024-08-01 10:20:40 +02:00
SkalskiP b2585aa89b Merge remote-tracking branch 'origin/main'
# Conflicts:
#	app.py
2024-08-01 10:20:10 +02:00
SkalskiP 0ee1f365b6 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	app.py
2024-08-01 10:15:47 +02:00
SkalskiP baea9b2286 initial commit with Florence-2 2024-08-01 10:15:32 +02:00
SkalskiP 089bf89ddb initial commit with Florence-2 2024-08-01 10:15:15 +02:00