jbilcke-hf HF Staff commited on
Commit
6efaa11
·
verified ·
1 Parent(s): 6bf2a6f

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -174,7 +174,7 @@ class EndpointHandler:
174
  # same type of inference operations multiple times.
175
  # For example, calling the compiled pipeline on a different image size
176
  # triggers compilation again which can be expensive.
177
- self.image_to_video.unet = torch.compile(self.image_to_video.unet, mode="reduce-overhead", fullgraph=True)
178
 
179
  else:
180
  print("EndpointHandler.__init__(): initializing LTXPipeline..")
@@ -193,7 +193,7 @@ class EndpointHandler:
193
  # same type of inference operations multiple times.
194
  # For example, calling the compiled pipeline on a different image size
195
  # triggers compilation again which can be expensive.
196
- self.text_to_video.unet = torch.compile(self.text_to_video.unet, mode="reduce-overhead", fullgraph=True)
197
 
198
 
199
  # Initialize LoRA tracking
 
174
  # same type of inference operations multiple times.
175
  # For example, calling the compiled pipeline on a different image size
176
  # triggers compilation again which can be expensive.
177
+ self.image_to_video = torch.compile(self.image_to_video, mode="reduce-overhead", fullgraph=True)
178
 
179
  else:
180
  print("EndpointHandler.__init__(): initializing LTXPipeline..")
 
193
  # same type of inference operations multiple times.
194
  # For example, calling the compiled pipeline on a different image size
195
  # triggers compilation again which can be expensive.
196
+ self.text_to_video = torch.compile(self.text_to_video, mode="reduce-overhead", fullgraph=True)
197
 
198
 
199
  # Initialize LoRA tracking