🎈LG_ImageReceiver
The other end of the wire — images arrive, alpha becomes a mask
- images
- masks
LG_ImageReceiver is the pickup point for everything LG_ImageSender puts in the mailbox. Where the Sender saves images to ComfyUI's temp folder and pings the browser, this node sits in the part of the graph that needs them, matches on the same link_id, auto-fills its own input with the filenames, and loads them back as an IMAGE list plus a MASK list. If you've ever built a workflow where the upscaler half and the generation half can't live on the same page, this is the handoff.
It's from Comfyui-LG_GroupExecutor, the small LAOGOU-666 utility pack - no Python deps, no model downloads, and no English reddit presence worth finding, so treat the docs here as the best available. The mechanism is simple and worth understanding because the mask handling is a bit sneaky.
How it works
The image input is a comma-separated list of filenames - but you almost never type it. When an LG_ImageSender with the same link_id fires, the pack's frontend JS listens for the img-send websocket event, finds any LG_ImageReceiver node with a matching link_id, and writes the filenames into its image widget for you. Then on execution the Python splits on commas, joins each name to the temp directory, and loads the files.
The interesting bit is the alpha channel. The Sender saves RGBA PNGs where alpha is the mask (inverted). The Receiver does the reverse: if a file is RGBA it splits off alpha, converts it to a MASK tensor, and inverts it (1 - mask) so that mask semantics match what you'd expect from a normal mask node. Non-RGBA files get a zero mask. So sender → receiver is effectively an image-plus-mask round trip through disk.
Inputs
- image (STRING) - comma-separated temp filenames. Auto-filled by the frontend; you can also paste names manually if you know them.
- link_id (default 1) - must match the Sender's.
Outputs
- images - IMAGE list, one tensor per file.
- masks - MASK list, one per image (derived from alpha, or zeros if no alpha).
Both are lists, ready for anything that takes a batch or list input.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui-LG_GroupExecutor
or via ComfyUI Manager → "Comfyui-LG_GroupExecutor", then restart.
Where people get burned
- Empty input returns garbage you might not notice. With no filenames, the node returns a single 64×64 black image and a 64×64 zero mask - which will happily flow downstream and produce a black output. If your results suddenly go black, check that the Receiver actually got a link_id match.
- Missing files are silently skipped. The Sender's temp file is gone (temp gets cleaned, or the Sender never ran) and you'll just get fewer images back than you sent.
- It's browser-dependent. The auto-fill is frontend JS, so headless/API execution won't populate the field.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | 多个文件名用逗号分隔 | |
| link_id | INT | 10–9223372036854776000 | 发送端连接ID |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |