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
d83d35c1
Unverified
Commit
d83d35c1
authored
Sep 22, 2025
by
Chen Mingyi
Committed by
GitHub
Sep 22, 2025
Browse files
Fix bug with VAE slicing in autoencoder_dc.py (#12343)
parent
843355f8
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_dc.py
src/diffusers/models/autoencoders/autoencoder_dc.py
+1
-1
No files found.
src/diffusers/models/autoencoders/autoencoder_dc.py
View file @
d83d35c1
...
@@ -617,7 +617,7 @@ class AutoencoderDC(ModelMixin, ConfigMixin, FromOriginalModelMixin):
...
@@ -617,7 +617,7 @@ class AutoencoderDC(ModelMixin, ConfigMixin, FromOriginalModelMixin):
returned.
returned.
"""
"""
if
self
.
use_slicing
and
z
.
size
(
0
)
>
1
:
if
self
.
use_slicing
and
z
.
size
(
0
)
>
1
:
decoded_slices
=
[
self
.
_decode
(
z_slice
)
.
sample
for
z_slice
in
z
.
split
(
1
)]
decoded_slices
=
[
self
.
_decode
(
z_slice
)
for
z_slice
in
z
.
split
(
1
)]
decoded
=
torch
.
cat
(
decoded_slices
)
decoded
=
torch
.
cat
(
decoded_slices
)
else
:
else
:
decoded
=
self
.
_decode
(
z
)
decoded
=
self
.
_decode
(
z
)
...
...
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