Seedream5.0 Pro - Layer Decomposition
Explode a Design Into Editable Layers
- image_url
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
The odd one out in this pack
Every other image node here generates or edits. This one takes an existing picture and pulls it apart - the base image plus each named element as its own layer file. So the output isn't a prettier picture, it's a structural change to your material: you go from "a flattened JPEG a client approved" to "a base plate and a set of transparent PNGs you can move, hide or restyle."
That's the job layered generation has been circling for a while - Qwen-Image-Layered's recursive RGBA decomposition is the open-weights parallel, and LayerDiffusion was the SDXL-era attempt at native transparency. The practical use case is rebuilding: you have an approved composition, you need one element moved, and you don't want to re-render and lose the approval. Decompose, move the layer, recomposite. Same logic as the product-photography pipelines where you separate subject from background instead of prompting for both at once.
Inputs, including the weird one
- prompt - required, and this is where the node earns its keep. Per the documentation it accepts
<bbox>x1 y1 x2 y2</bbox>tags to name exactly what should be separated, with normalised coordinates in a 0–1000 range. The default prompt does precisely that - separating a title text block and a parrot by bounding box. If you provide no prompt, the model picks the main elements itself, which is the fast path for "just give me the obvious objects." - image_url - a native
IMAGEsocket (singular). The endpoint documents exactly one image, no HEIC/HEIF, up to 30 MB, total pixels between 262,144 and 36,000,000, and aspect ratio within 1:16 to 16:1. Wire a single image; don't hand it a batch. - size -
auto(default),1K,1.5K,2K.autois chosen from the input image; the base plate keeps the input's aspect ratio and each layer keeps its own element's aspect ratio. - output_format -
jpegorpng, and read the tooltip carefully: this controls the base image only. Separated layers are always PNG. That's the alpha channel you need, and it's a nice detail that they made it non-configurable. - timeout_seconds (1200 default), callback_url (leave empty).
Outputs: image, url, all_urls_json, task_id, raw_json, credits_consumed, credits_left.
The output shape you need to understand
There's one IMAGE socket and one task_id, but a decomposition produces several files. The image output is the base plate; the separated layers come back as URLs inside all_urls_json. So the wiring is: read a layer URL out of that JSON, then pull it into your graph with KIE • Download Image (URL in, IMAGE out) - that's the pack's base utility node for exactly this. Expect a little JSON handling; this node hands you the manifest, not a tidy list of sockets.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
Restart ComfyUI, then set your key once at Settings → KIE.ai Nodes Next → Connection - validated before it replaces anything, masked in the UI, and kept out of workflow JSON.
When to use it, when not to
Use it when you need parts. If you want the object without its background, the local route - BiRefNet, rembg - is free and excellent, and a cloud decomposition is an expensive way to get one cutout. Use this when you want several named elements plus a base plate, or when the bounding-box targeting saves you from segmenting three things by hand.
Don't expect pixel-perfect inpainting quality at every edge; decomposition is a different problem from matting, and the honest comparison here is against reconstruction workflows, not against a segmentation model. And as always with a hosted call: your source image goes to the provider, which for a pre-release design under NDA is a decision worth making consciously.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers | Optional prompt for layer separation. - When a prompt is provided, the model separates the specified elements based on the prompt - When no prompt is provided, the model automatically identifies the main elements in the image - Supports using `<bbox>x1 y1 x2 y2</bbox>` to precisely specify element positions, recommending the use of normalized coordinates in the 0-1000 range |
| image_url | IMAGE | — | |
| sizeopt | COMBO | auto | Resolution level of the output image. The base image maintains the aspect ratio of the input image, and each separated layer maintains the aspect ratio of the corresponding element in the original image. - `auto`: Automatically selected based on the input image size - `1K`: 1K resolution level - `1.5K`: 1.5K resolution level - `2K`: 2K resolution level |
| output_formatopt | COMBO | jpeg | Output format of the base image. This parameter only controls the base image format; all separated layers are fixed to output as PNG. |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |