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
set config from original module but set compiled module on class #3650
set config from original module but set compiled module on class #3650
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
Nice fix! Can you add one test here? No need to run a forward pass in the dummy model, think we can just reproduce what was done in the readme
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.
Cool solution!
@@ -485,17 +485,19 @@ def register_modules(self, **kwargs): | |||
if module is None: | |||
register_dict = {name: (None, None)} | |||
else: | |||
# register the original module, not the dynamo compiled one | |||
# register the config from the original module, not the dynamo compiled one |
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.
❤️
|
||
# previous diffusers versions stripped compilation off | ||
# compiled modules | ||
assert is_compiled_module(ddpm.unet) | ||
|
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.
@patrickvonplaten just added to existing pipeline dynamo test. Confirmed fails on main and passes on branch
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.
Sounds good to me!
Feel free to merge :-) |
…gingface#3650) * set config from original module but set compiled module on class * add test
…gingface#3650) * set config from original module but set compiled module on class * add test
If you passed a compiled module to the pipeline constructor, this would silently strip the compilation and set the uncompiled module on the pipeline
Before:
Now: