Update handler.py
Browse files- 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
|
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
|
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
|