MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / decode

Method decode

tools/cosmos_vae_test.py:59–68  ·  view source on GitHub ↗
(self, z)

Source from the content-addressed store, hash-verified

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
71def load_official_video_vae():

Callers 4

cosmos_vae_test.pyFile · 0.45
test_ideogram4.pyFile · 0.45
vae_decodeFunction · 0.45
vae_decodeFunction · 0.45

Calls 1

toMethod · 0.45

Tested by

no test coverage detected