Replicate stability-ai/stable-diffusion-3
SD3 via API, text and img2img
- image
- IMAGE
This is Stability AI's Stable Diffusion 3, served through Replicate. SD3 has a complicated legacy - the open 2B release in June 2024 shipped so broken it got banned from CivitAI for a while - but the hosted version this node calls is the working one, and the underlying MMDiT architecture was genuinely influential (rectified-flow DiT is the direction the whole field followed). Where SD3 is legitimately good: composition, colour, and text rendering that's a real step up from the SD1.x/SDXL era. This node handles both text-to-image and image-to-image. Replicate rules apply: REPLICATE_API_TOKEN, pay-per-run, nothing downloaded.
How it works
SD3 uses a Multimodal Diffusion Transformer with three text encoders, giving it stronger prompt understanding than older UNet models. The node relays your prompt and settings to Stability's hosted SD3 endpoint via Replicate. Pass an image and it switches into img2img mode, using prompt_strength to decide how far to move from your source.
The inputs and outputs that matter
prompt- SD3 rewards clear, structured descriptions. One caveat carried over from the architecture: its text encoders cap around 77 tokens each before things go muddy, so overlong prompts hurt rather than help. Keep it tight.aspect_ratio(1:1 default; 16:9, 3:2, 9:16, and more) - sets shape by ratio, not width/height.cfg(3.5) - guidance. SD3 likes a lower CFG than SD1.5's classic 7; the default is well-chosen.steps(28, capped at 28) - note the ceiling: you can't push past 28 here, so don't try to buy quality with more steps.image+prompt_strength(0.85) - supply an image for img2img; higher prompt_strength moves further from it.
negative_prompt, seed, output_format, and output_quality round it out; force_rerun forces a fresh run. Output is one IMAGE.
How to install it
One install covers every Replicate node.
- ComfyUI Manager: search ComfyUI-Replicate, install, restart.
- Manual:
then restart.cd ComfyUI/custom_nodes git clone https://github.com/replicate/comfyui-replicate cd comfyui-replicate pip install -r requirements.txt
Nothing lands on your GPU - SD3 runs on Replicate's servers, so the only install is the replicate Python client. Set your token before launching ComfyUI: export REPLICATE_API_TOKEN="r8_..." (replicate.com/account/api-tokens). No token, no runs.
Common issues & troubleshooting
Auth error first run. REPLICATE_API_TOKEN needs setting before ComfyUI starts. Set it, restart.
Long prompts make it worse. SD3's CLIP encoders go muddy past ~77 tokens rather than truncating cleanly - this is a real, documented quirk. Trim the prompt to the essentials.
Muddy or oversaturated output at high CFG. SD3 wants a lower CFG than you're used to. Keep cfg around the 3.5 default; SD1.5-style 7+ pushes it off.
img2img changes too much or too little. That's prompt_strength. Lower keeps your source, higher departs from it.
Same image on re-run. Replicate cached identical inputs. Change the seed or set force_rerun.
It bills per run. Each generation is a paid Replicate prediction - cheap per image, still metered.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| promptopt | STRING | — | |
| aspect_ratioopt | COMBO | 1:1 | 9 options: 1:1, 16:9, 21:9, 3:2, 2:3, 4:5, +3 |
| cfgopt | FLOAT | 3.500–20 | — |
| imageopt | IMAGE | — | |
| prompt_strengthopt | FLOAT | 0.850–1 | — |
| stepsopt | INT | 281–28 | — |
| output_formatopt | COMBO | webp | 3 options: webp, jpg, png |
| output_qualityopt | INT | 900–100 | — |
| seedopt | INT | — | |
| negative_promptopt | STRING | — | |
| force_rerunopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |