Skip to content

Seedream 5.0 Layer Separation

Node name
BytePlus Seedream 5.0 Layer Separation
Node ID
BytePlusSeedreamLayerSeparation
Find it
Double-click the canvas and search for “Seedream 5.0 Layer Separation”, or browse BytePlus ModelArk
Keys needed
ModelArk API key
Runs when
Its output is used by another node, such as Save Image or Save Video. It is not an output node.

Takes one image and separates it into a base image (the background plate) plus up to 16 transparent layers. Each layer comes with its stacking order, bounding box, name and description. Leave the prompt empty to let the model find the main elements, or describe the elements you want to control the split.

The node bills for every run. It does not save anything itself unless you turn on save_layers: connect Save Image, or send layer_stack to Create Layered Image, to keep the result.

The Seedream 5.0 Layer Separation node with one image input, seven outputs, the model set to seedream 5.0 pro and an empty prompt
Seedream 5.0 Pro selected. Seedream 5.0 Flash has the same inputs except prompt_optimization.

model is required and decides which of the inputs below appear.

InputTypeDefaultWhat it does
imageIMAGEThe image to separate. Exactly one image, at least 262,144 pixels (e.g. 512x512), aspect ratio between 1:16 and 16:1. Inputs larger than about 4MP are downscaled before upload.
prompttextHow 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 (coordinates 0-999, relative to the image).
sizechoiceautoOutput resolution level. 'auto' follows the input image size (clamped to the 1K-2K range).Choices: auto, 1K, 1.5K, 2K
seedinteger42Seed to use for generation.Range: 0–2147483647
crop_layerson/offoffGeometry 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.
Advanced inputs for seedream 5.0 pro
InputTypeDefaultWhat it does
prompt_optimizationchoicestandardPrompt-optimization mode: 'standard' gives higher quality, 'fast' shorter generation time.Choices: standard, fast
watermarkon/offoffWhether to add an "AI generated" watermark to the images.
output_formatchoicepngFormat of the base image. Layers are always PNG.Choices: png, jpeg
save_layerson/offoffAlso save the base image and the original layer PNGs to the output folder.
filename_prefixtextBytePlus/Layers/SeedreamOutput folder prefix for the files written when save_layers is on.
  • Prompt: an empty prompt separates all major elements. To target one area, add a tag such as <bbox>left top right bottom</bbox>. The coordinates run from 0 to 999 and are relative to the image.
  • Model: 5.0 Pro adds prompt_optimization. standard gives higher quality, fast shortens generation time. 5.0 Flash has no such setting.
  • crop_layers: full canvas puts every layer on a canvas the size of the base image, ready for ImageCompositeMasked. minimal size crops each layer to its bounding box, which makes much smaller tensors. Rebuild the placement from the bboxes output with Layers From Bounding Boxes.
  • Saving files: save_layers writes the base image and the original layer PNGs to the ComfyUI output folder under filename_prefix. output_format sets the format of the base image; layers are always PNG. It is the only setting in the pack that writes files by itself.
OutputTypeWhat it holds
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.
layers_jsontextz_index, name, description, bounding box and saved file of the base image and each layer.
  • layers and masks list the layers from bottom to top and share the same order as bboxes.
  • masks use the Load Image convention (1 means transparent). Add InvertMask before ImageCompositeMasked.
  • layer_stack is always tight-cropped, whatever crop_layers says. Connect it to Create Layered Image, or extend it with Add Layer.
  • base_mask is currently always fully opaque.
  • layers_json lists the z_index, name, description and bounding box of the base image and each layer, and the saved file of each one when save_layers is on.
  • Connect exactly one image. It needs at least 262,144 pixels in total (for example 512x512) and an aspect ratio between 1:16 and 16:1.
  • Images above about 4 MP are scaled down before upload.
  • size is auto, 1K, 1.5K or 2K. auto follows the size of the input and stays between 1K and 2K.
  • The layer count is chosen by the model, up to 16. If you need a specific object on its own layer, name it in the prompt or mark its box.
  • Activate Seedream 5.0 Pro or Flash in the ModelArk console for the region you use.
  • If you interrupt the run, the node stops waiting. A request that was already sent may still be billed.
  • A failed request that may have billed is never sent again automatically. See Billing and cost.
  • For ordinary image generation use Seedream 4.5 & 5.0.
Message What to do
No BytePlus API key is set Add the key in Settings → BytePlus. See API keys.
Only a single input image is supported. Connect one image, not a batch of several.
Image must have at least 262,144 pixels in total Scale the image up so it has at least 262,144 pixels, for example 512x512.
must be between 1:16 and 16:1 Crop the image so its aspect ratio falls inside the range.
The model returned no layers Change the prompt or the input image and run again.