Seedream4 Replicate
Skip the VRAM tax, pay the API instead
- image_input
- images
Seedream 4 is ByteDance's flagship image model, and it has never been anything but an API. No weights, no local copy, no amount of huggingface refreshing will change that. This node is the honest workaround: instead of leaving ComfyUI to go paste a prompt into some web dashboard, it wraps the bytedance/seedream-4 model on Replicate and hands you the results as a normal IMAGE tensor. Zero VRAM, zero model downloads - your GPU does nothing, because the generation happens on ByteDance's servers and you pay per image.
That's the trade in one sentence: local control and free unlimited sampling, swapped for Seedream's quality and a place inside your workflow. Worth it if you want what Seedream does well - clean text rendering, strong photorealism, and its genuinely unusual multi-image and multi-reference modes - without owning a monster card. Not worth it if your whole point is staying local; this is a paid, moderated API, and the community will remind you of that.
How it works
The mechanism is boring in the best way. The node takes your prompt, builds a replicate.predictions.create(model="bytedance/seedream-4", ...) request, then polls the prediction every second through a four-stage progress loop (25% → 50% → 75% → 100%). When it succeeds, it downloads the output image URLs and stacks them into a single IMAGE tensor. There's a 10-minute timeout per stage, and hitting ComfyUI's cancel button actually cancels the prediction server-side instead of just abandoning it. The replicate Python client (pinned to 1.0.7 in requirements.txt) does the heavy lifting; the rest is just polling, timeout handling, and converting images.
The inputs that matter
The node is mostly honest about what it needs, and only a handful of inputs are things you'll actually touch:
- api_key - your Replicate token, the
r8_string from replicate.com/account/api-tokens. Required; nothing runs without it. One real gotcha: it's a plain widget, so it gets saved into your workflow JSON. Don't share workflow files that contain it. - prompt - the actual prompt. Be specific; this is a closed frontier model, so it rewards detail the way Midjourney does.
- size_preset - a dropdown of common sizes from 2048x2048 (1:1) up to 4096x4096, plus 16:9, 21:9, and friends. Pick Custom and
width/height(1024–4096, step 64) unlock for anything not on the list. - sequential_image_generation -
disabledgives you one image;autolets the model decide whether your prompt wants a story sequence or character variations, up to max_images (1–15). This is Seedream's party trick and it's genuinely good for photostory-style output. Just remember every extra image is extra money. - seed -
-1for random, any fixed number for reproducible results. Same seed + same prompt = same image.
Optionally, image_input accepts an IMAGE tensor - up to 10 of them if you feed a batch - for image-to-image or multi-reference generation. That's the other Seedream superpower: reference images let you keep a face or a style across a set. Feed it from a LoadImage node or chain it from anything else in your graph.
Output and wiring
Output is a single images (IMAGE) tensor. Wire it into a PreviewImage or SaveImage and you're done - everything downstream that accepts an IMAGE (upscalers, img2img, video pipelines) just works, because to the rest of ComfyUI it looks exactly like a local generation. That's the nicest part of the design.
Installing
Easiest path is ComfyUI Manager: search "Seedream4 Replicate" and install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-Seedream4_Replicate.git
cd ComfyUI-Seedream4_Replicate
pip install -r requirements.txt
Then restart ComfyUI and grab a token from replicate.com/account/api-tokens. Dependencies are light - torch, numpy, Pillow, requests, the replicate client, colorama - nothing GPU-specific, which is the whole point. The author (Saganaki22) is a known TTS-node builder in the community, and this pack follows the same clean, documented pattern.
Common issues
- "Seedream4 API Error" with a content-policy message - ByteDance's API is moderated, full stop. The node detects those errors and tells you to rephrase. If your prompt trips it, that's the answer, not a bug.
- Large input images - reference images above roughly 256KB get a warning that they may exceed data-URL limits. Downscale your references before wiring them in.
- Slow generations - a 10-minute timeout sounds generous, but big custom sizes on a busy server can feel like forever. The progress prints in the console so you can tell it's alive.
- Cost creep - sequential
automode is the one that sneaks up on you. Leave it ondisableduntil you actually want the multi-image feature.
If you want Seedream without leaving ComfyUI, this is about as frictionless as it gets. If you wanted it local, this isn't that - but at least you knew going in.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | Your Replicate API token (starts with r8_). Get this from replicate.com/account/api-tokens. Keep this secure and don't share it. | |
| prompt | STRING | Describe what you want to generate. Be specific and detailed. Example: 'a photorealistic portrait of a woman with blue eyes, studio lighting, high detail' | |
| size_preset | COMBO | 2048x2048 (1:1) | Choose from common aspect ratios and sizes. Square formats work well for portraits and social media. Wide formats (16:9, 21:9) are good for landscapes. Use 'Custom' to set specific dimensions. |
| width | INT | 20481024–4096 | Image width in pixels (only used when size_preset is 'Custom'). Higher values = more detail but longer generation time. Must be between 1024-4096 pixels. |
| height | INT | 20481024–4096 | Image height in pixels (only used when size_preset is 'Custom'). Higher values = more detail but longer generation time. Must be between 1024-4096 pixels. |
| max_images | INT | 11–15 | Maximum number of images to generate when sequential_image_generation is 'auto'. The AI decides how many to actually create (1 to this number). More images = higher cost. |
| sequential_image_generation | COMBO | disabled | Disabled: Generate only 1 image. Auto: Let the AI decide if your prompt would benefit from multiple related images (like story sequences, character variations, etc.). Auto mode uses max_images as the limit. |
| seed | INT | -1-1–2147483647 | Random seed for reproducible results. Use -1 for random seed, or set a specific number to get the same image again. Same seed + same prompt = same result. |
| image_inputopt | IMAGE | Optional input image(s) for image-to-image generation. Connect an image here to use it as reference or starting point. Supports 1-10 images for multi-reference generation. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |