Skip to content

Commit

Permalink
Follow the style guidelines in AutoencoderKL's decode
Browse files Browse the repository at this point in the history
  • Loading branch information
stano committed Oct 2, 2023
1 parent f7ee6b0 commit 7f2d5d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/diffusers/models/autoencoder_kl.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,17 +283,17 @@ def _decode(self, z: torch.FloatTensor, return_dict: bool = True) -> Union[Decod
def decode(self, z: torch.FloatTensor, return_dict: bool = True) -> Union[DecoderOutput, torch.FloatTensor]:
"""
Decode a batch of images.
Args:
z (`torch.FloatTensor`): Input batch of latent vectors.
return_dict (`bool`, *optional*, defaults to `True`):
Whether to return a [`~models.vae.DecoderOutput`] instead of a plain tuple.
Returns:
[`~models.vae.DecoderOutput`] or `tuple`:
If return_dict is True, a [`~models.vae.DecoderOutput`] is returned, otherwise a plain `tuple` is
returned.
"""
if self.use_slicing and z.shape[0] > 1:
decoded_slices = [self._decode(z_slice).sample for z_slice in z.split(1)]
Expand Down

0 comments on commit 7f2d5d3

Please sign in to comment.