access error: Couldn't connect to the Hub: 403 Client Error.
Working on a google colab, have tried !huggingface-cli login and every sort of access token/secret I can think of but still nothing
complete error below.
Couldn't connect to the Hub: 403 Client Error. (Request ID: Root=1-6669c242-0e40f4174290fc29343df22e;046822ff-1a1e-4ad0-a4c0-f46b27e82a4c)
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 and you are not in the authorized list. Visit https://huggingface.co./stabilityai/stable-diffusion-3-medium to ask for access..
Will try to load from local cache.
HTTPError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py in hf_raise_for_status(response, endpoint_name)
303 try:
--> 304 response.raise_for_status()
305 except HTTPError as e:
9 frames
HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co./api/models/stabilityai/stable-diffusion-3-medium
The above exception was the direct cause of the following exception:
GatedRepoError Traceback (most recent call last)
GatedRepoError: 403 Client Error. (Request ID: Root=1-6669c242-0e40f4174290fc29343df22e;046822ff-1a1e-4ad0-a4c0-f46b27e82a4c)
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 and you are not in the authorized list. Visit https://huggingface.co./stabilityai/stable-diffusion-3-medium to ask for access.
The above exception was the direct cause of the following exception:
OSError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py in download(cls, pretrained_model_name, **kwargs)
1546 else:
1547 # 2. we forced local_files_only=True
when model_info
failed
-> 1548 raise EnvironmentError(
1549 f"Cannot load model {pretrained_model_name}: model is not cached locally and an error occurred"
1550 " while trying to fetch metadata from the Hub. Please check out the root cause in the stacktrace"
OSError: Cannot load model stabilityai/stable-diffusion-3-medium: model is not cached locally and an error occurred while trying to fetch metadata from the Hub. Please check out the root cause in the stacktrace above.
@Guytron assuming you got access to the model, you have to login with your token as well. Diffusers does not support sd3 right now either. It should support it in a few hours.
I've tried using both a HF_TOKEN and a stablediffusion token, neither has worked. I've tried it via assignment, huggingface-cli login and every other method I can find or think of.
This worked for me.
from huggingface_hub import login
login()