"docs/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "ab03dc4370acaaef05810465a077691472624b2b"
Unverified Commit f295e2ee authored by Hanch Han's avatar Hanch Han Committed by GitHub
Browse files

[fix] refer use_framewise_encoding on AutoencoderKLHunyuanVideo._encode (#10600)



* fix: refer to use_framewise_encoding on AutoencoderKLHunyuanVideo._encode

* fix: comment about tile_sample_min_num_frames

---------
Co-authored-by: default avatarAryan <aryan@huggingface.co>
parent 658e24e8
...@@ -786,7 +786,7 @@ class AutoencoderKLHunyuanVideo(ModelMixin, ConfigMixin): ...@@ -786,7 +786,7 @@ class AutoencoderKLHunyuanVideo(ModelMixin, ConfigMixin):
self.use_tiling = False self.use_tiling = False
# When decoding temporally long video latents, the memory requirement is very high. By decoding latent frames # When decoding temporally long video latents, the memory requirement is very high. By decoding latent frames
# at a fixed frame batch size (based on `self.num_latent_frames_batch_sizes`), the memory requirement can be lowered. # at a fixed frame batch size (based on `self.tile_sample_min_num_frames`), the memory requirement can be lowered.
self.use_framewise_encoding = True self.use_framewise_encoding = True
self.use_framewise_decoding = True self.use_framewise_decoding = True
...@@ -868,7 +868,7 @@ class AutoencoderKLHunyuanVideo(ModelMixin, ConfigMixin): ...@@ -868,7 +868,7 @@ class AutoencoderKLHunyuanVideo(ModelMixin, ConfigMixin):
def _encode(self, x: torch.Tensor) -> torch.Tensor: def _encode(self, x: torch.Tensor) -> torch.Tensor:
batch_size, num_channels, num_frames, height, width = x.shape batch_size, num_channels, num_frames, height, width = x.shape
if self.use_framewise_decoding and num_frames > self.tile_sample_min_num_frames: if self.use_framewise_encoding and num_frames > self.tile_sample_min_num_frames:
return self._temporal_tiled_encode(x) return self._temporal_tiled_encode(x)
if self.use_tiling and (width > self.tile_sample_min_width or height > self.tile_sample_min_height): if self.use_tiling and (width > self.tile_sample_min_width or height > self.tile_sample_min_height):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment