-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Feature] Implement tiled VAE encoding/decoding for Wan model. #11414
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
base: main
Are you sure you want to change the base?
Conversation
Hi @a-r-r-o-w @yiyixuxu, could you please help reviewing this patch? Thanks! |
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.
I hope the inline comment makes sense to you~
@@ -677,42 +677,7 @@ def __init__( | |||
attn_scales: List[float] = [], | |||
temperal_downsample: List[bool] = [False, True, True], | |||
dropout: float = 0.0, | |||
latents_mean: List[float] = [ |
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.
These function parameters are not being used. They have been removed in this patch but can be added back at any time if needed.
batch_size = 2 | ||
num_frames = 9 | ||
num_channels = 3 | ||
sizes = (640, 480) |
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.
Add another input because the (16, 16) tensor is too small for tiling operations.
|
||
self.assertLess( | ||
(output_without_tiling.detach().cpu().numpy() - output_with_tiling.detach().cpu().numpy()).max(), | ||
0.5, |
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.
On my machine, this value is approximately 0.404, and IIRC the average absolute value of these arrays is less than 0.01, which makes me confident that the implementation is correct at some point.
What does this PR do?
Implement tiled VAE encoding/decoding for Wan model.
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
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.