Persistent 401 GatedRepoError for Gemma-3 on Space despite accepted license

#8
by Gigantos89 - opened

Dear Hugging Face Support Team / Google Model Developers,

I am experiencing a persistent authentication issue while trying to load a gated model within my Hugging Face Space.

Technical Details:

Space ID: Gigantos89/LTX-2-3-First-Last-Frame

Target Model: google/gemma-3-12b-it-qat-q4_0-unquantized

Error: huggingface_hub.errors.GatedRepoError: 401 Client Error

Current Status & Troubleshooting Performed:

License Acceptance: I have manually visited the model card and clicked "Acknowledge license." My account status for this model is officially "ACCEPTED".

Authentication in Code: My app.py uses snapshot_download(repo_id=GEMMA_REPO, token=HF_TOKEN), where HF_TOKEN is a valid secret provided in the Space settings.

Successful Downloads: Other models in the same session (e.g., Lightricks/LTX-2.3-fp8) download without issues using the same token, proving the token is functional.

Specific Error Point: The logs show the failure occurs specifically when the huggingface_hub tries to fetch the .gitattributes file for the Gemma-3 model.

Could you please verify if there is a permission sync lag between my user account and the Space’s runtime environment for this specific Google repository?

Thank you for your assistance in resolving this manufacturing bottleneck.

Best regards,
Gigantos89

Google org

Hi @Gigantos89 ,

Apologies for the late reply.
Thanks for addressing the issue!

Could you please confirm if you have checked your Hugging Face token type and permissions?
If you are using Hugging Face's newer Fine-Grained tokens, a token scoped strictly to "Read public repositories" will fail on gated repos, even if your underlying account has already accepted the license agreement.

To verify and fix this:

  1. Go to your Hugging Face Account Settings ----> Access Tokens.
  2. Check the configuration of the token you are using for HF_TOKEN.
  3. Ensure it is either a Classic "Read" token or a Fine-Grained token that explicitly includes permissions for "Read access to contents of all public/gated repos you have access to".

Please let us know if upgrading the token permissions resolves the 401 GatedRepoError for you!

Looks like downloads of this model have gone to zero because of the 401. I could be wrong, but I couldn't defeat it.

Sign up or log in to comment