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

Use HF_ENDPOINT variable for HuggingFace domain with default #15443

Merged

Conversation

Satariall
Copy link

@Satariall Satariall commented Apr 5, 2024

Modified the list_models function to dynamically construct the model URL by using an environment variable for the HuggingFace domain. This allows for greater flexibility in specifying the domain and ensures that the modification is also compatible with the Hub client library. By supporting different environments or requirements without hardcoding the domain name, this change facilitates the use of custom HuggingFace domains not only within our code but also when interacting with the Hub client library.

Description

Add HF_ENDPOINT variable with default value https://huggingface.co. With that setting we could use JFrog Artifactory to proxying Hugging Face models and load them from internal cache.

Screenshots/videos:

image

Checklist:

Modified the list_models function to dynamically construct the model URL
by using an environment variable for the HuggingFace domain. This allows
for greater flexibility in specifying the domain and ensures that the
modification is also compatible with the Hub client library. By
supporting different environments or requirements without hardcoding the
domain name, this change facilitates the use of custom HuggingFace
domains not only within our code but also when interacting with the Hub
client library.
@Satariall Satariall requested a review from AUTOMATIC1111 as a code owner April 5, 2024 10:04
@light-and-ray
Copy link
Contributor

There are other places in the code, where hugging face is used. Upscalers, face restoration

@AUTOMATIC1111 AUTOMATIC1111 merged commit 73f7812 into AUTOMATIC1111:dev Apr 6, 2024
3 checks passed
AUTOMATIC1111 added a commit that referenced this pull request Apr 6, 2024
ruchej pushed a commit to ruchej/stable-diffusion-webui that referenced this pull request Sep 30, 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.

3 participants