Commit 16a93f1
[core] FreeNoise (huggingface#8948)
* initial work draft for freenoise; needs massive cleanup
* fix freeinit bug
* add animatediff controlnet implementation
* revert attention changes
* add freenoise
* remove old helper functions
* add decode batch size param to all pipelines
* make style
* fix copied from comments
* make fix-copies
* make style
* copy animatediff controlnet implementation from huggingface#8972
* add experimental support for num_frames not perfectly fitting context length, ocntext stride
* make unet motion model lora work again based on huggingface#8995
* copy load video utils from huggingface#8972
* copied from AnimateDiff::prepare_latents
* address the case where last batch of frames does not match length of indices in prepare latents
* decode_batch_size->vae_batch_size; batch vae encode support in animatediff vid2vid
* revert sparsectrl and sdxl freenoise changes
* revert pia
* add freenoise tests
* make fix-copies
* improve docstrings
* add freenoise tests to animatediff controlnet
* update tests
* Update src/diffusers/models/unets/unet_motion_model.py
* add freenoise to animatediff pag
* address review comments
* make style
* update tests
* make fix-copies
* fix error message
* remove copied from comment
* fix imports in tests
* update
---------
Co-authored-by: Dhruv Nair <[email protected]>1 parent 2d753b6 commit 16a93f1
File tree
11 files changed
+911
-50
lines changed- src/diffusers
- models
- unets
- pipelines
- animatediff
- pag
- tests/pipelines
- animatediff
- pag
11 files changed
+911
-50
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
| 540 | + | |
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
| |||
761 | 763 | | |
762 | 764 | | |
763 | 765 | | |
| 766 | + | |
764 | 767 | | |
765 | 768 | | |
766 | 769 | | |
| |||
921 | 924 | | |
922 | 925 | | |
923 | 926 | | |
924 | | - | |
925 | 927 | | |
926 | 928 | | |
| 929 | + | |
927 | 930 | | |
928 | 931 | | |
929 | 932 | | |
| |||
1923 | 1926 | | |
1924 | 1927 | | |
1925 | 1928 | | |
1926 | | - | |
1927 | 1929 | | |
1928 | 1930 | | |
1929 | 1931 | | |
| |||
1953 | 1955 | | |
1954 | 1956 | | |
1955 | 1957 | | |
1956 | | - | |
1957 | 1958 | | |
1958 | 1959 | | |
1959 | 1960 | | |
| |||
Lines changed: 27 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
394 | 396 | | |
395 | 397 | | |
396 | 398 | | |
397 | | - | |
398 | | - | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
404 | | - | |
405 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
406 | 413 | | |
407 | 414 | | |
408 | 415 | | |
| |||
495 | 502 | | |
496 | 503 | | |
497 | 504 | | |
498 | | - | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
502 | 520 | | |
503 | 521 | | |
504 | 522 | | |
505 | 523 | | |
506 | 524 | | |
507 | 525 | | |
508 | 526 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | 527 | | |
515 | 528 | | |
516 | 529 | | |
| |||
569 | 582 | | |
570 | 583 | | |
571 | 584 | | |
| 585 | + | |
572 | 586 | | |
573 | 587 | | |
574 | 588 | | |
| |||
637 | 651 | | |
638 | 652 | | |
639 | 653 | | |
| 654 | + | |
| 655 | + | |
640 | 656 | | |
641 | 657 | | |
642 | 658 | | |
| |||
808 | 824 | | |
809 | 825 | | |
810 | 826 | | |
811 | | - | |
| 827 | + | |
812 | 828 | | |
813 | 829 | | |
814 | 830 | | |
| |||
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
432 | 434 | | |
433 | 435 | | |
434 | 436 | | |
435 | | - | |
| 437 | + | |
| 438 | + | |
436 | 439 | | |
437 | 440 | | |
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
442 | | - | |
443 | | - | |
| 445 | + | |
| 446 | + | |
444 | 447 | | |
445 | 448 | | |
446 | 449 | | |
| |||
608 | 611 | | |
609 | 612 | | |
610 | 613 | | |
611 | | - | |
| 614 | + | |
612 | 615 | | |
613 | 616 | | |
614 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
615 | 630 | | |
616 | 631 | | |
617 | 632 | | |
618 | 633 | | |
619 | 634 | | |
620 | 635 | | |
621 | 636 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | 637 | | |
628 | 638 | | |
629 | 639 | | |
| |||
718 | 728 | | |
719 | 729 | | |
720 | 730 | | |
721 | | - | |
| 731 | + | |
722 | 732 | | |
723 | 733 | | |
724 | 734 | | |
| |||
1054 | 1064 | | |
1055 | 1065 | | |
1056 | 1066 | | |
1057 | | - | |
| 1067 | + | |
1058 | 1068 | | |
1059 | 1069 | | |
1060 | 1070 | | |
| |||
Lines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
501 | | - | |
502 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
503 | 513 | | |
504 | 514 | | |
505 | 515 | | |
506 | 516 | | |
507 | 517 | | |
508 | | - | |
509 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
510 | 526 | | |
511 | 527 | | |
512 | 528 | | |
| |||
622 | 638 | | |
623 | 639 | | |
624 | 640 | | |
| 641 | + | |
625 | 642 | | |
626 | 643 | | |
627 | 644 | | |
| |||
656 | 673 | | |
657 | 674 | | |
658 | 675 | | |
659 | | - | |
660 | | - | |
| 676 | + | |
661 | 677 | | |
662 | 678 | | |
663 | | - | |
664 | | - | |
665 | | - | |
| 679 | + | |
666 | 680 | | |
667 | 681 | | |
668 | 682 | | |
| |||
747 | 761 | | |
748 | 762 | | |
749 | 763 | | |
| 764 | + | |
750 | 765 | | |
751 | 766 | | |
752 | 767 | | |
| |||
822 | 837 | | |
823 | 838 | | |
824 | 839 | | |
| 840 | + | |
| 841 | + | |
825 | 842 | | |
826 | 843 | | |
827 | 844 | | |
| |||
923 | 940 | | |
924 | 941 | | |
925 | 942 | | |
| 943 | + | |
926 | 944 | | |
927 | 945 | | |
928 | 946 | | |
| |||
990 | 1008 | | |
991 | 1009 | | |
992 | 1010 | | |
993 | | - | |
| 1011 | + | |
994 | 1012 | | |
995 | 1013 | | |
996 | 1014 | | |
| |||
0 commit comments