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

Add Hugging Face repo download endpoint #78

Closed
wants to merge 1 commit into from

Conversation

DocShotgun
Copy link
Member

@DocShotgun DocShotgun commented Mar 7, 2024

Adds a wrapper for huggingface_hub downloader to download models/loras via API request, requires optional dependency huggingface_hub.

TODO:

  • More robust reporting of errors that occur within snapshot_download such as a bad repo_id or revision, unauthorized access to a gated/private repo (currently results in a simple 500 Internal Server Error)
  • Consider addition of default HF token to be used for downloading to config.yml, or reading a saved HF token from HF cache

Is your pull request related to a problem? Please describe.
N/A

Why should this feature be added?
Some users have requested the ability to download models through tabbyAPI itself. This adds a simple option that requires an optional dependency package for those who want this functionality and do not want to deal directly with huggingface-cli.

Examples
N/A

Additional context
N/A

* Adds a wrapper for huggingface_hub downloader, requires optional dependency huggingface_hub
@bdashore3
Copy link
Member

Great feature, but the current implementation of HF hub's downloader uses threads that don't have a SIGINT event set up. Therefore, this will require some more work to get working.

Reference: huggingface/huggingface_hub#1818

@bdashore3
Copy link
Member

Implemented in 55ccd1b

@bdashore3 bdashore3 closed this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants