Skip to content

Commit d83d35c

Browse files
authored
Fix bug with VAE slicing in autoencoder_dc.py (#12343)
1 parent 843355f commit d83d35c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/autoencoders/autoencoder_dc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def decode(self, z: torch.Tensor, return_dict: bool = True) -> Union[DecoderOutp
617617
returned.
618618
"""
619619
if self.use_slicing and z.size(0) > 1:
620-
decoded_slices = [self._decode(z_slice).sample for z_slice in z.split(1)]
620+
decoded_slices = [self._decode(z_slice) for z_slice in z.split(1)]
621621
decoded = torch.cat(decoded_slices)
622622
else:
623623
decoded = self._decode(z)

0 commit comments

Comments
 (0)