Instructions to use stabilityai/stable-diffusion-3-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use stabilityai/stable-diffusion-3-medium with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Inference
- Notebooks
- Google Colab
- Kaggle
"You must be authenticated to access it" after being granted access and using 'write' token.
I have been granted access ever since the model was released on HF. I have tried using a new token with "write" permission and a fine-grained token. Nothing works. I get the error below--any ideas?
Cannot access gated repo for url https://huggingface.co/api/models/stabilityai/stable-diffusion-3-medium.
Access to model stabilityai/stable-diffusion-3-medium is restricted. You must be authenticated to access it.
A lot of spaces code shows loading a snapshot and assigning the token in the snapshot. So, I made a newbie mistake. If you are loading a gated model you have to login with the token. Something like this:
from huggingface_hub import login
hf_token = os.getenv("HUGGINGFACE_TOKEN")
login(token = hf_token)
where "HUGGINGFACE_TOKEN" is in your secrets section in your Space's settings.