SeedReam4API (多图)
Seedream 4 in ComfyUI, with up to 14 reference images
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image
- response
- image_url
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-251128model 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.
Inputs (29)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A beautiful landscape | — |
| mirror_site | COMBO | comfly | 3 options: comfly, t8_mirror, volcengine |
| model | COMBO | doubao-seedream-4-0-250828 | 2 options: doubao-seedream-4-0-250828, doubao-seedream-4-5-251128 (不支持1K) |
| response_format | COMBO | url | 2 options: url, b64_json |
| resolution | COMBO | 1K | 3 options: 1K, 2K, 4K |
| aspect_ratio | COMBO | 1:1 | 10 options: 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, +4 |
| width | INT | 102464–8192 | — |
| height | INT | 102464–8192 | — |
| api_key | STRING | — | |
| max_images | INT | 11–15 | — |
| seed | INT | -1-1–2147483647 | — |
| watermark | BOOLEAN | true | — |
| stream | BOOLEAN | false | — |
| tail_on_partial | BOOLEAN | true | — |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — | |
| image9opt | IMAGE | — | |
| image10opt | IMAGE | — | |
| image11opt | IMAGE | — | |
| image12opt | IMAGE | — | |
| image13opt | IMAGE | — | |
| image14opt | IMAGE | — | |
| sequential_image_generationopt | COMBO | disabled | 2 options: disabled, auto |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| response | STRING | — |
| image_url | STRING | — |