Nodes/Seedream4 Replicate/Seedream4 Replicate
ComfyUI Node

Seedream4 Replicate

Skip the VRAM tax, pay the API instead

By Saganaki22·Created 12 months ago·Updated 12 months ago· 7
Seedream4 Replicate
  • image_input
  • images
api_key
prompt
size_preset2048x2048 (1:1)
width2048
height2048
max_images1
sequential_image_generationdisabled
seed-1

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 - disabled gives you one image; auto lets 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 - -1 for 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 auto mode is the one that sneaks up on you. Leave it on disabled until 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.

Categoryimage/generation

Inputs (9)

NameTypeDefaultDescription
api_keySTRINGYour Replicate API token (starts with r8_). Get this from replicate.com/account/api-tokens. Keep this secure and don't share it.
promptSTRINGDescribe what you want to generate. Be specific and detailed. Example: 'a photorealistic portrait of a woman with blue eyes, studio lighting, high detail'
size_presetCOMBO2048x2048 (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.
widthINT20481024–4096Image width in pixels (only used when size_preset is 'Custom'). Higher values = more detail but longer generation time. Must be between 1024-4096 pixels.
heightINT20481024–4096Image 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_imagesINT11–15Maximum 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_generationCOMBOdisabledDisabled: 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.
seedINT-1-1–2147483647Random 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_inputoptIMAGEOptional 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)

NameTypeDescription
imagesIMAGE