Legion: Exporter
How a worker hands results back to your main graph
- input_1
- input_2
- input_3
- input_4
- input_5
LegionExporter is the closing bracket of every LegionPower worker workflow. Where Legion: Importer pulls data in from your main graph, this node serializes whatever your worker produced and ships it back across the wire. It's a terminal node - no outputs, nothing wired after it - and it's the second half of the pair that makes the whole "separate ComfyUI instance" trick possible.
You reach for it any time you're building the worker half of a LegionPower setup. The canonical example is a face-restore worker (LegionImporter → ReActorRestoreFace → LegionExporter) that runs in its own process so ReActor's VRAM appetite doesn't permanently bloat your main instance. That's the pack's whole reason to exist.
How it works
Your Master (on the main instance) patches the worker workflow so data_exchange_root points at a run-specific temp folder. When the worker executes, this node takes whatever is connected to input_1 through input_5, serializes it into that folder, and writes a manifest_output.json describing what it saved. The Master - or Legion: Join, in async mode - reads that manifest afterwards and deserializes everything back into real tensors and primitives on your side.
Inputs
data_exchange_root(required) - must come from Legion: Importer's passthrough output. If you're wiring this manually, you're doing it wrong; the Master sets the value, the Importer relays it.input_1…input_5(optional, any type) - the results you want back. Wire your worker's final outputs here.
What you can send back is the pack's biggest current limit: only images (single tensors and batches) and primitives (int, float, str, bool) have serializers. Feed it a LATENT, CONDITIONING, or MODEL and it prints a warning and silently skips it - your result comes back as None. Fine for post-processing workflows; useless for shipping a checkpoint back to the main graph.
Installing
Search "LegionPower" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Transhumai/ComfyUI-LegionPower.git
cd ComfyUI-LegionPower
pip install -r requirements.txt
Restart ComfyUI. The dependency list is just requests; no models to download.
Troubleshooting
Output manifest not foundon the Master side is the classic symptom: the worker ran, but this node wasn't there, wasn't connected, or had nothing on its inputs. Every worker workflow needs an Exporter, and at least one input wired.- Outputs come back
Nonewhen you've connected an unsupported type. The console warning[Legion Exporter] WARNING: Unsupported data typetells you exactly which input was skipped. - Path errors about files outside the allowed directory - that's the node's built-in security check. It means
data_exchange_rootisn't pointing at the Legion temp folder, which usually happens when the Importer's passthrough wasn't used.
Bottom line: it's dead simple on purpose. If the worker produced images, this is how they get home.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| data_exchange_root | STRING | — | |
| input_1opt | * | — | |
| input_2opt | * | — | |
| input_3opt | * | — | |
| input_4opt | * | — | |
| input_5opt | * | — |
Outputs (0)
No outputs