jbilcke-hf HF staff commited on
Commit
e996891
·
verified ·
1 Parent(s): ce3b7e3

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -2
handler.py CHANGED
@@ -455,11 +455,13 @@ class EndpointHandler:
455
  config.input_image_quality,
456
  )
457
  generation_kwargs["image"] = processed_image
458
- apply_enhance_a_video(self.image_to_video.transformer, enhance_a_video_config)
 
459
  frames = self.image_to_video(**generation_kwargs).frames
460
  else:
461
  self._configure_teacache(self.text_to_video, config)
462
- apply_enhance_a_video(self.text_to_video.transformer, enhance_a_video_config)
 
463
  frames = self.text_to_video(**generation_kwargs).frames
464
 
465
  try:
 
455
  config.input_image_quality,
456
  )
457
  generation_kwargs["image"] = processed_image
458
+ # disabled (we cannot install the hook multiple times, we would have to uninstall it first or find another way to dynamically enable it, eg. using the weight only)
459
+ # apply_enhance_a_video(self.image_to_video.transformer, enhance_a_video_config)
460
  frames = self.image_to_video(**generation_kwargs).frames
461
  else:
462
  self._configure_teacache(self.text_to_video, config)
463
+ # disabled (we cannot install the hook multiple times, we would have to uninstall it first or find another way to dynamically enable it, eg. using the weight only)
464
+ # apply_enhance_a_video(self.text_to_video.transformer, enhance_a_video_config)
465
  frames = self.text_to_video(**generation_kwargs).frames
466
 
467
  try: