MCPcopy Index your code
hub / github.com/NVIDIA/Stable-Diffusion-WebUI-TensorRT / process_batch

Method process_batch

scripts/trt.py:297–304  ·  view source on GitHub ↗
(self, p, *args, **kwargs)

Source from the content-addressed store, hash-verified

295 sd_unet.current_unet.activate()
296
297 def process_batch(self, p, *args, **kwargs):
298 # Called for each batch count
299 if self.torch_unet:
300 return super().process_batch(p, *args, **kwargs)
301
302 if sd_unet.current_unet is not None and self.idx != sd_unet.current_unet.profile_idx:
303 sd_unet.current_unet.profile_idx = self.idx
304 sd_unet.current_unet.switch_engine()
305
306 def before_hr(self, p, *args):
307 if self.idx != self.hr_idx:

Callers

nothing calls this directly

Calls 1

switch_engineMethod · 0.80

Tested by

no test coverage detected