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.
You can use the SDXL model on Replicate to:
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.
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:
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:
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.
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.
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! ✨