Nodes/X-WIDE Image / Latent Sender / Receiver/X-WIDE Image Receiver 图像接收器
ComfyUI Node

X-WIDE Image Receiver 图像接收器

The other end of the send, and why it starts out empty

By XWIDE·Created 22 days ago·Updated 22 days ago· 2
X-WIDE Image Receiver 图像接收器
    • image
    • mask
    ◄image▾►
    ◄link_id0►
    ◄save_to_workflowfalse►
    ◄image_data—►
    ◄trigger_alwaysfalse►

    An empty Image Receiver is the most confusing node state in ComfyUI: something that looks like Load Image, sitting mid-graph, holding a filename you never typed. The whole story: it's the far end of the X-WIDE Image Sender, and the browser fills that dropdown, not you.

    What it is, and the workflow it exists for

    This is X-WIDE's standalone version of ltdrdata's Image Receiver from the Impact Pack: same protocol, same widget order, no Impact Pack needed. The classic use is a feedback loop - the graph generates an image, the sender hands it to a receiver planted earlier in the pipeline, and the receiver does the job of Load Image on the next run, so you can keep refining that exact image upstream without re-uploading it. Duplicate the receiver, give it a new id, and you can keep several candidates alive at once.

    How it works

    The sender saves the image into ComfyUI/temp/ and fires an img-send event. Every receiver with the same link_id takes the filename, appends the folder annotation - ImgSender_00003_.png [temp] - writes it into the image dropdown, and pulls the preview from ComfyUI's /view endpoint. That annotation is the same convention Load Image uses for input//output//temp/, so the backend side here is a LoadImage read with a fallback bolted on.

    The important consequence: the value is a file path, not pixels. The next queue reads whatever path was in the box at queue time, so you get the image from the previous send - and if temp/ has been wiped (it's cleared on restart) there's nothing there to read.

    trigger_always is the usual "ignore the cache" switch, done the way any must-run node does it: an IS_CHANGED returning NaN, which never equals itself, so the node is dirty every run.

    Inputs and outputs

    • image - the enum picker, auto-filled with the last received temp file. It also lists everything in ComfyUI/input/, so it doubles as a normal image picker.
    • link_id - the pairing number; must match the sender. Defaults to 0 on every node in the pack, which is a collision waiting to happen.
    • save_to_workflow - the interesting one, false by default. With it on, the received image rides along with the queued prompt as data: the widget's serializeValue encodes the on-screen image to base64 at queue time, into the API prompt only, never into widgets_values. That's the real fix over the original, which inlined megabytes of base64 into the workflow JSON, blew the localStorage draft quota ("failed to save draft") and made canvases stutter.
    • image_data - leave it alone. It's deliberately empty in the saved workflow; the front end fills it on demand.
    • trigger_always - as above, force a re-run each queue.

    Outputs are image (IMAGE) and mask (MASK). The mask follows ComfyUI's own LoadImage convention: the PNG's alpha channel inverted when there is one, otherwise a 64×64 block of zeros meaning "no mask". Wire image where an image goes; mask into inpaint/segment nodes if you're sending transparency.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/XWIDE/comfyui-x-wide-image-latent-sender-receiver
    

    Restart ComfyUI, then Ctrl + F5 - the receiving half is JavaScript, so a stale page silently does nothing. Manager works too: search X-WIDE Image Latent Sender / Receiver. No models, no pip install: the dependency list is empty. The repo was renamed in October 2026, so the older comfyui-x-wide-image-sender-receiver URL now redirects - same content, either link clones.

    Common issues

    The node is empty on the first run. Nothing has been sent yet. Wire its output downstream, run once, and the image appears for the next queue. That one-run lag surprises everyone exactly once.

    Preview goes blank after switching workflow tabs. The headline bug this pack fixes: the original's preview loader mapped the fetch response to itself, so the image src never became a /view?... URL. This version builds the URL directly, falling back through temp → input → the last draft's base64.

    Your output is a small black square. That's the fallback: when the file can't be read, the node logs a warning and emits a 64×64 placeholder instead of failing the run. Kinder than a red box, easier to miss - so if you get a thumbnail of nothing, suspect a cleared temp/ folder or a sender that never ran.

    A missing file still red-boxes with save_to_workflow off - validation insists the path exists, because there's no other source for the pixels. Turn it on if you want a vanished temp file to degrade instead of blocking the queue.

    CategoryX-WIDE/Image

    Inputs (5)

    NameTypeDefaultDescription
    imageCOMBO要读取的图片。收到 Sender 发来的图后,这里会自动填入临时文件。 / Image to load. Filled automatically with the received temp file.
    link_idINT00–9223372036854776000配对编号:和 Image Sender 的 link_id 相同才会收到它的图。 / Pairing id: only the Sender with the same link_id will send to this node.
    save_to_workflowBOOLEANfalse勾选后,收到的图会在排队时作为图像数据随提示一起发送(工作流文件本身不会内联 base64,所以不会撑爆草稿存储,也不会让画布变卡)。 / When enabled, the received image is injected into the queued prompt. The image data is NOT inlined into the workflow file itself.
    image_dataSTRING图像数据(由前端在排队时按需生成,平时为空)。 / Image data, generated on demand by the frontend when the prompt is queued. Kept empty in the saved workflow on purpose.
    trigger_alwaysBOOLEANfalse开启后本节点每次都重新执行(忽略缓存)。 / When enabled the node always re-executes, ignoring the cache.

    Outputs (2)

    NameTypeDescription
    imageIMAGE—
    maskMASK—