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

Method get_shape_dict

demo/Diffusion/models.py:306–312  ·  view source on GitHub ↗
(self, batch_size, image_height, image_width)

Source from the content-addressed store, hash-verified

304 }
305
306 def get_shape_dict(self, batch_size, image_height, image_width):
307 latent_height, latent_width = self.check_dims(batch_size, image_height, image_width)
308 return {
309 'sample': (2*batch_size, self.unet_dim, latent_height, latent_width),
310 'encoder_hidden_states': (2*batch_size, self.text_maxlen, self.embedding_dim),
311 'latent': (2*batch_size, 4, latent_height, latent_width)
312 }
313
314 def get_sample_input(self, batch_size, image_height, image_width):
315 latent_height, latent_width = self.check_dims(batch_size, image_height, image_width)

Callers

nothing calls this directly

Calls 1

check_dimsMethod · 0.80

Tested by

no test coverage detected