r""" Args: sample (`torch.FloatTensor`): Input sample. return_dict (`bool`, *optional*, defaults to `True`): Whether or not to return a [`DecoderOutput`] instead of a plain tuple.
(self, sample: torch.FloatTensor, return_dict: bool = True)
| 142 | return DecoderOutput(sample=dec) |
| 143 | |
| 144 | def forward(self, sample: torch.FloatTensor, return_dict: bool = True) -> Union[DecoderOutput, torch.FloatTensor]: |
| 145 | r""" |
| 146 | Args: |
| 147 | sample (`torch.FloatTensor`): Input sample. |
| 148 | return_dict (`bool`, *optional*, defaults to `True`): |
| 149 | Whether or not to return a [`DecoderOutput`] instead of a plain tuple. |
| 150 | """ |
| 151 | x = sample |
| 152 | h = self.encode(x).latents |
| 153 | dec = self.decode(h).sample |
| 154 | |
| 155 | if not return_dict: |
| 156 | return (dec,) |
| 157 | |
| 158 | return DecoderOutput(sample=dec) |
nothing calls this directly
no test coverage detected