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

Method get_input_profile

demo/Diffusion/models.py:358–364  ·  view source on GitHub ↗
(self, batch_size, image_height, image_width, static_batch, static_shape)

Source from the content-addressed store, hash-verified

356 }
357
358 def get_input_profile(self, batch_size, image_height, image_width, static_batch, static_shape):
359 latent_height, latent_width = self.check_dims(batch_size, image_height, image_width)
360 min_batch, max_batch, _, _, _, _, min_latent_height, max_latent_height, min_latent_width, max_latent_width = \
361 self.get_minmax_dims(batch_size, image_height, image_width, static_batch, static_shape)
362 return {
363 'latent': [(min_batch, 4, min_latent_height, min_latent_width), (batch_size, 4, latent_height, latent_width), (max_batch, 4, max_latent_height, max_latent_width)]
364 }
365
366 def get_shape_dict(self, batch_size, image_height, image_width):
367 latent_height, latent_width = self.check_dims(batch_size, image_height, image_width)

Callers 1

loadEnginesMethod · 0.45

Calls 2

check_dimsMethod · 0.80
get_minmax_dimsMethod · 0.80

Tested by

no test coverage detected