Instructions to use stabilityai/stable-diffusion-xl-base-0.9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/stable-diffusion-xl-base-0.9 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-0.9", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
can any of the stability team please comment on this?
can you provide the template for the correct way to import the model. i keep getting this error:
FileNotFoundError: [Errno 2] No such file or directory:
'/home/user/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base
-0.9/refs/main'
Hey @arthurspapa ,
What code snippet do you use?
Can you try loading the model as written on https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9#%F0%9F%A7%A8-diffusers
Also see this notebook which shows that downloading works: https://colab.research.google.com/drive/1u3Q5dnfuw7SJoi5sDlB-fuwo4xTchBrR?usp=sharing
Did you maybe forgot to login?
I get the same error running the colab link after login with a token.
FileNotFoundError: [Errno 2] No such file or directory:
'/root/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-0.9/refs/main'
You need to also accept the license on the model card https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9#%F0%9F%A7%A8-diffusers
i did that before i gained access to this repo. can you suggest a build i can use on HF thats working properly? all the public spaces are giving me issues when it comes to loading the official xl0.9 model. all of the publically available demos o here are using like sd1.5 or 2.1
pip uninstall diffusers -y
pip install diffusers --upgrade
worked for me.
Name: diffusers
Version: 0.18.2