Seedream 5.0 Flash · Layer Decomposition
Pull a finished image apart
- image_url
- images
- alpha
- task id
Layer decomposition is the inverse of the thing every node usually does. You give it a finished image - yours, a render, a photo - and it hands back that image split into separate transparent elements: the subject, the background, the props, whichever ones it decides matter. Which means the flat JPEG you were stuck with becomes something you can recomposite, animate, restyle or mask.
This is not background removal with extra steps. Background removal gives you one matte. This gives you a stack.
What it does
One IMAGE in, a batch out. The node calls bytedance/seedream-5.0-flash/layer-decomposition on PopNow's servers, and the model returns the base picture plus each separated element as its own layer, always as transparent PNG - that part isn't optional, whatever you set output_format to. The node decodes the lot into an IMAGE batch and an alpha mask batch, one mask per layer.
Price is quoted per run before anything is held; the flash tier's reputation in the family is speed and low cost rather than maximum detail, which matters here - the detail is what you're buying, so if the edges come back rough, the Pro version of this same node is the upgrade path.
The inputs
image_url- a single source image. Not the autogrow reference group the edit nodes use; decomposition works on one picture.prompt- optional, and genuinely so. Leave it empty and the model picks the main elements. Fill it in to name what you want separated - "the woman, the bicycle, the railing" - and you'll get those instead of whatever it thought was interesting. Naming is the difference between a useful stack and four arbitrary slices.resolution-auto(follows the source size, and the sane default), or1k,1.5k,2k.output_format-jpegorpng. This only sets the format of the base image; layers are always transparent PNG regardless.
Outputs
images - the batch containing the base and the layers. alpha - a MASK batch, one per layer, 1 = opaque. task id for the API console.
Two things to internalise. First, the batch includes the base, so the layer count is the output count minus one. Second, the pack decodes transparency by premultiplying RGB with alpha, so transparent areas come through looking correct rather than fringed with dead colour. Don't multiply by alpha again downstream - take images as-is and use the mask for compositing decisions, not for a second premultiply.
What you'd actually use it for
- Re-lighting or re-backgrounding a finished render. Decompose, throw out the background layer, composite the subject over something new.
- Separating a character from a scene so a video model can animate one of them - this is the companion move to the video nodes in this pack: decompose here, feed the layer in as a first frame.
- Building masks for local inpainting without hand-painting.
alphafor a layer is a starter mask; drop it into a mask editor and refine the edges your way. - Disassembling an existing poster or thumbnail to move the text-ish elements around.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/popnow-ai/popnow-comfyui
or search PopNow in ComfyUI Manager. Key from popnow.ai/api/console/keys into Settings > PopNow or via POPNOW_API_KEY, then restart once more so the node list comes from your catalog. No pip dependencies - really none, the pack's dependency array is empty.
Where it goes wrong
- A batch instead of one image - decomposition always returns the base plus every layer it found. Send the batch into something that saves all items, or you'll only ever see the first. It's the most common confusion with this node.
- Too many slices - the model will happily chop a scene into ten elements and call it decomposition. A shorter
promptthat names three things is usually more useful. - Edges - flash-tier detail on hair and thin structures is where it shows. Set
resolutionhigher or use the Pro sibling. PopNow 40201- not enough credits; each image in your batch is a separate run's worth of quoting, so check the quote before batching a folder.- Cancelling stops your wait, not the job - it finishes server-side and bills if it succeeds.
The most valuable thing about this node is conceptual. For years the community's answer to "I need the subject alone" was a matting model and hope. Asking a generative model to produce the layers it was imagining in the first place gets you there without a matte fight - and gives you the base to put them back together again.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image_url | IMAGE | The finished image to split into layers. | |
| prompt | STRING | Optional: name the elements to separate. Leave empty to let the model pick the main elements. | |
| resolution | COMBO | auto | Output resolution tier. auto follows the size of the source image. |
| output_format | COMBO | jpeg | File format of the base image. Layers are always transparent PNG. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| alpha | MASK | Transparency of each image: 1 is opaque. |
| task id | STRING | The PopNow task id, for the API console logs or support. |