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

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -16,10 +16,10 @@ if IS_COMPILE:
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:
 
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="max-autotune", fullgraph=True)
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="max-autotune", fullgraph=True)
23
  return pipe
24
 
25
  class EndpointHandler: