-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[DiffusionPipeline] Deprecate not throwing error when loading non-existant variant #4011
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patrickvonplaten
commented
Jul 9, 2023
|
||
filenames = get_all_filenames(str(cached_folder)) | ||
|
||
all_model_files, variant_model_files = variant_compatible_siblings(filenames, variant=variant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's how one can easily test which variant was downloaded
The documentation is not available anymore as the PR was closed or merged. |
sayakpaul
approved these changes
Jul 9, 2023
sayakpaul
reviewed
Jul 9, 2023
LGTM, thanks @patrickvonplaten |
Co-authored-by: Sayak Paul <[email protected]>
pcuenca
reviewed
Jul 10, 2023
pcuenca
approved these changes
Jul 10, 2023
Co-authored-by: Pedro Cuenca <[email protected]>
patrickvonplaten
added a commit
that referenced
this pull request
Jul 11, 2023
…stant variant (#4011) * Deprecate variant nicely * make style * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
yoonseokjin
pushed a commit
to yoonseokjin/diffusers
that referenced
this pull request
Dec 25, 2023
…stant variant (huggingface#4011) * Deprecate variant nicely * make style * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
AmericanPresidentJimmyCarter
pushed a commit
to AmericanPresidentJimmyCarter/diffusers
that referenced
this pull request
Apr 26, 2024
…stant variant (huggingface#4011) * Deprecate variant nicely * make style * Apply suggestions from code review Co-authored-by: Sayak Paul <[email protected]> * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> --------- Co-authored-by: Sayak Paul <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Thanks for pointing out this problem @vladmandic . Upon thinking about it, I don't think we should even allow default to fp32 when trying to load "fp16" variants. Added a deprecation warning now.
Note that one can very easily test with this function if the variant is present: https://github.com/huggingface/diffusers/pull/4011/files#r1257526906
So ideally this should be done before downloading - e.g. via:
We can however also very easily check post-download what variants have been downloaded as shown here: #4011 (comment)