Instructions to use stabilityai/stable-diffusion-xl-base-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/stable-diffusion-xl-base-1.0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
SD-XL "4 output setup" help
#79
by ParaDim - opened
Can someone explain why SD-XL doesn't output 4 images with each generation as standard like Stable diffusion 2.1 and earlier models did? All the spaces on here have number of "iterations" but it seems like this has replaced "inference steps" as setting 25 iterations still only generates one image per prompt? How can I set-up SD-XL 1.0 to generate 4 images with every prompt I input?
Thanks!
I've not tried it but the pipeline call has this parameter...
num_images_per_prompt (int, optional, defaults to 1) β The number of images to generate per prompt.
images = base_pipe(prompt = prompt,
...
num_images_per_prompt=4)
I hope you've got the VRAM for it :-)
ParaDim changed discussion status to closed