Skip to content

fix: torch compile bugs with cpu and hqq#668

Open
gsprochette wants to merge 3 commits into
mainfrom
fix/torch-compile-bugs-with-cpu-and-hqq
Open

fix: torch compile bugs with cpu and hqq#668
gsprochette wants to merge 3 commits into
mainfrom
fix/torch-compile-bugs-with-cpu-and-hqq

Conversation

@gsprochette
Copy link
Copy Markdown
Collaborator

Description

This PR fixes two bugs that are torch-compile related:

  • 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).
  • TestTorchCompile_shufflenet-cpu : torch._dynamo.exc.InternalTorchDynamoError: IndexError: list index out of range -> is related to Preserve original GraphArgs for shape guard codegen pytorch/pytorch#90665 and is fixed by setting torch compile to compile dynamically by default on cpu to avoid a know issue about symbolic shapes.

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor (no functional change)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

  • I added or updated tests covering my changes
  • Existing tests pass locally (uv run pytest -m "cpu and not slow")

For full setup and testing instructions, see the Contributing Guide.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code, especially for agent-assisted changes
  • I updated the documentation where necessary

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.

Note:

  • Draft PRs or PRs without a clear and detailed overview may be delayed.
  • Please mark your PR as Ready for Review and ensure the sections above are filled out.
  • Contributions that are entirely AI-generated without meaningful human review are discouraged.

@gsprochette gsprochette requested a review from begumcig May 23, 2026 10:26
@gsprochette gsprochette force-pushed the fix/torch-compile-bugs-with-cpu-and-hqq branch from 2f7251c to be9d922 Compare May 23, 2026 10:28
@gsprochette gsprochette force-pushed the fix/torch-compile-bugs-with-cpu-and-hqq branch from 2b94e87 to 8e71e7b Compare May 23, 2026 10:57
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.

1 participant