diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[WIP ] Add AnimateDiff SparseCntrl

Open DN6 opened this issue 1 year ago • 10 comments

What does this PR do?

Add AnimateDiff SparseCntrl model to diffusers https://github.com/guoyww/AnimateDiff/tree/main?tab=readme-ov-file#202312-animatediff-v3-and-sparsectrl

TODO:

  • [x] Convert checkpoints to diffusers format
  • [x] Add sparse control pipeline and sparse controlnet model
  • [ ] Docs
  • [ ] Ensure outputs are equivalent for original model and diffusers version

Fixes # (issue)

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ ] Did you read the contributor guideline?
  • [ ] Did you read our philosophy doc (important for complex PRs)?
  • [ ] Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

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 avatar Dec 22 '23 11:12 DN6

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.

It seems that AnimateDiffSparseControlNetPipeline cannot be imported because nothing added in init.py. Besides, the quality seems not good enough. The scribble control model does not effectively control the frames of the corresponding video based on the input controlnet image

chuck-ma avatar Jan 04 '24 10:01 chuck-ma

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Jan 28 '24 15:01 github-actions[bot]

@DN6

sayakpaul avatar Jan 28 '24 15:01 sayakpaul

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Feb 22 '24 15:02 github-actions[bot]

@DN6 Hey, what's holding this from merge? Happy to help if there's anything I can look into

a-r-r-o-w avatar Mar 08 '24 09:03 a-r-r-o-w

Hi @a-r-r-o-w sorry been a bit caught up with some other things. Feel free to take over this PR or open a new one if you prefer.

The SparseControlNet needs to be cleaned up and we need to verify that the outputs match the original models.

DN6 avatar Mar 12 '24 14:03 DN6

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Apr 05 '24 15:04 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar May 02 '24 15:05 github-actions[bot]

hello, is this WIP still in progress? seems stuck for half a year, which is very sad, as this is a much wanted feature.

i've tried to employ it as is and got some working controlnet-related results, but it worked per-frame (as usual non-sparse controlnet), not affecting the motion. that is, "controlled" (indexed) frames reproduced controlnet inputs while the rest was generated as if there was no controlnet at all. on my understanding it looked like the motion part of the model (some 3d blocks?) were not properly connected to the controlnet somehow, or i'm missing something..

UPD: another glue is that setting strict=True in the checkpoint conversion script brings some missing motion modules keys. I used the checkpoint from guoyww as a source.

eps696 avatar Jul 03 '24 13:07 eps696

hello @eps696! we recently shipped SparseCtrl in #8897 and it will be part of the next release. apologies for the delay :) feel free to try it out and let us know if you find any bugs, thanks!

@DN6 this can be closed now, no?

a-r-r-o-w avatar Jul 28 '24 17:07 a-r-r-o-w

Closing in favour of https://github.com/huggingface/diffusers/pull/8897

DN6 avatar Jul 29 '24 04:07 DN6