Skip to content

Commit 36538e1

Browse files
authored
Fix incorrect tile_latent_min_width calculations (#11305)
1 parent 97e0ef4 commit 36538e1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/diffusers/models/autoencoders/autoencoder_kl_hunyuan_video.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def encode(
829829
def _decode(self, z: torch.Tensor, return_dict: bool = True) -> Union[DecoderOutput, torch.Tensor]:
830830
batch_size, num_channels, num_frames, height, width = z.shape
831831
tile_latent_min_height = self.tile_sample_min_height // self.spatial_compression_ratio
832-
tile_latent_min_width = self.tile_sample_stride_width // self.spatial_compression_ratio
832+
tile_latent_min_width = self.tile_sample_min_width // self.spatial_compression_ratio
833833
tile_latent_min_num_frames = self.tile_sample_min_num_frames // self.temporal_compression_ratio
834834

835835
if self.use_framewise_decoding and num_frames > tile_latent_min_num_frames:

src/diffusers/models/autoencoders/autoencoder_kl_ltx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ def _decode(
12851285
) -> Union[DecoderOutput, torch.Tensor]:
12861286
batch_size, num_channels, num_frames, height, width = z.shape
12871287
tile_latent_min_height = self.tile_sample_min_height // self.spatial_compression_ratio
1288-
tile_latent_min_width = self.tile_sample_stride_width // self.spatial_compression_ratio
1288+
tile_latent_min_width = self.tile_sample_min_width // self.spatial_compression_ratio
12891289
tile_latent_min_num_frames = self.tile_sample_min_num_frames // self.temporal_compression_ratio
12901290

12911291
if self.use_framewise_decoding and num_frames > tile_latent_min_num_frames:

src/diffusers/models/autoencoders/autoencoder_kl_magvit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ def encode(
887887
def _decode(self, z: torch.Tensor, return_dict: bool = True) -> Union[DecoderOutput, torch.Tensor]:
888888
batch_size, num_channels, num_frames, height, width = z.shape
889889
tile_latent_min_height = self.tile_sample_min_height // self.spatial_compression_ratio
890-
tile_latent_min_width = self.tile_sample_stride_width // self.spatial_compression_ratio
890+
tile_latent_min_width = self.tile_sample_min_width // self.spatial_compression_ratio
891891

892892
if self.use_tiling and (z.shape[-1] > tile_latent_min_height or z.shape[-2] > tile_latent_min_width):
893893
return self.tiled_decode(z, return_dict=return_dict)

0 commit comments

Comments
 (0)