Nougan Model Preview Mirror πͺ
Nougan Model Preview Mirror
- any
- any
This node does no sampling, no encoding, and no image work whatsoever. It displays the live preview stream that KJNodes' Model Preview Override is already broadcasting, on a node you can park anywhere in your graph - including in the middle of a chain, where the prompt says the preview should be.
That's the whole thing. If you've ever had the sampler's preview buried under a wall of nodes at the far edge of a video workflow, or a latent preview too small to judge, this is the fix. It's a mirror, not a window.
How it pulls it off
KJNodes' Model Preview Override attaches a wrapper to the MODEL that broadcasts preview frames to your browser, and the python half of this node is about forty lines: it exists so the frontend has something to hang a DOM preview widget on, and it returns whatever came in.
Two bits are worth knowing. First, the socket is a wildcard type - the Python side is a subclass of str whose __eq__ returns True against everything, so any connects to any type in either direction. It passes the value through unchanged, which is what lets you drop it inline rather than branching off. Second, if the value coming in happens to be a MODEL carrying a preview override, the node reads the wrapper's node_id and pins itself to that one preview; connect a non-model, or nothing at all, and it follows whichever preview is currently sampling.
It's also an output node, which means it executes even with nothing wired to its output. Leave any empty and it's a floating preview panel.
Inputs and outputs
preview_fps (1β60, default 12) is the only required field - the playback rate of the mirror, and per the tooltip it's ignored for clips that carry audio, since those carry their own timing.
any is optional and accepts anything. Two behaviours, one field:
- Empty, or connected to a non-MODEL β mirrors whatever is sampling. The general-purpose panel.
- Connected to a MODEL with a Preview Override on it β follows only that preview. Useful when your graph samples twice (a refinement pass, say) and you want the panel locked to the one you care about.
One output, any, same type, unchanged. Wire it onward as if the node weren't there.
Install
Part of the Nougan pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Nougan_Nodes
# restart ComfyUI
Or ComfyUI Manager, search Nougan. Then the actual requirement people miss: KJNodes must be installed and the Model Preview Override must be in play. This node imports nothing from KJNodes - by design, so a missing KJNodes can't break the pack's boot - but with no override broadcasting, there's nothing to mirror and you get an empty panel with no error. Add ComfyUI-KJNodes from the manager if you don't already have it, then hard-refresh your browser (Ctrl+F5) so the node's JS panel actually loads.
What goes wrong
Blank panel, no error anywhere. Almost always one of two things: KJNodes isn't installed, or no sampler in the run has the preview override attached. The node cannot tell you this, because it never talks to KJNodes.
Stale panel after an update. Every node in this pack draws its own frontend; if the panel looks unstyled or the badge is missing, it's a browser cache, not a broken install. Ctrl+F5.
It "silently eats" your chain. It doesn't - but because the socket accepts anything and passes it through, a mis-wire upstream is invisible here. If your graph produces the wrong thing after inserting the Mirror, the Mirror isn't the culprit; check what you fed it.
Two mirrors, one stream. Both will show the currently-sampling preview unless you pin them to a MODEL each. If you want a before/after pair, that's what the MODEL input is for.
Where this fits, in the broad sense: it's plumbing, and plumbing is roughly 70% of every workflow and 0% of every tutorial (comfyui-node-plumbing.md makes the case better than I can). A node whose entire job is "put the useful readout where your eyeballs are" is a real quality-of-life win, and given that previews are also how you catch a graph going wrong at step 3 instead of step 30 (troubleshooting.md), having one where you can see it is worth more than it sounds.
Caveat, because it's a young node from a one-person pack: this is a thin wrapper around someone else's feature. If KJNodes changes its wrapper key, the pinning stops working and it degrades to a generic panel. Given that KJNodes is one of the most-installed packs in the ecosystem, that's a real dependency to be aware of - but the failure mode is graceful, which is more than most glue nodes manage.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| preview_fps | INT | 121β60 | Playback FPS for this mirror (ignored for clips that carry audio). |
| anyopt | * | Optional. Connect anything, anywhere in your chain; it is passed through unchanged. Leave empty (or connect a non-model) to mirror whichever preview is sampling. Connect a MODEL that carries a Model Preview Override to follow only that one. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any | * | β |