PVL Segment X5 (fal.ai)
Five images, five text prompts, one parallel segmentation call
- image_1
- image_2
- image_3
- image_4
- image_5
- image_1_out
- image_2_out
- image_3_out
- image_4_out
- image_5_out
PVL Segment X5 is the batch sibling of the pack's single-image Segment node. Instead of one image and one prompt, you get five image inputs, five prompt inputs, and five outputs - all running against fal.ai's evf-sam endpoint at once, in parallel. If you've ever stood up a loop to run segmentation on a stack of frames or a set of product shots one at a time, this node is the shortcut that makes you wonder why you didn't just do it in one node.
It's part of the ComfyUI Assistant Node pack from pvlprk, sitting in the same PVL_tools_FAL category as its cloud-generation siblings. Same deal as the single version: no local model, no VRAM cost, just a fal.ai key and credits.
How it works
Each image_N input is paired with its prompt_N. The node base64-encodes every image that's actually connected, submits all the requests to the fal queue API simultaneously with a thread pool, then polls each until it completes and reassembles the results in order. A single shared negative_prompt applies to all five. Every other setting - mask_only, use_grounding_dino, revert_mask, blur_mask, expand_mask, fill_holes, semantic_type - is shared across the batch too, which is the design's one real constraint: you can't give image 1 different post-processing than image 2. If your images need different treatment, you need separate nodes.
The seeds, if you set one, are offset per image (seed, seed+1, …) so each slot gets distinct randomness when the model uses any.
What matters
image_1…image_5andprompt_1…prompt_5- the pairs to segment. Prompts are optional; leave one empty and it still runs, using an empty text.mask_only(default on) - return just masks rather than the segmentation render.blur_mask/expand_mask/fill_holes- the feather, grow, and close-holes post-processing, applied to every output.debug- turn on to see each submission and poll in the console.
Outputs are five separate IMAGE slots - image_1_out through image_5_out - not one concatenated batch. That's deliberate: it means each result wires into its own downstream node, and it means an empty input doesn't poison the others. If a slot has no image connected, its output is None and the other four still complete.
Installing it
It's part of pvlprk/comfyui-pvl-api-nodes. Install via ComfyUI Manager (search "ComfyUI Assistant Node") or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes
Restart, then set your fal.ai key as the FAL_KEY environment variable (the code also accepts FAL_API_KEY and FAL_CLIENT_KEY) and restart again if you set it after launching. You'll need prepaid fal credits.
Where people get burned
The same FAL_KEY gotcha as every fal node, plus one X5-specific trap: because the five requests all hit the API at once, a botched run costs five billable requests before you notice. Check the single-image Segment node first with the exact settings you plan to use, then batch. And remember the shared settings caveat - five images with different subjects in different conditions is fine, but if two of them need different mask post-processing, split them across two X5 nodes instead.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| semantic_type | BOOLEAN | false | — |
| mask_only | BOOLEAN | true | — |
| use_grounding_dino | BOOLEAN | false | — |
| revert_mask | BOOLEAN | false | — |
| blur_mask | INT | 00–99 | — |
| expand_mask | INT | 00–99 | — |
| fill_holes | BOOLEAN | false | — |
| seed | INT | -1-1–4294967295 | — |
| debug | BOOLEAN | false | — |
| prompt_1opt | STRING | — | |
| prompt_2opt | STRING | — | |
| prompt_3opt | STRING | — | |
| prompt_4opt | STRING | — | |
| prompt_5opt | STRING | — | |
| negative_promptopt | STRING | — | |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image_1_out | IMAGE | — |
| image_2_out | IMAGE | — |
| image_3_out | IMAGE | — |
| image_4_out | IMAGE | — |
| image_5_out | IMAGE | — |