Skip to content

Make sure torch compile doesn't access unet config #4008

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
merged 1 commit into from
Jul 9, 2023

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Jul 9, 2023

Make sure torch compile works for SDXL on different devices. On some GPU (like T4), PyTorch's compile changes the unet object to a function, which means it can't access the config anymore

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 9, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting how torch.compile() behavior changes here w.r.t the device.

@sayakpaul sayakpaul merged commit 68f61a0 into main Jul 9, 2023
@sayakpaul sayakpaul deleted the improve_torch_compile branch July 9, 2023 18:54
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
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.

3 participants