Nodes/ComfyUI/ByteDance Seedream 5.0 Pro Layer Separation
ComfyUI Node Runs on cloud

ByteDance Seedream 5.0 Pro Layer Separation

One image in, a PSD-style layer stack out

By Comfy-Org·Created 4 years ago·Updated about 5 hours ago· 128,055
ByteDance Seedream 5.0 Pro Layer Separation
  • image
  • base_image
  • base_mask
  • layers
  • masks
  • bboxes
  • layer_stack
prompt
sizeauto
seed0
prompt_optimizationstandard
watermarkfalse
crop_layersfalse

Ever stared at a finished render and wished you could just grab the subject, or the background, and move it? That's the problem this node exists for. Feed Seedream 5.0 Pro's layer-separation model a single flat image and it cuts the scene into a background plate plus up to 16 transparent layers, each with its own name, description, bounding box and stacking order. It's the closest ComfyUI has come to "open this PNG as a Photoshop file" - and it works on images that were never designed to be edited, not just ones you generated with layer outputs from the start.

What it is. ByteDance runs the Seedream line strictly as an API product - that's their whole posture, flagship generation stays closed while components ship open. This node is the hosted layer-separation API, reached through Comfy's partner-node proxy. It doesn't call ByteDance from your machine; you hand it an image, it uploads it, and the separated result comes back. Same deal as every node in the partner/image family.

How it works. The model reads the image, figures out the scene composition, and slices out each major element as its own RGBA layer with placement metadata. You get the background plate and the elements separately, which turns all the compositing tricks you used to do by hand into plumbing. The one genuinely important detail is that the geometry can be delivered two ways via the optional crop_layers toggle: "full canvas" puts every layer on a full-size base canvas at its true position (big tensors, but you can composite directly), while "minimal size" crops each layer to its bounding box (tiny tensors, but you rebuild placement yourself).

The inputs that matter. The image needs to be at least 512x512 and between 1:16 and 16:1; anything over roughly 4MP gets downscaled before upload, so don't chase resolution in the source. prompt is the interesting one - leave it empty to auto-detect and separate all major elements, or describe what you want separated in natural language, or target exact regions with <bbox>left top right bottom</bbox> tags using 0-1000 per-mille coordinates. size (auto/1K/1.5K/2K) sets output resolution, seed is just a seed, and prompt_optimization trades a bit of quality for speed if you're iterating.

The outputs. Six of them, and they're all aligned with each other: base_image (the background plate), base_mask (currently always fully opaque - note it uses the LoadImage convention where 1 means transparent), layers (bottom-to-top batch), masks (index-aligned with layers), bboxes (placement boxes carrying name/desc/z_index metadata), and layer_stack - a ready-to-edit LAYERS document you can wire straight into Create Layered Image and extend with Add Layer. That last one is the easy path; the bboxes + masks path exists for when you want manual control.

How you get it. It ships with ComfyUI core - nothing to install. But like every partner node it runs through the Comfy API, so you need a Comfy account with a credit balance, and each call is billed per image. No model files to download anywhere.

Where people get burned. The mask convention is the classic trap: masks uses 1=transparent, so if you're compositing with ImageCompositeMasked-style nodes you need an InvertMask first, or your layers arrive upside-down. And if you build on the "minimal size" crop_layers mode, remember the layers are cropped - you have to feed the bboxes into Layers From Bounding Boxes to put them back where they belong. These nodes landed in the mid-2026 partner-node wave, so expect the whole family to iterate fast; keep ComfyUI updated.

Categorypartner/image/ByteDance

Inputs (7)

NameTypeDefaultDescription
imageIMAGEThe image to separate. Exactly one image, at least 512x512 pixels, aspect ratio between 1:16 and 16:1. Inputs larger than about 4MP are downscaled before upload.
promptSTRINGHow to separate the image. Leave empty to auto-detect and separate all major elements. Describe elements in natural language to control the separation, or target exact regions with <bbox>left top right bottom</bbox> tags (0-1000 per-mille coordinates).
sizeCOMBOautoOutput resolution level. 'auto' follows the input image size (clamped to the 1K-2K range).
seedINT00–2147483647Seed to use for generation.
prompt_optimizationoptCOMBOstandardPrompt-optimization mode: 'standard' gives higher quality, 'fast' shorter generation time.
watermarkoptBOOLEANfalseWhether to add an "AI generated" watermark to the images.
crop_layersoptBOOLEANfalseGeometry of the layers/masks batch outputs (layer_stack is unaffected and always tight). Full canvas: each layer on a base-sized canvas at its bounding-box position - recompose directly with ImageCompositeMasked. Minimal size: each layer cropped to its bounding box (padded to the largest layer for batching) - much smaller tensors; rebuild placement with Layers From Bounding Boxes using the bboxes output.

Outputs (6)

NameTypeDescription
base_imageIMAGEThe base image (background plate) the layers stack onto.
base_maskMASKTransparency of the base image (1 = transparent, LoadImage convention); currently always fully opaque.
layersIMAGETransparent layers ordered bottom to top. Full canvas mode: placed on a black base-sized canvas at their bounding-box position. Minimal size mode: cropped to their bounding box, anchored top-left, padded to the largest layer.
masksMASKPer-layer transparency, index-aligned with the layers batch (1 = transparent, LoadImage convention). For ImageCompositeMasked-style compositing, add InvertMask first.
bboxesBOUNDING_BOXOne placement box per layer, index-aligned with the layers batch (feed both, plus masks, into Layers From Bounding Boxes to rebuild per-layer placement): {x, y, width, height, metadata: {name, desc, z_index, native_size, content_rect, flags}}. content_rect = [left, top, width, height] is the layer's content region within its own frame; it lands on the canvas at the box position plus that offset.
layer_stackLAYERSReady-to-edit layer document for Create Layered Image: the base plate plus each element as its own named, tight-cropped layer at its true position and stacking order. Connect directly, or extend with Add Layer.