Skip to content
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

Add support for diffusers 0.29.0 #89

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Add support for diffusers 0.29.0 #89

merged 1 commit into from
Jun 17, 2024

Conversation

fofr
Copy link
Contributor

@fofr fofr commented Jun 17, 2024

There is a breaking change in diffusers 0.29.0 because the UNet blocks have been moved.

Fixes #86

Diffusers package has moved unet_2d_blocks.py into the "diffusers/models/unets/" path instead of the former "diffusers/models/" path. Line 10 in "lib_layerdiffusion/models.py" should be changed from from diffusers.models.unet_2d_blocks import UNetMidBlock2D, get_down_block, get_up_block to from diffusers.models.unets.unet_2d_blocks import UNetMidBlock2D, get_down_block, get_up_block.

This PR does a version check before loading the UNet blocks to maintain backwards compatibility.

Copy link
Owner

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@huchenlei huchenlei merged commit c5f1c0a into huchenlei:main Jun 17, 2024
1 check passed
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.

No module named 'diffusers.models.unet_2d_blocks'
2 participants