Nodes/ComfyUI-PepeUtils/Pepe Image Filter
ComfyUI Node

Pepe Image Filter

Pause the queue and hand-pick which images keep going

By Pepehoschi·Created 5 months ago·Updated 2 days ago· 0
Pepe Image Filter
  • images
  • latents
  • masks
  • images
  • latents
  • masks
  • extra1
  • extra2
  • extra3
  • indexes
  • choice_index
  • choice_name
timeout600
ontimeout
tip
extra1
extra2
extra3
choicesProceed
default_choice0
pick_list_start0
pick_list
video_frames1
equirectangular_projectionfalse
audiofile
graph_id

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 extra1extra3 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) and ontimeout (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-based choice_index and choice_name.
  • pick_list - skip the popup entirely with comma-separated indices; pick_list_start controls the numbering in the indexes output.

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, extra1extra3, 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.

CategoryPepeUtils/image

Inputs (17)

NameTypeDefaultDescription
imagesIMAGE
timeoutINT6001–1000000Timeout in seconds
ontimeoutCOMBO4 options: send none, send all, send first, send last
latentsoptLATENTPass through matching latent samples
masksoptMASKPass through matching masks
tipoptSTRING
extra1optSTRING
extra2optSTRING
extra3optSTRING
choicesoptSTRINGProceedOne flow-control choice per line (maximum 8)
default_choiceoptINT00–7Zero-based choice used for timeout and automatic sends
pick_list_startoptINT0Index assigned to the first image
pick_listoptSTRINGComma-separated indices to select automatically
video_framesoptINT1Treat each block of N images as a video
equirectangular_projectionoptBOOLEANfalseOpen still-image candidates in an interactive panorama projection
audiofileoptSTRINGAudio path, URL, or bundled audio filename
graph_idoptSTRING

Outputs (9)

NameTypeDescription
imagesIMAGE
latentsLATENT
masksMASK
extra1STRING
extra2STRING
extra3STRING
indexesSTRING
choice_indexINT
choice_nameSTRING