Hybrid Preview Image Monitor
The Preview Monitor That Keeps Your Batch History
- images
- compare_images
- images
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-neworappend. This is the whole personality of the node;appendis why you'd pick it over the simpler sibling.monitor- which display gets the window.power_state-Offshuts the window down cleanly.target_resolution- a much longer list than the sibling node (17 entries) including portrait and ultrawide sizes like2160x3840and3440x1440, defaulting to your primary monitor's resolution.fit_mode(fitletterboxes,fillcrops,distortstretches),gain/gamma/saturationon-screen color trims,white_matte, andfps_mode- which adds a60fpsoption 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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| mode | COMBO | new | 2 options: new, append |
| monitor | COMBO | Monitor 0: 1920x1080 | 1 options: Monitor 0: 1920x1080 |
| power_state | COMBO | On | 2 options: On, Off |
| fit_mode | COMBO | fit | 7 options: none, width, height, fit, fill, distort, +1 |
| target_resolution | COMBO | 3840x2160 | 17 options: 3840x2160, 2160x3840, 3440x1440, 2560x1600, 2560x1440, 1440x2560, +11 |
| gain | FLOAT | 1.00–10 | — |
| gamma | FLOAT | 1.00–10 | — |
| saturation | FLOAT | 1.00–10 | — |
| white_matte | BOOLEAN | false | — |
| fps_mode | COMBO | smart | 4 options: smart, 15fps, 30fps, 60fps |
| compare_imagesopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |