πΈ Florence2+SAM Masker
Tell it what to mask in plain English β Florence2 finds it, SAM outlines it
- image
- florence2_model
- sam_model
- face_mask
- hands_mask
- body_mask
- debug
Frog Florence2+SAM Masker is the detector half of the pack's detailing pipeline, and it replaces the fixed YOLO detector you're used to with open-vocabulary prompting. Type "face", "hands", or whatever you actually want masked - "breasts, torso, midriff" is literally the default body prompt - and Florence2 finds those regions by language, then SAM outlines them precisely. It's a two-stage machine: Florence2 does the open-vocabulary detection (bounding boxes for whatever your text describes), then the Segment Anything Model refines each box into a pixel-accurate mask that hugs the subject instead of leaving a rectangular seam. Both models load once and are shared across all three region passes, so there's no redundant GPU work.
The mask-first approach matters because this is the pack's answer to "how do I get the masks for the Detailer?" Instead of hoping a YOLO model has a class for what you want, you just describe it. Want a mask of the hat instead of the face? Change the prompt. That flexibility is the whole selling point, and it's why the README's masking-detailing docs make the point that the detector is a swappable input to the detailing loop rather than a fixed part of it.
The inputs that matter
- florence2_model - the FL2MODEL, loaded with
Florence2ModelLoaderfrom the separate comfyui-florence2 pack. This is a required install; the masker doesn't bundle Florence2. - face_prompt / hands_prompt / body_prompt - what to detect for each region, defaulting to "face", "hands", and "breasts, torso, midriff". Leave one blank to skip that mask entirely.
- face_mask_mode -
union(merge all detected faces into one mask),largest(keep only the biggest), orseparate(one mask per face as an [N,H,W] batch - wire that into πΈ Mask Batch Split for per-character processing). - confidence - minimum detection confidence, default 0.3. Lower it and you get more boxes (and more false positives); raise it for only the obvious detections.
- sam_model (optional) - connect the pack's πΈ SAM Loader or Impact Pack's SAMLoader. The docstring is reassuring here: if you leave it disconnected, the masker tries Florence2's native referring-expression segmentation first, then falls back to rectangular boxes, so you still get masks without SAM installed.
- expand_bbox / max_detections - padding around each Florence2 box before SAM, and the cap on boxes processed per region (default 6).
What comes out
face_mask, hands_mask, body_mask - wire them straight into πΈ Detailer or πΈ Detailer Pro - plus a debug string.
Installing it
The pack itself is the easy part:
cd ComfyUI/custom_nodes
git clone https://github.com/RabbitThatIsPink/FrogNodePack
The other requirement is real: you need the comfyui-florence2 pack installed to get Florence2ModelLoader and an actual Florence2 model file. SAM is optional (the node works without it, just with blunter masks). Install via ComfyUI Manager; the Frog pack itself declares no extra Python dependencies.
Where people trip
The classic failure is the FL2MODEL red wire on the florence2_model input - that's the missing comfyui-florence2 pack, not a broken node. Second: Florence2 is fast and small but not clairvoyant - if your prompt is too vague ("stuff") you'll get garbage boxes; the defaults are carefully chosen, so change one region at a time. Third, separate face mode emits a batch, and most detailer inputs expect a single mask - route it through πΈ Mask Batch Split first, which is exactly what that node exists for. And it's WIP, so if a pack update breaks detection, that's the documented unstable zone.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| florence2_model | FL2MODEL | Load with Florence2ModelLoader from comfyui-florence2. | |
| face_prompt | STRING | face | What to detect for the face mask. Leave blank to skip. |
| face_mask_mode | COMBO | union | union β merge all detected faces into one mask. largest β keep only the biggest face. separate β one mask per detected face as [N,H,W] batch. Wire into πΈ Mask Batch Split for multi-character eye-colour isolation. |
| hands_prompt | STRING | hands | What to detect for the hands mask. Leave blank to skip. |
| hands_mask_mode | COMBO | union | union β merge all detected regions into one mask. largest β keep only the biggest region. |
| body_prompt | STRING | breasts, torso, midriff | What to detect for the body mask. Leave blank to skip. |
| body_mask_mode | COMBO | union | union β merge all detected regions into one mask. largest β keep only the biggest region. |
| confidence | FLOAT | 0.300β1 | Minimum detection confidence. Lower = more boxes. |
| sam_modelopt | SAM_MODEL | Optional. Connect πΈ SAM Loader or Impact Pack SAMLoader. Leave disconnected to use Florence2 native segmentation. | |
| expand_bboxopt | INT | 120β256 | Expand each Florence2 bounding box by N pixels before SAM. |
| max_detectionsopt | INT | 61β32 | Cap how many bounding boxes are processed per region. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| face_mask | MASK | β |
| hands_mask | MASK | β |
| body_mask | MASK | β |
| debug | STRING | β |