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
"Could not found the necessary 'safetensors' weights in ...
So I am new to SDXL and been trying to get it to run locally. I've cloned SDXL, installed all modules and my token has been cached so I am always logged in, but everytime I try to run the basic code I get the same error. It claims to not find the necessary 'safetensors' weights in the list of files. I am not really quite sure where to go from here...
You need to use your use_auth_token as in this notebook. https://github.com/R3gm/InsightSolver-Colab/blob/main/SDXL_0_9.ipynb
You need to use your use_auth_token as in this notebook https://github.com/R3gm/InsightSolver-Colab/blob/main/SDXL_0_9.ipynb
Tried this but still the same error
I found removing use_safetensors=True and adding use_auth_token={token}, would get me past that, but id then get stuck on RuntimeError: Windows not yet supported for torch.compile instead
Have you tried to add hugging face auth?
Adding this code works for me
from huggingface_hub.hf_api import HfFolder;
HfFolder.save_token(ACCESS_TOKEN)
I found removing
use_safetensors=Trueand addinguse_auth_token={token}, would get me past that, but id then get stuck onRuntimeError: Windows not yet supported for torch.compileinstead
Thanks this seemed to solve the error
Same issue on my side, and when removing "use_safetensors=True" it worked, but it would be useful to know why and the drawback of disabling use_safetensors