Uh oh!
There was an error while loading. Please reload this page.
[Big refactor] move unets to unets module 🦋 - #6630
Conversation
unets module 🦋unets module 🦋HuggingFaceDocBuilderDev
commented
Jan 18, 2024
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
The second one fails even on |
| @@ -0,0 +1,3591 @@ | |||
| # Copyright 2023 The HuggingFace Team. All rights reserved. | |||
There was a problem hiding this comment.
Why does this file only have 3591 lines but the original deleted unet_2d_blocks.py file has 3635 lines?
There was a problem hiding this comment.
I see the exact same number here: https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_blocks.py

Am I missing something?
Uh oh!
There was an error while loading. Please reload this page.
patrickvonplaten
left a comment
There was a problem hiding this comment.
Ok for me! Let's make sure that for import files such as unet_2d_condition.py, unet_2d_blocks.py, we keep the original file and import all classes of the moved files for backwards compatibility
sayakpaul
commented
Jan 19, 2024
Thanks, @patrickvonplaten. Added a couple classes in |
DN6
left a comment
There was a problem hiding this comment.
Fine for me to merge. Failing pipeline test looks unrelated, think just rerunning the workflow should get it to pass.
sayakpaul
commented
Jan 23, 2024
I am going to merge this to avoid merge conflicts. |
* begin animatediff img2video and video2video * revert animatediff to original implementation * add img2video as pipeline * update * add vid2vid pipeline * update imports * update * remove copied from line for check_inputs * update * update examples * add multi-batch support * fix __init__.py files * move img2vid to community * update community readme and examples * fix * make fix-copies * add vid2vid batch params * apply suggestions from review Co-Authored-By: Dhruv Nair <dhruv.nair@gmail.com> * add test for animatediff vid2vid * torch.stack -> torch.cat Co-Authored-By: Dhruv Nair <dhruv.nair@gmail.com> * make style * docs for vid2vid * update * fix prepare_latents * fix docs * remove img2vid * update README to :main * remove slow test * refactor pipeline output * update docs * update docs * merge community readme from :main * final fix i promise * add support for url in animatediff example * update example * update callbacks to latest implementation * Update src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * Update src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * fix merge * Apply suggestions from code review * remove callback and callback_steps as suggested in review * Update tests/pipelines/animatediff/test_animatediff_video2video.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * fix import error caused due to unet refactor in #6630 * fix numpy import error after tensor2vid refactor in #6626 * make fix-copies * fix numpy error * fix progress bar test --------- Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* move unets to module 🦋 * parameterize unet-level import. * fix flax unet2dcondition model import * models __init__ * mildly depcrecating models.unet_2d_blocks in favor of models.unets.unet_2d_blocks. * noqa * correct depcrecation behaviour * inherit from the actual classes. * Empty-Commit * backwards compatibility for unet_2d.py * backward compatibility for unet_2d_condition * bc for unet_1d * bc for unet_1d_blocks
* begin animatediff img2video and video2video * revert animatediff to original implementation * add img2video as pipeline * update * add vid2vid pipeline * update imports * update * remove copied from line for check_inputs * update * update examples * add multi-batch support * fix __init__.py files * move img2vid to community * update community readme and examples * fix * make fix-copies * add vid2vid batch params * apply suggestions from review Co-Authored-By: Dhruv Nair <dhruv.nair@gmail.com> * add test for animatediff vid2vid * torch.stack -> torch.cat Co-Authored-By: Dhruv Nair <dhruv.nair@gmail.com> * make style * docs for vid2vid * update * fix prepare_latents * fix docs * remove img2vid * update README to :main * remove slow test * refactor pipeline output * update docs * update docs * merge community readme from :main * final fix i promise * add support for url in animatediff example * update example * update callbacks to latest implementation * Update src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * Update src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * fix merge * Apply suggestions from code review * remove callback and callback_steps as suggested in review * Update tests/pipelines/animatediff/test_animatediff_video2video.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * fix import error caused due to unet refactor in huggingface#6630 * fix numpy import error after tensor2vid refactor in huggingface#6626 * make fix-copies * fix numpy error * fix progress bar test --------- Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
What does this PR do?
As discussed internally, we would like to move the UNet related stuff to their dedicated module
unetsjust like we did withautoencoders.Note to reviewers: It's a big refactor. So, please take your time in reviewing it. But sooner we're able to merge this, lesser the number of merge conflicts we'll run into.