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

Method decode

models/cosmos.py:76–85  ·  view source on GitHub ↗
(self, z)

Source from the content-addressed store, hash-verified

74 return ((z - mean) / std) * self.sigma_data
75
76 def decode(self, z):
77 in_dtype = z.dtype
78 latent_ch = z.shape[1]
79 latent_t = z.shape[2]
80 mean = self.latent_mean.view(latent_ch, -1)[:, : latent_t].reshape([1, latent_ch, -1, 1, 1]).to(dtype=in_dtype, device=z.device)
81 std = self.latent_std.view(latent_ch, -1)[:, : latent_t].reshape([1, latent_ch, -1, 1, 1]).to(dtype=in_dtype, device=z.device)
82 z = z / self.sigma_data
83 z = z * std + mean
84 z = self.post_quant_conv(z)
85 return self.decoder(z)
86
87
88def load_custom_video_vae(path):

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected