English
Inference Endpoints
John6666 commited on
Commit
085e7c1
·
verified ·
1 Parent(s): 6bc302d

Upload handler.py

Browse files
Files changed (1) hide show
  1. 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: