MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / sample

Method sample

wan/modules/vae.py:575–580  ·  view source on GitHub ↗
(self, imgs, deterministic=False)

Source from the content-addressed store, hash-verified

573 return eps * std + mu
574
575 def sample(self, imgs, deterministic=False):
576 mu, log_var = self.encode(imgs)
577 if deterministic:
578 return mu
579 std = torch.exp(0.5 * log_var.clamp(-30.0, 20.0))
580 return mu + std * torch.randn_like(std)
581
582 def clear_cache(self):
583 self._conv_num = count_conv3d(self.decoder)

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.95

Tested by

no test coverage detected