Pepe Image Filter
Pause the queue and hand-pick which images keep going
- images
- latents
- masks
- images
- latents
- masks
- extra1
- extra2
- extra3
- indexes
- choice_index
- choice_name
Generate a batch and you get N images you have to sort through. ComfyUI core has no native "pick the good ones mid-run" node, so people either rerun, or they save everything and sort afterward. Pepe Image Filter fixes that the direct way: it pauses the workflow, pops an interactive image grid in the browser, and waits for you to click which images continue. Then - and this is where it gets genuinely clever - it hands you a choice that can drive the rest of the graph, routing you down whichever branch you picked.
It's a polished fork of Chris Goringe's cg-image-filter (Apache-2.0, attribution retained in the pack's third_party folder), and it's the hub of the whole PepeUtils flow-control family.
How it works
The node previews your batch, then blocks execution while it waits for you in the popup. You select one or more images, zoom in to inspect, and send the selection onward. Because it's built on ComfyUI's PreviewImage, the grid and selection UI live in the frontend and the backend sits idle until you answer. When you provide the optional latents and masks inputs, they're selected in lockstep using the same indices - so the latent that produced a chosen image comes along automatically. The three optional extra1–extra3 string values ride through too, and you can edit them right in the popup.
The inputs that matter most:
images- the batch.timeout(default 600s) andontimeout(send none/send all/send first/send last) decide what happens if you never answer.choices- the flow-control bit. Enter up to eight button labels, one per line (default is a single Proceed). Clicking one sends the selection and returns both its zero-basedchoice_indexandchoice_name.pick_list- skip the popup entirely with comma-separated indices;pick_list_startcontrols the numbering in theindexesoutput.
There are a few power features worth knowing. video_frames groups consecutive frames into selectable clips for video work. equirectangular_projection opens still candidates in the pack's interactive panorama viewer, so you can inspect a 360 image properly before choosing it. And if every image in the batch is identical, it auto-sends instead of making you click through duplicates.
Outputs
images, latents, masks, extra1–extra3, indexes (comma-separated string of chosen indices), choice_index (int), and choice_name (string).
The routing pattern
This is the part people actually build workflows around. Connect choice_index to a Pepe Lazy Route, and each branch result to the matching choice_0 through choice_7 input. The router asks ComfyUI to evaluate only the selected input, so expensive unselected branches - an extra sampling pass, a heavy upscaler - never run. When each route ends in its own Save or Preview node, use Pepe Route Split instead, since lazy merging can't suppress an output node elsewhere in the graph.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Pepehoschi/ComfyUI-PepeUtils.git
or ComfyUI Manager → ComfyUI-PepeUtils, then restart. It ships a web component, so the restart matters - the popup UI won't exist until the frontend reloads. No extra Python dependencies.
Gotchas
Two realistic failure modes. First: if you select nothing and send, the node raises an interrupt and the run stops - that's by design, not a bug. Second: it's an output node, so it always runs and always waits. Leave it in an unattended batch with a 600-second timeout and you'll either wait or hit ontimeout; set a short timeout, a sensible ontimeout, or a pick_list if you're automating.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| timeout | INT | 6001–1000000 | Timeout in seconds |
| ontimeout | COMBO | 4 options: send none, send all, send first, send last | |
| latentsopt | LATENT | Pass through matching latent samples | |
| masksopt | MASK | Pass through matching masks | |
| tipopt | STRING | — | |
| extra1opt | STRING | — | |
| extra2opt | STRING | — | |
| extra3opt | STRING | — | |
| choicesopt | STRING | Proceed | One flow-control choice per line (maximum 8) |
| default_choiceopt | INT | 00–7 | Zero-based choice used for timeout and automatic sends |
| pick_list_startopt | INT | 0 | Index assigned to the first image |
| pick_listopt | STRING | Comma-separated indices to select automatically | |
| video_framesopt | INT | 1 | Treat each block of N images as a video |
| equirectangular_projectionopt | BOOLEAN | false | Open still-image candidates in an interactive panorama projection |
| audiofileopt | STRING | Audio path, URL, or bundled audio filename | |
| graph_idopt | STRING | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| latents | LATENT | — |
| masks | MASK | — |
| extra1 | STRING | — |
| extra2 | STRING | — |
| extra3 | STRING | — |
| indexes | STRING | — |
| choice_index | INT | — |
| choice_name | STRING | — |