Nodes/ComfyUI-LegionPower/Legion: Join All Campaigns
ComfyUI Node

Legion: Join All Campaigns

A sync barrier for up to four parallel workers

By Transhumai·Created 10 months ago·Updated 9 months ago· 1
Legion: Join All Campaigns
  • campaign_1
  • campaign_2
  • campaign_3
  • campaign_4
  • campaign_1
  • campaign_2
  • campaign_3
  • campaign_4

LegionJoinAll is the synchronization point in LegionPower. Where Legion: Join waits on one campaign, this node takes up to four campaign handles - say, from four Masters running four worker jobs in parallel across your GPUs - and blocks until all of them finish. It's a barrier, not a result collector, and knowing the difference saves you a confused afternoon.

The honest description

The node's outputs are the campaign handles themselves, not the workflow results. You give it campaign_1campaign_4 and it passes them back through after every thread has completed (raising if any campaign failed). The actual output data still comes from each Master's output_N in sync mode, or from a per-campaign Legion: Join in async mode.

So the real job of JoinAll is ordering. It guarantees that by the time execution moves past this node, all four workers are done - exactly what you want before a combine/stitch step that expects every piece to exist. The README's example shows it feeding a "CombineResults" node; in practice you'd pass the finished handles to per-campaign Joins on the other side of the barrier, since this node only relays them.

Inputs and outputs

  • campaign_1 (required) plus campaign_2campaign_4 (optional) - LEGION_CAMPAIGN handles from any Legion: Master.
  • Outputs: campaign_1campaign_4 - the same handles, in the same order, once every worker has completed.

Installing

Search "LegionPower" in ComfyUI Manager, or the usual clone:

cd ComfyUI/custom_nodes
git clone https://github.com/Transhumai/ComfyUI-LegionPower.git
cd ComfyUI-LegionPower
pip install -r requirements.txt

Restart ComfyUI. requests is the whole dependency list; nothing to fetch.

Troubleshooting

  • Campaign X failed during execution - one of the workers errored; JoinAll stops and tells you which. Fix that worker, not this node.
  • Unexpected status - a campaign's thread finished but its status isn't COMPLETED/DRY_RUN_COMPLETE; usually means a worker got killed or the poll never saw the result.
  • Results missing - expected, in a way. This node returns handles, not data. Make sure you also Join per campaign (or read the Masters' sync outputs) downstream.

Small node, precise job. If you're running more than one parallel worker, it's the difference between guessing and knowing when everything is actually done.

CategoryLegion

Inputs (4)

NameTypeDefaultDescription
campaign_1LEGION_CAMPAIGN
campaign_2optLEGION_CAMPAIGN
campaign_3optLEGION_CAMPAIGN
campaign_4optLEGION_CAMPAIGN

Outputs (4)

NameTypeDescription
campaign_1LEGION_CAMPAIGN
campaign_2LEGION_CAMPAIGN
campaign_3LEGION_CAMPAIGN
campaign_4LEGION_CAMPAIGN