Instructions to use stabilityai/stable-diffusion-3-medium-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/stable-diffusion-3-medium-diffusers 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-3-medium-diffusers", 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
- Draw Things
- DiffusionBee
GatedRepoError: 403 Client Error
I'm sure everyone else on Earth knows how to resolve this but sadly I do not.
I've tried every manner of HF_TOKEN, secret key and use_auth_token=hf_auth I could find and it still won't let me download.
and my huggingface page says
Gated model: You have been granted access to this model
Please, any help would be welcome!
I'm working in google colab, building from source and this is where the code fails:
!huggingface-cli login
from diffusers import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers",
torch_dtype=torch.float16, use_auth_token=hf_auth)
hey did you add the repo permissions?
Settings -> Access Tokens -> Manage -> Edit permissions -> Search for repos
Add "stabilityai/stable-diffusion-3-medium-diffusers" there.
Aha! Ahahaha!
Got it loading anyways, was the secret of :
token=hf_auth
in the pipe constructor
uhg! it was loading wonderfully then ... cuda OOM
I saw someone else fix that vram thing here somewhere...


