Couldn't connect to the Hub: 401 Client Error. (Request ID: Root=1-666fa795-31dfe07d1e2d185d6a755880;91849b8e-da22-4d2c-87de-2d6c26b220d9)

#26
by HappyYang - opened

Hi everyone, I met a strange problem and need your help ~~
I want to use this model and I run the official tutorial code as below:
image.png
But I got the error message: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/stabilityai/stable-diffusion-3-medium-diffusers
The complete error message is below:
image.png

To solve the problem, I searched the web and found some similar prblems, here are what I did:
(1) Ensure that I have access to this repo
image.png

(2) Ensure that my Hugging face token has access to this repo:
image.png

(3) Ensure that I used the token in the code:
image.png

(4) Ensure that I have the latest diffusers and transformers package:
image.png
image.png

I have tried all tricks above but I still got the error. Any advice would be greatly appreciated~

Change your vpn

change the variable name from HUGGINGFACEHUB_API_TOKEN to HF_TOKEN

Sign up or log in to comment