487b0510ab39b50f5a8b7a49fdf2993473a0368a
- 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
ComfyUI custom node implementing Florence 2 + Segment Anything Model 2, based on SkalskiP's HuggingFace space
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*.
Languages
Python
100%
