Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix access token lookup for model downloads #6570

Merged

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented Jul 3, 2024

Summary

PR #6132 inadvertently broke the system for submitting access tokens that match the source URL's regular expression. This PR fixes the issue.

Related Issues / Discussions

Nobody seems to have noticed this problem!

QA Instructions

Be sure to set up a civitai or huggingface access token in invokeai.yaml. E.g.:

remote_api_tokens:
- url_regex: huggingface\.co
  token: hf_xyxyxyxyxyxyx
- url_regex: civitai\.com
  token: abcabcabcabc

Then attempt to download a restricted model. It should succeed. If you remove or change the access token in the config, the download should fail.

Merge Plan

Merge when approved.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added python PRs that change python files services PRs that change app services labels Jul 3, 2024
@hipsterusername
Copy link
Member

This might suggest we need to better advertise this configuration capability…

@psychedelicious
Copy link
Collaborator

Oh this explains a few things. We've had some reports about problems downloading from model hubs. I ran into this recently and assumed civitai changed something, just been downloading models directly and scping them to my host.

@psychedelicious psychedelicious enabled auto-merge (rebase) July 3, 2024 03:22
@psychedelicious psychedelicious force-pushed the lstein/bugfix/reenable-download-access-tokens branch from 84f6901 to 5f8f957 Compare July 3, 2024 03:22
@psychedelicious psychedelicious merged commit a11dc62 into main Jul 3, 2024
14 checks passed
@psychedelicious psychedelicious deleted the lstein/bugfix/reenable-download-access-tokens branch July 3, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python PRs that change python files services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants