Seedream / Dola Seedream v5 Pro 图层拆分(2 合 1)
The one node that turns a flat image into editable layers — Seedream's hidden trick
- image
- api_config
- images
- masks
- image_urls
- image_count
- task_id
- response
Most image models generate one picture. Seedream / Dola Seedream v5 Pro 图层拆分 does something stranger and genuinely useful: it takes a single image and decomposes it into layers - a base image plus the individual foreground elements, each with its own alpha mask. It's the closest thing this pack has to "make it a PSD," and it's the kind of API feature that exists because ByteDance's Seedream actually needs it internally for things like object editing. You get to ride along.
The inputs are minimal on purpose:
image- exactly one source image (must stay under 30 MB after PNG encoding).prompt- optional, up to 2,000 characters. You can describe what to split out; leave it blank and the model does a sensible default decomposition.resolution-auto,1k,1.5k, or2k.output_format-pngorjpeg. The tooltip says it plainly: PNG is recommended, because generated layers may contain transparency. JPEG has no alpha channel, which defeats the point.model- domesticseedream-v5-pro-layer-decomposition(default) or the overseasdola-seedream-5.0-pro-layer-decomposition.
The outputs are where this node differs from the rest of the pack: instead of one image, you get images (a list) and masks (a matching list of alpha masks), plus image_urls (the URL array as JSON), image_count, task_id, and response.
How to read the output
The API returns results in order, and the pack preserves that order exactly - it doesn't merge, rescale, or dedupe. Item 1 of images is the base image; everything after it is a layer. Each masks entry is that layer's alpha channel converted to a standard ComfyUI MASK. If you want the actual RGBA cutout back, wire each images[i] + masks[i] pair into ComfyUI's native Join Image with Alpha node - that rebuilds a transparent layer you can save or composite. The pack's own example workflow does exactly this with zero helper nodes beyond the core ones.
Mechanically it's the standard pipeline (upload the source → submit → poll → download), except the download step pulls a set of URLs and decodes them into the list outputs. The image_count output is handy for driving a loop or just sanity-checking that the API returned what you expected - the README's real-world test returned 6 images (base + 5 layers) and all six URL/IMAGE/MASK entries lined up one-to-one.
Installing it
Same pack, same install: ComfyUI Manager → search ComfyUI Seedance, or:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/ComfyUI_Seedance.git
python -m pip install -r ComfyUI_Seedance/requirements.txt
Restart, look under Seedance. No model downloads - requests plus an api.seedance.nz key is the entire dependency story.
Where people get burned
- JPEG output kills the alpha. If your layers come back without transparency, check
output_formatbefore blaming the model. PNG, always PNG. - Reading the list wrong. The first item is the base image, not a layer. If you treat every output as a layer you'll composite the background in twice.
- Layer count is up to the API.
image_countisn't a knob you set; it's a result. Don't build a workflow that assumes exactly N layers.
Result links expire and your source image goes to a third-party endpoint - the standing pack fine print. But for "give me the foreground as a transparent element," this is a genuinely unusual node that does in one API call what would otherwise take you a segmentation pass and a lot of masking. Worth a credit to try once.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Exactly one source image, up to 30 MB after upload. | 必须连接 1 张待拆分图片,上传后不超过 30 MB。 | |
| prompt | STRING | Optional decomposition instruction, up to 2000 characters. | 可选拆分要求,最多 2000 字符。 | |
| resolution | COMBO | auto | Layer decomposition resolution: auto, 1k, 1.5k, or 2k. | 图层拆分分辨率:auto、1k、1.5k 或 2k。 |
| output_format | COMBO | png | PNG is recommended because generated layers may contain transparency. | 建议使用 PNG,生成图层可能包含透明通道。 |
| api_configopt | SEEDANCE_CONFIG | Connect Seedance API Config; otherwise SEEDANCE_API_KEY is used. | |
| skip_erroropt | BOOLEAN | false | On failure return placeholder image/mask lists instead of stopping the workflow. | 失败时输出占位图片与蒙版列表而不中断工作流。 |
| seedopt | INT | 00–18446744073709550000 | ComfyUI cache seed only; this value is not sent to Seedream. | 仅用于 ComfyUI 缓存,不会发送给 Seedream。 Fixed reuses the cached result while all inputs stay unchanged; randomize/increment/decrement starts a new execution. | Fixed 在输入不变时复用缓存;随机、递增或递减会触发新任务。 |
| modelopt | COMBO | seedream-v5-pro-layer-decomposition | Domestic Seedream or overseas Dola Seedream layer decomposition. | 选择国内 Seedream 或海外 Dola Seedream 图层拆分模型。 |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |
| image_urls | STRING | — |
| image_count | INT | — |
| task_id | STRING | — |
| response | STRING | — |