Commit 6119e4a
committed
fix(wan): adapt patchify consumers to bare-tensor return (#1063)
WanModel.patchify returns a bare [b,c,f,h,w] tensor, but WanModel.forward and usp_dit_forward unpacked x, (f,h,w) = self.patchify(x). Flatten and derive the grid in the consumers to match. Drops the earlier model_fn_wans2v edit: that path runs WanS2VModel, whose patchify already returns (flattened_x, grid_size), so the original tuple-unpack was correct.1 parent bf5faf6 commit 6119e4a
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
531 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
0 commit comments