fix: torch compile bugs hqq#668
Conversation
2b94e87 to
8e71e7b
Compare
|
@gsprochette Do you know the specific reason why the torch compile error is happening? I cannot replicate the error on my machine. I launched the test by disabling the cuda visible devices (and double checked by checking nvtop to make sure nothing is being launched on my GPU) : The issue you shared is from 2022 so I don't think it's also related to a new version of a package. I am a little curious as to why we started having this error all of a sudden |
begumcig
left a comment
There was a problem hiding this comment.
Thank you so much Gaspar! I have no questions about the hqq_diffusers + torch.compile fix! I couldn't replicate the other error so perhaps we should look into why it started happening now?
|
Hey @begumcig , you're completely right about the issue, it was the issue that the error pointed to but that was from a previous version of torch. I investigated further and the error can't be reproduced because information is cached so the bug is avoided. I opened a separate one #673 where all of this is explained and added you as reviewer for this other PR as well :) |
8e71e7b to
8fa3dab
Compare
Description
This PR fixes a torch-compile related bug: sd_tiny_random-hqq_diffusers+torch_compile-False-cmmd : AttributeError: 'Upsample2D' object has no attribute 'Conv2d_0' -> comes from the loss of the called module when saving and loading after hqq+torch-compile on unet-based models (which trigger a legacy naming).
Related Issue
Fixes #(issue number)
Type of Change
Testing
uv run pytest -m "cpu and not slow")For full setup and testing instructions, see the Contributing Guide.
Checklist
Thanks for contributing to Pruna! We're excited to review your work.
New to contributing? Check out our Contributing Guide for everything you need to get started.