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

Turn the HuggingFaceConceptsLib into a singleton to prevent redundant connections #3337

Merged
merged 2 commits into from May 10, 2023

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented May 3, 2023

This is a partial fix for #3330 . It prevents the concepts library from hitting HuggingFace to download concept library terms every time a model is changed.

It does not address the issue that the web interface downloads the concepts even if it is not going to use them.

@psychedelicious
Copy link
Collaborator

This is a separate problem from #3330 , see my comments there. Diffusers makes a connection to HF when calling from_pretrained(). It does not close the connection when that command finishes its business, it persists until the python process is ended.

@lstein
Copy link
Collaborator Author

lstein commented May 4, 2023

This is a separate problem from #3330 , see my comments there. Diffusers makes a connection to HF when calling from_pretrained(). It does not close the connection when that command finishes its business, it persists until the python process is ended.

Ok. Appreciate the detective work. This PR addresses a different problem then.

@lstein lstein enabled auto-merge May 10, 2023 03:38
@lstein lstein merged commit 18f0cbd into v2.3 May 10, 2023
6 checks passed
@lstein lstein deleted the lstein/bugfix/concept-lib-singleton branch May 10, 2023 04:00
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.

None yet

3 participants