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

Function make_VAEEncoder

demo/Diffusion/models.py:441–443  ·  view source on GitHub ↗
(version, hf_token, device, verbose, max_batch_size, inpaint=False)

Source from the content-addressed store, hash-verified

439 return torch.randn(batch_size, 3, image_height, image_width, dtype=torch.float32, device=self.device)
440
441def make_VAEEncoder(version, hf_token, device, verbose, max_batch_size, inpaint=False):
442 return VAEEncoder(hf_token=hf_token, device=device, verbose=verbose, path=get_path(version, inpaint=inpaint),
443 max_batch_size=max_batch_size, embedding_dim=get_embedding_dim(version))
444
445def make_tokenizer(version, hf_token):
446 return CLIPTokenizer.from_pretrained(get_path(version),

Callers 1

loadEnginesMethod · 0.90

Calls 3

VAEEncoderClass · 0.85
get_pathFunction · 0.85
get_embedding_dimFunction · 0.85

Tested by

no test coverage detected