-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[fix] FreeInit step index out of bounds #8969
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch!
should we add a test for when fast mode is disabled?
thanks. yes, i think we should have another tiny freeinit test for atleast one scheduler that manages an internal state |
@yiyixuxu WDYT? Without the change in |
@a-r-r-o-w |
You're partially right - when use_fast_sampling is False, the timesteps and _step_index are never reset, but that's not a problem with something like DDIM. For DPMSolver, however, the _step_index continues to increase unless reset, which we do now in the PR. I don't think it's really necessary to add any more schedulers because I've rarely come across newer workflows with recommended settings being anything but Euler, Euler A, DDIM, DPMSolver variants, LCM and Align Your Steps for AnimateDiff. i also think FreeInit is one of the lesser used features so we shouldn't need to burden our fast tests with too many tests for all settings of it. It can stabilize videos from models that don't work too well for video, but people wouldn't be using bad models in serious use cases anyway. AnimateLCM atleast pretty much doesn't seem to benefit much from the overhead of extra steps added IMO. We can revisit if it helps in specific workflows in the future :) |
* initial sparse control model draft * remove unnecessary implementation * copy animatediff pipeline * remove deprecated callbacks * update * update pipeline implementation progress * make style * make fix-copies * update progress * add partially working pipeline * remove debug prints * add model docs * dummy objects * improve motion lora conversion script * fix bugs * update docstrings * remove unnecessary model params; docs * address review comment * add copied from to zero_module * copy animatediff test * add fast tests * update docs * update * update pipeline docs * fix expected slice values * fix license * remove get_down_block usage * remove temporal_double_self_attention from get_down_block * update * update docs with org and documentation images * make from_unet work in sparsecontrolnetmodel * add latest freeinit test from #8969 * make fix-copies * LoraLoaderMixin -> StableDiffsuionLoraLoaderMixin
* add animatediff controlnet to core * make style; remove unused method * fix copied from comment * add tests * changes to make tests work * add utility function to load videos * update docs * update pipeline example * make style * update docs with example * address review comments * add latest freeinit test from #8969 * LoraLoaderMixin -> StableDiffusionLoraLoaderMixin * fix docs * Update src/diffusers/utils/loading_utils.py Co-authored-by: Dhruv Nair <[email protected]> * fix: variable out of scope --------- Co-authored-by: Dhruv Nair <[email protected]>
* fix step index out of bounds * add test for free_init with different schedulers * add test to vid2vid and pia
* initial sparse control model draft * remove unnecessary implementation * copy animatediff pipeline * remove deprecated callbacks * update * update pipeline implementation progress * make style * make fix-copies * update progress * add partially working pipeline * remove debug prints * add model docs * dummy objects * improve motion lora conversion script * fix bugs * update docstrings * remove unnecessary model params; docs * address review comment * add copied from to zero_module * copy animatediff test * add fast tests * update docs * update * update pipeline docs * fix expected slice values * fix license * remove get_down_block usage * remove temporal_double_self_attention from get_down_block * update * update docs with org and documentation images * make from_unet work in sparsecontrolnetmodel * add latest freeinit test from #8969 * make fix-copies * LoraLoaderMixin -> StableDiffsuionLoraLoaderMixin
* add animatediff controlnet to core * make style; remove unused method * fix copied from comment * add tests * changes to make tests work * add utility function to load videos * update docs * update pipeline example * make style * update docs with example * address review comments * add latest freeinit test from #8969 * LoraLoaderMixin -> StableDiffusionLoraLoaderMixin * fix docs * Update src/diffusers/utils/loading_utils.py Co-authored-by: Dhruv Nair <[email protected]> * fix: variable out of scope --------- Co-authored-by: Dhruv Nair <[email protected]>
What does this PR do?
When using schedulers that maintain an internal
_step_index
, FreeInit with fast mode disabled fails with an out of bounds error. Discovered hereCode to reproduce
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@DN6