Nodes/ComfyUI_doubao_seed/SeedReam4API (多图)
ComfyUI Node

SeedReam4API (多图)

Seedream 4 in ComfyUI, with up to 14 reference images

By xuchenxu168·Created 12 months ago·Updated 9 months ago· 19
SeedReam4API (多图)
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • image8
  • image9
  • image10
  • image11
  • image12
  • image13
  • image14
  • image
  • response
  • image_url
promptA beautiful landscape
mirror_sitecomfly
modeldoubao-seedream-4-0-250828
response_formaturl
resolution1K
aspect_ratio1:1
width1024
height1024
api_key
max_images1
seed-1
watermarktrue
streamfalse
tail_on_partialtrue
sequential_image_generationdisabled

SeedReam4API (多图) is the workhorse image node of this pack: a direct line to ByteDance's Seedream 4.0 image model with room for up to 14 reference images, batch generation, and 1K/2K/4K output. If you want Seedream quality in a graph full of local nodes, this is the call - but call it knowing it's a cloud API, not a local model. ByteDance keeps the whole Seedream line closed and hosted; there is no checkpoint to download, and every render is a paid request to a mirror.

How it works

You write a prompt, optionally plug reference images into image1 through image14, pick a mirror, and the node POSTs to that mirror's image-generation endpoint, downloads the result, and converts it into a standard IMAGE tensor so downstream nodes treat it like any local generation. response_format controls whether the API returns a URL (default) or b64_json; either way you get the image back in the graph. There's retry logic with exponential backoff, and if a mirror is down you can switch mirror_site rather than rebuild your workflow - comfly, t8_mirror, and the official volcengine endpoint are the three options, each with its own key in SeedReam4_config.json.

The interesting knobs for a beginner:

  • max_images - generate 1–15 images in one call. More isn't better; each one is a separate billed generation.
  • resolution - 1K / 2K / 4K. Start at 2K. Note the newer doubao-seedream-4-5-251128 model explicitly doesn't support 1K.
  • aspect_ratio - ten presets plus "Custom", and a Custom choice unlocks the width / height inputs (64–8192).
  • watermark - defaults on here. Flip it off if you want clean output.
  • seed - set a fixed seed for reproducible results (‑1 = random).

Outputs: image (the IMAGE tensor - wire to Preview Image), response (the raw API response text for debugging), and image_url (the hosted URL, handy if you want to save the file elsewhere).

Install & setup

cd ComfyUI/custom_nodes
git clone https://github.com/xuchenxu168/ComfyUI_doubao_seed
cd ComfyUI_doubao_seed
pip install -r requirements.txt

Restart ComfyUI, then set an API key. The cleanest way is a SeedReam4_config.json in the pack folder (README has the schema with comfly_api_key / t8_api_key / doubao_api_key and endpoints); the api_key node field and the DOUBAO_API_KEY env var also work.

Gotchas

First, the pack's HTTP layer disables TLS certificate verification (you'll see session.verify = False in the source) - that's a real smell for a node that sends your key and images to a third party, and one more reason to prefer a mirror you actually trust. Second, remember this is a metered, moderated API: prompts that trip ByteDance's content policy fail outright, and reference images leave your machine. The community's line on closed-model API nodes - right tool for a model you can't run, wrong default for one you can - applies verbatim here. When generation fails, check your key and balance first, then the prompt; the response output usually names the offender.

CategoryKen-Chen/Doubao

Inputs (29)

NameTypeDefaultDescription
promptSTRINGA beautiful landscape
mirror_siteCOMBOcomfly3 options: comfly, t8_mirror, volcengine
modelCOMBOdoubao-seedream-4-0-2508282 options: doubao-seedream-4-0-250828, doubao-seedream-4-5-251128 (不支持1K)
response_formatCOMBOurl2 options: url, b64_json
resolutionCOMBO1K3 options: 1K, 2K, 4K
aspect_ratioCOMBO1:110 options: 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, +4
widthINT102464–8192
heightINT102464–8192
api_keySTRING
max_imagesINT11–15
seedINT-1-1–2147483647
watermarkBOOLEANtrue
streamBOOLEANfalse
tail_on_partialBOOLEANtrue
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE
image7optIMAGE
image8optIMAGE
image9optIMAGE
image10optIMAGE
image11optIMAGE
image12optIMAGE
image13optIMAGE
image14optIMAGE
sequential_image_generationoptCOMBOdisabled2 options: disabled, auto

Outputs (3)

NameTypeDescription
imageIMAGE
responseSTRING
image_urlSTRING