MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / __init__

Method __init__

demo/Diffusion/models.py:382–385  ·  view source on GitHub ↗
(self, token, device, path)

Source from the content-addressed store, hash-verified

380
381class TorchVAEEncoder(torch.nn.Module):
382 def __init__(self, token, device, path):
383 super().__init__()
384 self.path = path
385 self.vae_encoder = AutoencoderKL.from_pretrained(self.path, subfolder="vae", use_auth_token=token).to(device)
386
387 def forward(self, x):
388 return self.vae_encoder.encode(x).latent_dist.sample()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected