Nodes/ComfyUI Preview Monitor/Hybrid Preview Image Monitor
ComfyUI Node

Hybrid Preview Image Monitor

The Preview Monitor That Keeps Your Batch History

By xhh522·Created 12 months ago·Updated 12 months ago· 1
Hybrid Preview Image Monitor
  • images
  • compare_images
  • images
modenew
monitorMonitor 0: 1920x1080
power_stateOn
fit_modefit
target_resolution3840x2160
gain1.0
gamma1.0
saturation1.0
white_mattefalse
fps_modesmart

Its sibling PreviewImageMonitor opens a fullscreen window on a second display and swaps in each new result. Hybrid Preview Image Monitor does the same trick, then adds the thing batch workers actually want: it remembers what it's shown. Instead of replacing the picture every run, it queues images and lets you flip back through the whole session - which turns out to be genuinely useful when you're iterating on prompts or LoRA weights and want to compare run 4 against run 12 without digging through your output folder.

How it works

The name oversells the mechanism a little. "Hybrid" in the shipped code means a pygame window plus a localhost HTTP server (port 5060) that serves the queued images over an /api/image/ endpoint - the web half exists, but the window you actually see is pygame, opened as a resizable (and on Windows, auto-maximized) window. It's effectively a screen-remote-control architecture that happens to render with pygame.

The real story is the queue. A mode input switches between two behaviors:

  • new - clears the queue and resets the index to 1. Fresh start every run.
  • append - adds to the session history, with dedup: if your new images are identical to the last item in the queue, the node skips them instead of cluttering your history.

Indexes auto-increment from 1, and you can jump around with the keyboard - type 15 then Enter to leap to the 15th image, Space or the arrows to step through, ESC to bail. There's even a two-second input timeout so a stray keystroke doesn't wedge you in "number entry" mode. Feed in compare_images and the node stores each pair as a single comparison entry, mouse-controlled split line and all, exactly like the non-hybrid node.

Inputs and outputs that matter

Beyond images (required, your IMAGE tensor), the ones you'll actually set:

  • mode - new or append. This is the whole personality of the node; append is why you'd pick it over the simpler sibling.
  • monitor - which display gets the window.
  • power_state - Off shuts the window down cleanly.
  • target_resolution - a much longer list than the sibling node (17 entries) including portrait and ultrawide sizes like 2160x3840 and 3440x1440, defaulting to your primary monitor's resolution.
  • fit_mode (fit letterboxes, fill crops, distort stretches), gain/gamma/saturation on-screen color trims, white_matte, and fps_mode - which adds a 60fps option the sibling lacks.

Output is a single images passthrough of your input - it's an output node, so wire it last and don't expect it to transform anything.

Installing it

Same pack, same install as its sibling - ComfyUI Manager, search "ComfyUI Preview Monitor", or:

cd ComfyUI/custom_nodes
git clone https://github.com/xhh522/ComfyUI-preview-monitor
cd ComfyUI-preview-monitor
pip install -r requirements.txt

Then restart. No model files, no API keys.

Gotchas

Here's where this node bites. The README lists pywebview as optional, but the code treats it as a hard gate: if the webview import fails, the node prints an error and returns without showing anything. So install it - pip install pywebview - even though the docs call it a nice-to-have. Pygame is likewise non-negotiable.

Also, at startup the pack's __init__.py tries to load a Web-mode module (web_preview_simple_fixed) that isn't in the shipped tree. You'll likely see a harmless "Web version dependency missing" warning in the console - that's expected, not a broken install. It's the same story as the README's Web-mode promises: treat this as a pygame window with a web server underneath and you won't be surprised. The queue plus the numeric jump is the genuinely good idea here; everything else is the sibling node with extra switches.

Categoryimage/preview

Inputs (12)

NameTypeDefaultDescription
imagesIMAGE
modeCOMBOnew2 options: new, append
monitorCOMBOMonitor 0: 1920x10801 options: Monitor 0: 1920x1080
power_stateCOMBOOn2 options: On, Off
fit_modeCOMBOfit7 options: none, width, height, fit, fill, distort, +1
target_resolutionCOMBO3840x216017 options: 3840x2160, 2160x3840, 3440x1440, 2560x1600, 2560x1440, 1440x2560, +11
gainFLOAT1.00–10
gammaFLOAT1.00–10
saturationFLOAT1.00–10
white_matteBOOLEANfalse
fps_modeCOMBOsmart4 options: smart, 15fps, 30fps, 60fps
compare_imagesoptIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE