惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
A
About on SuperTechFans
量子位
Engineering at Meta
Engineering at Meta
B
Blog
The Cloudflare Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
J
Java Code Geeks
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

Replicate's blog

How to make remarkable videos with Seedance 2.0 – Replicate blog How to prompt Seedream 5.0 – Replicate blog Recraft V4: image generation with design taste – Replicate blog Run Isaac 0.1 on Replicate – Replicate blog Run FLUX.2 on Replicate – Replicate blog How to prompt Nano Banana Pro – Replicate blog Retro Diffusion's pixel art models are now on Replicate – Replicate blog Replicate is joining Cloudflare – Replicate blog Extract text from documents and images with Datalab Marker and OCR – Replicate blog How to prompt Veo 3.1 – Replicate blog IBM's Granite 4.0 is now on Replicate – Replicate blog Which image editing model should I use? – Replicate blog Introducing our new search API – Replicate blog Torch compile caching for inference speed – Replicate blog Announcing Replicate's remote MCP server – Replicate blog How to prompt Veo 3 with images – Replicate blog Open source video is back – Replicate blog Generate consistent characters – Replicate blog Bria is now on Replicate – Replicate blog How we optimized FLUX.1 Kontext [dev] – Replicate blog Compare AI video models – Replicate blog The FLUX.1 Kontext hackathon – Replicate blog How to prompt Veo 3 for the best results – Replicate blog Get the most from Google Veo 3 – Replicate blog FLUX.1 Kontext from the community – Replicate blog Use FLUX.1 Kontext to edit images with words – Replicate blog Generate incredible images with Google's Imagen 4 – Replicate blog Run OpenAI’s latest models on Replicate – Replicate blog NVIDIA H100 GPUs are here – Replicate blog Run 30,000+ LoRAs on Hugging Face with Replicate – Replicate blog
Run SDXL with an API – Replicate blog
2023-07-26 · via Replicate's blog

SDXL 1.0 is a new text-to-image model by Stability AI. Stable Diffusion XL lets you create better, bigger pictures, with faces that look more real. You can add clear, readable words to your images and make great-looking art with just short prompts.

Like Stable Diffusion 1.5 and 2.1, SDXL is open source. You can modify it, build things with it and use it commercially.

Replicate lets you run generative AI models, like SDXL, from your own code, without having to set up any infrastructure.

An astronaut riding a unicorn

What you can do

You can use the SDXL model on Replicate to:

  • make images from your prompts
  • make an image from another image (img2img)
  • inpaint using a mask
  • use a refiner to add fine-detail to your images

View examples

Use a client library for Replicate

We maintain official Python, Node.js, Swift, and Go clients for Replicate. And the community has made more.

You need to sign up for Replicate, then you can find your API token on your account page.

Then, you can run SDXL with one line of code:

You can use the API for free for a bit, but eventually we’ll ask you to enter your credit card. We only charge you by the second for the amount of time your requests are running, so it works out much cheaper than running your own GPUs.

Refiner

You can use a refiner to add fine detail to images.

The refiner is a new model released with SDXL, it was trained differently and is especially good at adding detail to your images. It functions alongside the base model, correcting discrepancies and enhancing your picture’s overall quality.

You can use the refiner in two ways:

  1. As an ‘ensemble of experts’
  2. As an extra step after the base model has finished

In this example, using the ‘ensemble of experts’ mode, the SDXL base model will handle the first 80% (0.8) of the generation, before handing off to the refiner to add fine detail for the last 20%:

You can alternatively run the refiner model after the base model using the ‘base image refiner’ mode.

In this example the base model will run for 50 steps and produce an output. This will be passed into the refiner which will run for a further 20 steps:

For comparison:

  • Left: Base model without a refiner
  • Middle: Base model plus refiner
  • Right: Ensemble of experts refiner

A comparison of cat images using the SDXL refiner

Image to image

You can pass an image to the model to create a new image based on it. Change the prompt_strength to alter how much of the original image is kept. 0.6 to 0.8 is a good starting range.

View image to image example

A rainbow colored tiger

Inpainting

You can include a mask with your prompt and image to control which parts of your input image will be updated. Use a black and white mask, where black pixels are kept and white ones will be updated.

View inpainting example

A rainbow colored bear

Keep in touch

Follow us on Twitter for more SDXL updates.

Join us in Discord to show us what you’ve made, or if you need any help.

Happy hacking! ✨