-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Refactor] Update from single file #6428
Conversation
@@ -389,7 +389,12 @@ def _get_pipeline_class( | |||
return class_obj | |||
|
|||
diffusers_module = importlib.import_module(class_obj.__module__.split(".")[0]) | |||
class_name = config["_class_name"] | |||
class_name = class_name or config["_class_name"] |
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.
Is that fully backwards compatible?
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.
I searched the code base and it seems like class_name
or config is always passed here.
Nice PR - things look more or less good to go for me. Some things I'd like to resolve before merging:
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
PR is good to merge for me to get going here. Let's make sure we also refactor the "model-single-file" loaders in a follow-up PR.
I checked and the the slow tests are passing. I can add the model |
): | ||
vae_scaling_factor = original_config["model"]["params"]["scale_factor"] | ||
else: | ||
vae_scaling_factor = 0.18215 # default SD scaling factor |
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.
If no scaling factor is provided, the default should be set to 0.18215
* update * update * update * update * update * update * update * update * update * update * update' * update * update * update * update * update * update * up * update * update * update * update * update * update * update * update * update * update * update * update * up * update * update * update * update * update' * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * clean * update * update * clean up * clean up * update * clean * clean * update * updaet * clean up * fix docs * update * update * Revert "update" This reverts commit dbfb8f1. * update * update * update * update * fix controlnet * fix scheduler * fix controlnet tests
What does this PR do?
from_single_file
relies ondownload_from_original_stable_diffusion_ckpt
which is now quite difficult to read and has a number of subtle issues.This PR:
FromOriginalVAEMixin
andFromOriginalControlnetMixin
into their own modules.Some Notes:
test_download_ckpt_diff_format_is_same
. As such, only slow tests have been added.Fixes # (issue)
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.