(self, z)
| 57 | return ((z - mean) / std) * self.sigma_data |
| 58 | |
| 59 | def decode(self, z): |
| 60 | in_dtype = z.dtype |
| 61 | latent_ch = z.shape[1] |
| 62 | latent_t = z.shape[2] |
| 63 | mean = self.latent_mean.view(latent_ch, -1)[:, : latent_t].reshape([1, latent_ch, -1, 1, 1]).to(dtype=in_dtype, device=z.device) |
| 64 | std = self.latent_std.view(latent_ch, -1)[:, : latent_t].reshape([1, latent_ch, -1, 1, 1]).to(dtype=in_dtype, device=z.device) |
| 65 | z = z / self.sigma_data |
| 66 | z = z * std + mean |
| 67 | z = self.post_quant_conv(z) |
| 68 | return self.decoder(z) |
| 69 | |
| 70 | |
| 71 | def load_official_video_vae(): |
no test coverage detected