Upload handler.py
Browse files- handler.py +4 -2
handler.py
CHANGED
@@ -15,9 +15,11 @@ if IS_COMPILE:
|
|
15 |
|
16 |
def compile_pipeline(pipe) -> Any:
|
17 |
pipe.transformer.to(memory_format=torch.channels_last)
|
18 |
-
pipe.transformer = torch.compile(pipe.transformer, mode="reduce-overhead", fullgraph=False, dynamic=False, backend="inductor")
|
|
|
19 |
pipe.vae.to(memory_format=torch.channels_last)
|
20 |
-
pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=False, dynamic=False, backend="inductor")
|
|
|
21 |
return pipe
|
22 |
|
23 |
class EndpointHandler:
|
|
|
15 |
|
16 |
def compile_pipeline(pipe) -> Any:
|
17 |
pipe.transformer.to(memory_format=torch.channels_last)
|
18 |
+
#pipe.transformer = torch.compile(pipe.transformer, mode="reduce-overhead", fullgraph=False, dynamic=False, backend="inductor")
|
19 |
+
pipe.transformer = torch.compile(pipe.transformer, mode="default", fullgraph=True, dynamic=False, backend="inductor")
|
20 |
pipe.vae.to(memory_format=torch.channels_last)
|
21 |
+
#pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=False, dynamic=False, backend="inductor")
|
22 |
+
pipe.vae = torch.compile(pipe.vae, mode="default", fullgraph=True, dynamic=False, backend="inductor")
|
23 |
return pipe
|
24 |
|
25 |
class EndpointHandler:
|