Nodes/Protoface/Protoface Seedream 5.0 Pro · Decompose Image
ComfyUI Node

Protoface Seedream 5.0 Pro · Decompose Image

Layers and masks out of a flat render

By protoface-ai·Created 22 days ago·Updated 13 days ago· 0
Protoface Seedream 5.0 Pro · Decompose Image
    • image
    • mask
    • files
    • run id
    ◄prompt▾►
    ◄image▾►
    ◄resolution1k►
    ◄output_formatjpeg►
    ◄prompt_optimization_modestandard►
    ◄generation_id0►
    ◄request_scope►

    The weirdly useful one

    Most nodes in this pack generate pictures. This one takes a picture apart. Feed it a finished image and it returns a set of separated layers plus masks - subject, background, whatever the model can pull apart - as lists of native ComfyUI IMAGE and MASK objects.

    Why you'd want that: you generated a composition you like, and now you need to move the subject, replace the sky, or composite something behind it without a five-node segmentation chain that half works. Decompose hands you the pieces in one call. And unlike a matting model, it can rebuild the parts it can't see - the model isn't just cutting an alpha channel out of your pixels, it's inferring what's behind the subject. That's the honest reason it's worth the price, because the price is steep.

    What it runs

    An API call, not a local sampler. The Protoface pack is one shared client with per-model controls generated from the provider's public request schema; this node uploads your image, submits a job, polls, downloads the layers, and returns them. Seedream is a closed ByteDance product - like the Seedance video line, there are no weights to download and no local equivalent.

    Inputs

    image is the only required input, and it's the whole point. Native ComfyUI Image connects straight in; URLs, data URIs and Protoface asset ids work too. Note the field type: the tooltip is the generic "public URL, data URI, or asset id" one, but you'll be connecting a loader or a sampler output.

    prompt exists here but is a dynamic input, not a required box - the operation is driven by the image. If you're the type to leave blank fields blank, leave it.

    resolution is 1k, 1.5k or 2k, and the tooltip is refreshingly honest about what it means: the size tier is what you're billed on, not just a pixel count. output_format is jpeg or png - pick png, because you're about to composite these layers and you don't want JPEG artefacts in your alpha edges.

    prompt_optimization_mode (standard or fast) controls the model's own prompt rewriting. The tooltip spells out the trade properly: standard does the full rewrite, fast is a lighter one that's several times quicker but follows long or intricate prompts less closely, and is only served by upstream providers that honour it - so less failover depth if a provider is down. For an image-in, layers-out operation, standard is the sane default.

    generation_id is the paid-job handle: fixed ID with identical inputs resumes the run; increment for a new generation. request_scope is auto-assigned per node; headless clients supply a stable unique one.

    Outputs: image (a list - one entry per layer), mask (a list, native inverted-alpha semantics, so wire it the way ComfyUI expects masks), files (all originals), run id.

    Install

    ComfyUI 0.41.0+ and Python 3.10+.

    cd ComfyUI
    git clone --branch v0.1.0 --depth 1 https://github.com/protoface-ai/protoface-comfyui.git custom_nodes/protoface
    python -m pip install -r custom_nodes/protoface/requirements.txt
    

    Or Manager → Protoface → install protoface-nodes → restart, reload browser. Pip with ComfyUI's interpreter. Then click Protoface bottom-right and paste a key from your Protoface account; headless boxes use PROTOFACE_API_KEY. Dependencies: httpx, jsonschema, Pillow, PyAV.

    Where it goes wrong

    Sticker shock. Per the pack's catalog, a decompose job is 77 credits at 1k or 1.5k and 153 at 2k - versus 5 credits for a normal Seedream generation or edit. It is roughly fifteen times the price of generating the image in the first place. Treat it as a finishing operation for one image, never as a step in a loop over a batch.

    Not knowing your layers up front. You get lists. How many and in what order is the model's business, and the counts can differ between runs. Build downstream nodes that tolerate variable list length - ComfyUI maps over lists, then something throws because a mask count no longer matches an image count. Check the lists before you reconnect anything.

    Using jpeg. Composite work wants png.

    Assuming masks are straight alpha. They're inverted-alpha, per the pack's documentation. If your compositing looks inside out, this is why.

    Re-queued panic after a timeout. Don't bump generation_id; the job is usually alive. Requeue unchanged or recover with run id in Resume Run.

    Verdict

    A niche node with a genuinely unusual capability - layered decomposition with inferred hidden regions - priced like a premium service because it is one. If you do composite work and want the background behind a subject you didn't shoot against a clean plate, it's the shortest path. Just budget for it, and expect to spend a little time wiring the list outputs into something that behaves.

    CategoryProtoface/Image/bytedance

    Inputs (7)

    NameTypeDefaultDescription
    promptCOMBOThe positive prompt for the generation.
    imageCOMBOA public URL, a data URI, or an asset id.
    resolutionCOMBO1kThe size of the generated media in pixels (width*height).
    output_formatCOMBOjpegThe format of the output image.
    prompt_optimization_modeCOMBOstandardPrompt optimization mode. The model rewrites your prompt before generating. 'standard' uses the full rewrite; 'fast' uses a lighter one that generates several times quicker but follows long or intricate prompts less closely, and is served only by the upstream providers that honour it, so it has less failover depth.
    generation_idINT00–9007199254740991Keep fixed to reuse/resume this paid job. Increment for a fresh paid generation; independent of the model seed.
    request_scopeSTRINGAutomatically assigned per node. Headless clients must supply a stable unique workflow/node ID. This is not a secret.

    Outputs (4)

    NameTypeDescription
    imageIMAGE—
    maskMASK—
    filesPROTOFACE_FILE—
    run idSTRING—