🎈LG_ImageSender
Ship images across your graph without dragging a wire
- images
- masks
- signal_opt
- signal
Sometimes you can't drag a wire from where an image is made to where it's needed - the graph is too tangled, the two halves run at different times, or you're handing off to a separate workflow entirely. LG_ImageSender is the "throw it over the wall" half of that problem: it writes your images to ComfyUI's temp folder and tells a matching LG_ImageReceiver where to find them, keyed by a link_id. Think of it as a reroute that survives a restart, or a poor-man's image mailbox.
This is one of the value nodes in Comfyui-LG_GroupExecutor, a small LAOGOU-666 utility pack (v1.3.6) with no Python dependencies and no models. The sender/receiver pattern is its answer to the "I need these pixels over there" problem, and unlike the group-execution features, this one doesn't need anything exotic - it's a save-to-temp plus a websocket ping.
How it works
The Python does the heavy lifting: each input image is squeezed to a single frame, merged with its mask (if provided) into an RGBA PNG, and saved to folder_paths.get_temp_directory() with a name like lg_send_1_<timestamp>_0.png. The alpha channel is the mask (inverted), so a full mask becomes opaque and a blank one transparent. Then it fires a websocket event img-send carrying the filenames and your link_id - and the frontend matches that to any LG_ImageReceiver in the loaded graph with the same link_id, auto-filling its image field.
Two flags change behavior:
- accumulate - off by default. Flip it on and every run's images pile up in a list that all gets sent together on the next run, instead of just the current batch. The node's
IS_CHANGEDreturns NaN in accumulate mode, so it always re-runs. This is the "collect over several passes, then ship" mode. - preview_rgba - on by default. On, the preview shows the RGBA file (with alpha). Off, it writes a separate RGB JPEG preview for display while the alpha file is still what gets sent. The 2025.4.25 changelog in the README is literally about fixing the rgba/rgb preview path, so this toggle has history.
Inputs & outputs
- images (IMAGE) - what you're sending.
- filename_prefix (default
lg_send) - base name for the temp files. - link_id (default 1) - must match the receiver's link_id. This is your channel; pick different IDs for different pairs.
- masks (optional MASK) - becomes the alpha of the sent PNG.
- signal_opt (optional, any type) - passes through unchanged as the output signal, so you can daisy-chain execution.
Output: signal (list). Also an output node, so it shows a preview in the UI.
Install
ComfyUI Manager → "Comfyui-LG_GroupExecutor", or:
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui-LG_GroupExecutor
Restart. Done - no pip, no models.
Gotchas
- Temp files aren't permanent. This writes to the temp directory, which ComfyUI may clean up. Long-lived handoffs belong in the output folder, not here.
- link_id is everything. Sender and receiver with different IDs just never see each other, and nothing tells you - the receiver sits there empty.
- Needs the browser session. The auto-fill is frontend JS, so a pure API-driven run won't populate the receiver.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | 要发送的图像 | |
| filename_prefix | STRING | lg_send | — |
| link_id | INT | 10–9223372036854776000 | 发送端连接ID |
| accumulate | BOOLEAN | false | 开启后将累积所有图像一起发送 |
| preview_rgba | BOOLEAN | true | 开启后预览显示RGBA格式,关闭则预览显示RGB格式 |
| masksopt | MASK | 要发送的遮罩 | |
| signal_optopt | * | 信号输入,将在处理完成后原样输出 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| signal | * | — |