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

Method get_input_profile

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

Source from the content-addressed store, hash-verified

416 }
417
418 def get_input_profile(self, batch_size, image_height, image_width, static_batch, static_shape):
419 assert batch_size >= self.min_batch and batch_size <= self.max_batch
420 min_batch = batch_size if static_batch else self.min_batch
421 max_batch = batch_size if static_batch else self.max_batch
422 self.check_dims(batch_size, image_height, image_width)
423 min_batch, max_batch, min_image_height, max_image_height, min_image_width, max_image_width, _, _, _, _ = \
424 self.get_minmax_dims(batch_size, image_height, image_width, static_batch, static_shape)
425
426 return {
427 'images': [(min_batch, 3, min_image_height, min_image_width), (batch_size, 3, image_height, image_width), (max_batch, 3, max_image_height, max_image_width)],
428 }
429
430 def get_shape_dict(self, batch_size, image_height, image_width):
431 latent_height, latent_width = self.check_dims(batch_size, image_height, image_width)

Callers

nothing calls this directly

Calls 2

check_dimsMethod · 0.80
get_minmax_dimsMethod · 0.80

Tested by

no test coverage detected