Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
36538e11
You need to sign in or sign up before continuing.
Unverified
Commit
36538e11
authored
Apr 13, 2025
by
Tuna Tuncer
Committed by
GitHub
Apr 13, 2025
Browse files
Fix incorrect tile_latent_min_width calculations (#11305)
parent
97e0ef4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
src/diffusers/models/autoencoders/autoencoder_kl_hunyuan_video.py
...users/models/autoencoders/autoencoder_kl_hunyuan_video.py
+1
-1
src/diffusers/models/autoencoders/autoencoder_kl_ltx.py
src/diffusers/models/autoencoders/autoencoder_kl_ltx.py
+1
-1
src/diffusers/models/autoencoders/autoencoder_kl_magvit.py
src/diffusers/models/autoencoders/autoencoder_kl_magvit.py
+1
-1
No files found.
src/diffusers/models/autoencoders/autoencoder_kl_hunyuan_video.py
View file @
36538e11
...
@@ -829,7 +829,7 @@ class AutoencoderKLHunyuanVideo(ModelMixin, ConfigMixin):
...
@@ -829,7 +829,7 @@ class AutoencoderKLHunyuanVideo(ModelMixin, ConfigMixin):
def
_decode
(
self
,
z
:
torch
.
Tensor
,
return_dict
:
bool
=
True
)
->
Union
[
DecoderOutput
,
torch
.
Tensor
]:
def
_decode
(
self
,
z
:
torch
.
Tensor
,
return_dict
:
bool
=
True
)
->
Union
[
DecoderOutput
,
torch
.
Tensor
]:
batch_size
,
num_channels
,
num_frames
,
height
,
width
=
z
.
shape
batch_size
,
num_channels
,
num_frames
,
height
,
width
=
z
.
shape
tile_latent_min_height
=
self
.
tile_sample_min_height
//
self
.
spatial_compression_ratio
tile_latent_min_height
=
self
.
tile_sample_min_height
//
self
.
spatial_compression_ratio
tile_latent_min_width
=
self
.
tile_sample_
stride
_width
//
self
.
spatial_compression_ratio
tile_latent_min_width
=
self
.
tile_sample_
min
_width
//
self
.
spatial_compression_ratio
tile_latent_min_num_frames
=
self
.
tile_sample_min_num_frames
//
self
.
temporal_compression_ratio
tile_latent_min_num_frames
=
self
.
tile_sample_min_num_frames
//
self
.
temporal_compression_ratio
if
self
.
use_framewise_decoding
and
num_frames
>
tile_latent_min_num_frames
:
if
self
.
use_framewise_decoding
and
num_frames
>
tile_latent_min_num_frames
:
...
...
src/diffusers/models/autoencoders/autoencoder_kl_ltx.py
View file @
36538e11
...
@@ -1285,7 +1285,7 @@ class AutoencoderKLLTXVideo(ModelMixin, ConfigMixin, FromOriginalModelMixin):
...
@@ -1285,7 +1285,7 @@ class AutoencoderKLLTXVideo(ModelMixin, ConfigMixin, FromOriginalModelMixin):
)
->
Union
[
DecoderOutput
,
torch
.
Tensor
]:
)
->
Union
[
DecoderOutput
,
torch
.
Tensor
]:
batch_size
,
num_channels
,
num_frames
,
height
,
width
=
z
.
shape
batch_size
,
num_channels
,
num_frames
,
height
,
width
=
z
.
shape
tile_latent_min_height
=
self
.
tile_sample_min_height
//
self
.
spatial_compression_ratio
tile_latent_min_height
=
self
.
tile_sample_min_height
//
self
.
spatial_compression_ratio
tile_latent_min_width
=
self
.
tile_sample_
stride
_width
//
self
.
spatial_compression_ratio
tile_latent_min_width
=
self
.
tile_sample_
min
_width
//
self
.
spatial_compression_ratio
tile_latent_min_num_frames
=
self
.
tile_sample_min_num_frames
//
self
.
temporal_compression_ratio
tile_latent_min_num_frames
=
self
.
tile_sample_min_num_frames
//
self
.
temporal_compression_ratio
if
self
.
use_framewise_decoding
and
num_frames
>
tile_latent_min_num_frames
:
if
self
.
use_framewise_decoding
and
num_frames
>
tile_latent_min_num_frames
:
...
...
src/diffusers/models/autoencoders/autoencoder_kl_magvit.py
View file @
36538e11
...
@@ -887,7 +887,7 @@ class AutoencoderKLMagvit(ModelMixin, ConfigMixin):
...
@@ -887,7 +887,7 @@ class AutoencoderKLMagvit(ModelMixin, ConfigMixin):
def
_decode
(
self
,
z
:
torch
.
Tensor
,
return_dict
:
bool
=
True
)
->
Union
[
DecoderOutput
,
torch
.
Tensor
]:
def
_decode
(
self
,
z
:
torch
.
Tensor
,
return_dict
:
bool
=
True
)
->
Union
[
DecoderOutput
,
torch
.
Tensor
]:
batch_size
,
num_channels
,
num_frames
,
height
,
width
=
z
.
shape
batch_size
,
num_channels
,
num_frames
,
height
,
width
=
z
.
shape
tile_latent_min_height
=
self
.
tile_sample_min_height
//
self
.
spatial_compression_ratio
tile_latent_min_height
=
self
.
tile_sample_min_height
//
self
.
spatial_compression_ratio
tile_latent_min_width
=
self
.
tile_sample_
stride
_width
//
self
.
spatial_compression_ratio
tile_latent_min_width
=
self
.
tile_sample_
min
_width
//
self
.
spatial_compression_ratio
if
self
.
use_tiling
and
(
z
.
shape
[
-
1
]
>
tile_latent_min_height
or
z
.
shape
[
-
2
]
>
tile_latent_min_width
):
if
self
.
use_tiling
and
(
z
.
shape
[
-
1
]
>
tile_latent_min_height
or
z
.
shape
[
-
2
]
>
tile_latent_min_width
):
return
self
.
tiled_decode
(
z
,
return_dict
=
return_dict
)
return
self
.
tiled_decode
(
z
,
return_dict
=
return_dict
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment