The 401 Unauthorized error indicates that the URL requires authentication. You need to provide your Hugging Face credentials (API token) to access the file. You can use wget with an authorization header to include your Hugging Face API token. Here’s how to do it:
- Obtain your Hugging Face API token from your account settings on the Hugging Face website.
- Use the
wgetcommand with the--headeroption to include your token:
wget --header=“Authorization: Bearer YOUR_HUGGING_FACE_API_TOKEN” https://huggingface.co/stabilityai/stable-diffusion-3-medium/resolve/main/sd3_medium_incl_clips_t5xxlfp8.safetensors
Replace YOUR_HUGGING_FACE_API_TOKEN with your actual Hugging Face API token.
Make sure to keep your API token secure and do not expose it in public repositories or logs.