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
2024-08-01 12:47:29 +02:00
2024-09-30 03:04:22 +00:00
2024-09-30 03:04:22 +00:00
2024-08-06 00:39:38 +02:00
2024-10-04 01:27:36 +01:00
2024-10-04 01:27:36 +01:00
2024-08-06 00:39:11 +02:00
2024-09-29 20:39:16 +00:00
2024-09-30 04:13:50 +01:00
2024-09-29 20:39:16 +00:00

ComfyUI custom node implementing Florence 2 + Segment Anything Model 2, based on SkalskiP's HuggingFace space

sample workflow

RdancerFlorence2SAM2GenerateMask - the node is self-contained, and does not require separate model loaders. Models are lazy-loaded, and cached. Model unloading, if required, must be done manually.

Testing

Run python test.py test/*_source.png "products" 👉 the resulting images must pixel-match test/*output*.

S
Description
No description provided
Readme Apache-2.0
12 MiB
Languages
Python 100%