并发提交|MAI Image 2.6 / Flash 生成/编辑
Thirty MAI Image 2.6 jobs in one run — the concurrent wrapper, explained
- image1
- image2
- image3
- image4
- image5
- api_config
- future
SeedanceConcurrent_MAI_Image_2_6_Submit is MAI_Image_2_6 with the outputs amputated. You get the same model dropdown, the same prompt, the same sizing controls, the same five reference slots - and instead of image/image_url/task_id/response you get a single output called future.
If that sounds like a downgrade, it is, right up until you want eight prompts instead of one. This node returns a receipt in milliseconds and does the waiting somewhere else.
Why the split exists
API image jobs are 20 to 60 seconds each. Chain five generator nodes and ComfyUI runs them one after another, which is fine for two and miserable for twelve. The pack's concurrent pair is the fix: a submit node that enqueues, and a receiver node that collects. The split is deliberate - it means the submit nodes stay dumb and the receiver owns the waiting, ordering and error policy.
Under the hood, the submit node runs the original node's strict validation before it enqueues anything, then hands the job to a bounded thread pool. That ordering matters. A blank prompt, a custom_pixels size outside the constraints, or a batch image in a reference slot fails locally, instantly, and without burning a single API call. Only then does the work go out. Default concurrency is 30 workers:
export SEEDANCE_IMAGE_CONCURRENCY=12 # 1..30; restart ComfyUI to pick it up
The receiver is 并发接收图片(30 路) - 30 image slots plus a status_json string. Slot order is preserved: whatever you wire into future_7 comes out as image_7, even if it finished first. Per-branch upload, poll and download progress gets summarised into one bar rather than one bar per task.
MAI-specific traps when you fan out
The edit-mode sizing rule gets more dangerous at scale, not less. If a branch has anything connected to image1–image5, its size and resolution are ignored - the upstream picks the dimensions. In a batch where you wired references into some branches and not others, you'll get a mix of your requested sizes and the model's choices, and it'll look like the node is being erratic. It isn't. Decide up front: every branch in reference mode, or none.
web_grounding is per branch. Turn it on across 30 branches and you've launched 30 Bing lookups before generation starts. That's a great feature for one carefully targeted image and a strange thing to do to a sweep.
custom_pixels constraints still apply per branch: each side at least 768, floored to multiples of 32, total area under 2,359,296 pixels. One branch violating it fails in preflight, which is the good outcome - but with skip_error on, that branch quietly becomes a placeholder and you'll only notice when you open status_json.
Wiring it up
并发提交|MAI Image 2.6 #1 future ──┐
并发提交|MAI Image 2.6 #2 future ──┤ 并发接收图片(30 路)
并发提交|MAI Image 2.6 #3 future ──┘ image_1 → Save Image
image_2 → Save Image
image_3 → Save Image
Give each submit node its own api_config connection (or none at all, if SEEDANCE_API_KEY is set - but be consistent, because a submit node with neither fails at preflight). The receiver is generic across image models, so you can absolutely mix MAI with FLUX 3 or a local upscaler's futures in the same receiver; it only cares that they're image futures.
failure_mode on the receiver decides the mood of your morning. raise stops everything and names the failing slot. placeholder keeps the good slots, fills the dead ones with a placeholder image and redacts the error into status_json, which is the setting you want when 29 of 30 results are worth having.
Install
One pack, one install:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/ComfyUI_Seedance.git
cd ..
python -m pip install -r custom_nodes/ComfyUI_Seedance/requirements.txt
Or ComfyUI Manager, searching ComfyUI Seedance. Dependencies are requests>=2.28 and that's it - the receiver node ships in the same pack, so there's nothing else to add. The examples/ directory carries 并发图片2路最小验证.json and 并发图片30路示例.json; drag the first one in to see the wiring before you build your own.
Cost, because someone has to say it
Thirty slots means thirty calls. MAI Image 2.6 is a metered closed model, and the Flash tier exists precisely so you can iterate cheaply. Draft on 1k + Flash across the fan-out, then promote the two prompts worth keeping to mai-image-2-6 at 2k. Also remember every reference image in every branch is uploaded - a 30-branch sweep with a shared reference set is 30 uploads of the same file. It works, but on a rate-limited token the upload stage is where your run spends its first minute.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | mai-image-2-6 | 2 options: mai-image-2-6, mai-image-2-6-flash |
| prompt | STRING | Required description or editing instruction; upstream limit about 32000 tokens. | 必填生成或编辑描述;上游限制约 32000 Token。 | |
| resolution | COMBO | 1k | 2 options: 1k, 2k |
| size | COMBO | 1:1 | 15 options: auto, 1:1, 2:3, 3:2, 3:4, 4:3, +9 |
| custom_ratio | STRING | 16:9 | Positive integer W:H, between 1:4 and 4:1. | 正整数宽高比,范围 1:4 至 4:1。 |
| width | INT | 1536768–3072 | — |
| height | INT | 1024768–3072 | — |
| auto_aspect_ratio | BOOLEAN | false | Let the model choose the text-generation aspect ratio. | 由模型选择文生图画幅。 |
| web_grounding | BOOLEAN | false | Search current information with Bing before generation. | 生成前通过 Bing 检索当前信息。 |
| image1opt | IMAGE | Optional reference 1/5, one image per slot. | 可选参考图 1/5,每路一张。 | |
| image2opt | IMAGE | Optional reference 2/5, one image per slot. | 可选参考图 2/5,每路一张。 | |
| image3opt | IMAGE | Optional reference 3/5, one image per slot. | 可选参考图 3/5,每路一张。 | |
| image4opt | IMAGE | Optional reference 4/5, one image per slot. | 可选参考图 4/5,每路一张。 | |
| image5opt | IMAGE | Optional reference 5/5, one image per slot. | 可选参考图 5/5,每路一张。 | |
| api_configopt | SEEDANCE_CONFIG | — | |
| skip_erroropt | BOOLEAN | false | — |
| seedopt | INT | 00–18446744073709550000 | ComfyUI cache seed. Fixed reuses the cached result while all other inputs stay unchanged; randomize/increment/decrement starts a new execution. This value is not sent to models without documented seed support. | ComfyUI 缓存种子;Fixed 在其他输入不变时复用缓存,随机、递增或递减会触发新任务。未声明支持 seed 的模型不会收到此参数。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| future | SEEDANCE_IMAGE_FUTURE | — |