MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / encode_images

Method encode_images

generation/tokenizer/vtp_tokenizer.py:83–93  ·  view source on GitHub ↗
(self, images)

Source from the content-addressed store, hash-verified

81 ])
82
83 def encode_images(self, images):
84 with torch.no_grad():
85 if not images.is_cuda:
86 images = images.cuda()
87
88 B, C, H, W = images.shape
89 self._current_img_h = H
90 self._current_img_w = W
91
92 latents = self.model.get_reconstruction_latents(images)
93 return latents.detach().cpu()
94
95 def decode_to_images(self, z):
96 with torch.no_grad():

Callers 1

mainFunction · 0.95

Calls 1

Tested by

no test coverage detected