ComfyUI_Florence2SAM2

ComfyUI_Florence2SAM2
★ 43

图像分割Florence2SAM2模型懒加载
ComfyUI_Florence2SAM2:在ComfyUI内集成Florence 2与SAM2,一键生成图像分割掩码,节点自包含,模型懒加载并缓存,便于快速调用。
💡 用于在ComfyUI中快速生成基于Florence2+SAM2的分割掩码。
🍴 8 Forks💻 Python🔄 2025-06-30
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/af9fbf81e746
📦 requirements.txt
tqdm
einops
spaces
timm
transformers
gradio
supervision
opencv-python
pytest
#
Build
dependency;
getting
errors
so
try
putting
it
here
flit_core>=3.2,<4
#samv2
#
Rdancer's
version
of
samv2
includes
a
fix
that
makes
it
not
crash
on
Windows
git+https://github.com/rdancer/samv2.git
sample workflow
📄 README

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*.