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
bc261058
Unverified
Commit
bc261058
authored
Apr 11, 2025
by
Tuna Tuncer
Committed by
GitHub
Apr 11, 2025
Browse files
Fix incorrect tile_latent_min_width calculation in AutoencoderKLMochi (#11294)
parent
7054a349
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/models/autoencoders/autoencoder_kl_mochi.py
src/diffusers/models/autoencoders/autoencoder_kl_mochi.py
+1
-1
No files found.
src/diffusers/models/autoencoders/autoencoder_kl_mochi.py
View file @
bc261058
...
@@ -909,7 +909,7 @@ class AutoencoderKLMochi(ModelMixin, ConfigMixin):
...
@@ -909,7 +909,7 @@ class AutoencoderKLMochi(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
(
width
>
tile_latent_min_width
or
height
>
tile_latent_min_height
):
if
self
.
use_tiling
and
(
width
>
tile_latent_min_width
or
height
>
tile_latent_min_height
):
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