Skip to content

Seedream Layer Separation

Node name
BytePlus Seedream Layer Separation
Node ID
BytePlusSeedreamLayerSeparation
Find it
Double-click the canvas and search for “Seedream 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 plus transparent layers: up to 99 on 5.5, or 16 on 5.0 Pro/Flash. Each layer comes with its stacking order, bounding box, name and description, with optional rich-text OCR on 5.5.

Separation is generative, so recombining layers does not guarantee a pixel-perfect reconstruction.

The node bills for every run and 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.

Seedream 5.0 Pro Layer Separation with one left-side image input, seven right-side outputs and an empty prompt
The shared image input stays on the left when you change models; layer results leave on the right.
Seedream 5.5 Layer Separation with a maximum of 30 images and minimal-size layers selected
Seedream 5.5 exposes the layer-count limit beside size and defaults to minimal-size layers.
InputTypeDefaultWhat it does
imageoptionalIMAGEThe 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.

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

InputTypeDefaultWhat it does
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: connect one image to the left-side image socket; it stays connected across model changes. 5.0 Pro offers standard and fast prompt optimization; 5.5 supports only standard. 5.0 Flash has no such setting. On 5.5, seed is a local rerun control, not a generation parameter.
  • 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. New 5.5 nodes default to minimal size; Pro and Flash default to full canvas. 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.
  • Layer count (5.5): max_images includes the base image, with a range of 2-100 and default 30. Larger values permit finer decomposition; the model may return fewer images. Leaving text recognition unset disables it.
  • Text recognition (5.5): enable text_recognition for rich-text OCR in layers_json. It may include recognized text, line boxes and style runs; non-text or irregular lettering may have no OCR result.
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_jsontextLayer metadata and saved files, plus background and rich-text OCR when returned.
  • 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 includes the base and is always tight-cropped, whatever crop_layers says. Connect it to Create Layered Image, or extend it with Add Layer. The current ComfyUI compositor accepts at most 50 layers including the base: use max_images of 50 or below for this path, or save and process larger sets separately.
  • base_mask is currently always fully opaque.
  • layers_json lists the z_index, name, description and bounding box of each image, its background type and OCR when returned, and the saved file when save_layers is on. OCR retains the API’s base-image coordinates, font matches, colors and text styles.
  • 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; on 5.5, inputs exceeding 36,000,000 pixels are rejected. Large layer counts can use substantial RAM: choose minimal size for crop_layers.
  • size is auto, 1K, 1.5K or 2K. auto follows the size of the input and stays between 1K and 2K.
  • If you need a specific object on its own layer, name it in the prompt or mark its box. Seedream 5.5 reserves image-rate quota using max_images and returns unused quota; incomplete layer responses fail rather than silently dropping layers.
  • Activate your model in the ModelArk console for the region you use. Background mode is not accepted for layer separation. For its optional safety_identifier, use a stable hashed ID of at most 64 ASCII characters, not personal data.
  • 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.
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.