Bytedance Seedream V5.0 Pro Layers
Seedream V5.0 Pro Layers slices your image into objects — at $0.77 a pop
- images
- client
- base
- layers
- masks
Layered generation is the primitive this hobby has wanted for years and mostly hasn't gotten. LayerDiffusion gave it to SD 1.5 and SDXL and then stalled - still [WIP] upstream, last port commit February 2025 - and when the community's attention moved past SDXL it went to Qwen's layer decomposition instead, which is why "QWEN Image Layers" was a +678 thread. Qwen-Image-Layered then got read as a research direction rather than a daily tool: promising editability, not the end of Photoshop.
Bytedance Seedream V5.0 Pro Layers is the cloud, per-run version of that primitive. Give it one image, get back the scene with every separated object removed, plus one RGB cut-out and one alpha mask per object.
The detail that makes it more than a segmentation model: hidden parts are regenerated. If a person was standing behind a table, the person layer contains the whole person, not just the visible half. That's a generative job, and it's the reason this costs what it costs.
What it costs, up front
$0.765 per run at 1k or 1.5k, $1.53 at 2k. That's roughly seventeen times a Seedream Pro image. Test your idea at 1k on the image you actually care about, look at the layers, and only then decide whether 2k is worth doubling that. This is not a node you leave in a graph while you tune the parts around it.
Inputs
You feed exactly one image - as an IMAGE (a single-image tensor; it takes precedence) or as a URL in image_url. Two slices in the batch is a hard error, "Layer decomposition takes one image, got 2."
prompt is optional guidance - the author's example is telling it which objects to separate. Useful when a scene has ten things and you want four.
Then resolution (1k/1.5k/2k) and prompt_optimization_mode (standard rewrites your prompt first, fast is quicker and looser). seed is cache control only, not sent to the API: -1 decomposes fresh every queue, a fixed value replays the cached result and saves you the charge.
Outputs - and the list thing
Three outputs, and the middle one is where people get confused:
base- the image with every separated object removed.layers- one RGB image per object, as a list.masks- one alpha mask per layer, as a list: 1 where the object is, 0 where transparent.
Those two are lists rather than batches for a concrete reason: each layer comes back cropped to its own object at its own size. They can't share one IMAGE tensor. The practical consequence is that anything you connect to layers or masks runs once per layer, so a Save node writes N files and a detailer runs N times. If you expected one batch and got five outputs, nothing is broken.
The other consequence: no positions come back. The API doesn't tell you where each layer sat in the original, so you cannot drop them back onto base and get your image again automatically. Recomposition is manual - which is fine for the real use case (relight one object, repaint one object, swap one object) and irritating if you wanted a round trip.
Wiring that actually works: masks into whatever inpaint node you use to re-render a single object in place; layers through an upscaler or a detailer to clean up a single subject; base as the plate you build back onto. Masks are alpha channels, so they're clean-edged by construction rather than thresholded guesses - good input for masking work, with the usual caveat that no alpha mask represents genuine partial transparency the way a matting model would.
Install
Manager → search erpk → ERPK Custom Nodes → restart. Manually:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk && pip install -r requirements.txt
No model downloads. You need a WaveSpeed key (right-click canvas → ERPK Settings); the client input is optional.
Where it goes wrong
"Layer decomposition returned 1 image, so there are no layers to output." The model found nothing it could separate - a flat landscape, a texture, or a prompt that pushed it toward treating everything as one object. It still charged you for the attempt.
Number of layers varies by image. Two objects, two layers. Don't hardcode downstream expectations on a count.
The node always asks the API for PNG internally, because JPEG layers would drop the transparency that makes them layers. That's handled for you - just don't be surprised that the outputs carry alpha.
Slow. Layers are the heaviest job in this pack's image family; the client polls once a second for up to 30 minutes and Cancel is respected mid-poll if you decide halfway that $0.77 was enough.
And the standing caveat for every node in this collection: it's a closed ByteDance model behind an API. Your image leaves the machine, the run is metered, and the filters are whatever the provider enforces. For a one-off "I need this object alone" job that's a fine buy. For anything you'd rather keep local, this isn't the tool.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image_url | STRING | URL of the image to decompose. Ignored when `images` is connected. | |
| resolution | COMBO | 1k | Output resolution tier. 1k and 1.5k cost $0.765 per run, 2k costs $1.53. |
| seed | INT | -1-1–2147483647 | Cache control only, not sent to the API. -1 decomposes again every run. |
| imagesopt | IMAGE | The image to decompose, as a ComfyUI IMAGE with one image. Takes precedence over `image_url`. Sent inline as base64, no upload. | |
| promptopt | STRING | Optional guidance, for example which objects to separate | |
| clientopt | WAVESPEED_AI_API_CLIENT | WaveSpeed API client (optional if API key is configured in Settings) | |
| prompt_optimization_modeopt | COMBO | standard | The model rewrites the prompt first. fast is several times quicker but follows long or intricate prompts less closely. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| base | IMAGE | The image with every separated object removed |
| layers | IMAGE | One RGB image per object, each at its own size |
| masks | MASK | One alpha mask per layer, 1 where the object is, 0 where transparent |