Nodes/comfyUI-multi-preview/MultiPreviewInternalReceiver
ComfyUI Node

MultiPreviewInternalReceiver

The invisible node that makes MultiPreview fast

By palealloy2999-prog·Created 4 months ago·Updated a day ago· 1
MultiPreviewInternalReceiver
  • image
    parent_id
    pin1
    state_key

    MultiPreviewInternalReceiver: you never place this node, and that's the point

    This is the node inside the comfyUI-multi-preview pack that you'll probably never add to a graph - and shouldn't. If you came here because it showed up somewhere and you're wondering what it is, the short answer: it's the machinery that makes MultiPreview and MultiPreview Auto update live, and it's supposed to stay invisible.

    Here's how it works. When you hit Queue, the pack's frontend extension patches ComfyUI's queue call and, for every connected imageN input on a MultiPreview node, injects one of these receivers into the execution prompt. Each receiver is wired to the same image source as its parent pin, and it runs as soon as that branch completes - which is earlier than the parent itself runs, because the parent has to wait for every branch. The receiver saves the image to ComfyUI's temp directory and fires a custom multi_preview_receiver event to the browser, so the frontend can display that pin instantly. The parent sees the injected receivers and skips saving the same tensors twice. If there's no browser session (pure API calls), nothing gets injected and the parent just falls back to a normal preview save.

    The node's schema tells you what the injection fills in for you:

    • image (required IMAGE) - the branch output being previewed.
    • parent_id (STRING, default "") - the id of the MultiPreview node this receiver belongs to. The node refuses to run without it (requires parent_id).
    • pin (INT, 1–32, default 1) - which input slot on the parent.
    • state_key (STRING, default "") - the browser-session state key so the frontend can restore the right pin and batch position.

    Every one of those is set automatically by the pack's JavaScript. That's why you shouldn't hand-place this node: there's no path where typing values in by hand does anything useful, and with an empty parent_id it just errors. If you ever see it inside a saved workflow's JSON, or spot files named like MultiPreviewInternalReceiver_parent42_pin3.png in your temp folder, that's not a problem - that's the pack doing its job, and the temp files get cleared with the session.

    One thing worth knowing if you dig into this pack's source: it subclasses ComfyUI's own PreviewImage, which is why it inherits normal preview behavior, and the class name is an internal contract between the Python and the frontend. The pack keeps its version number in sync on both sides for exactly this reason. If a ComfyUI update ever breaks the live-update behavior, "update the pack, then hard-refresh the browser" is the standard fix - the receiver mechanism is a versioned dance, and a stale browser tab is the usual culprit.

    So treat this as a "know what it is" rather than a "how to use it" article. You don't wire it, you don't configure it, and you almost certainly won't miss it - which is exactly the sign that the thing it powers is working.

    Categoryimage

    Inputs (4)

    NameTypeDefaultDescription
    imageIMAGE
    parent_idSTRING
    pinINT11–32
    state_keySTRING

    Outputs (0)

    No outputs