pwaldron commited on
Commit
ff6535b
·
verified ·
1 Parent(s): d93b03a

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -3
handler.py CHANGED
@@ -62,13 +62,12 @@ class EndpointHandler():
62
  use_safetensors=True,
63
  ).to("cuda")
64
 
65
- self.pidinet = PidiNetDetector.from_pretrained("lllyasviel/Annotators").to("cuda")
66
-
67
  self.pipeline.unet = torch.compile(self.pipeline.unet, mode="reduce-overhead", fullgraph=True)
68
  self.refiner.unet = torch.compile(self.refiner.unet, mode="reduce-overhead", fullgraph=True)
69
  self.pipeline.enable_model_cpu_offload()
70
  self.refiner.enable_model_cpu_offload()
71
- self.pidinet.enable_model_cpu_offload()
 
72
 
73
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
74
  """
 
62
  use_safetensors=True,
63
  ).to("cuda")
64
 
 
 
65
  self.pipeline.unet = torch.compile(self.pipeline.unet, mode="reduce-overhead", fullgraph=True)
66
  self.refiner.unet = torch.compile(self.refiner.unet, mode="reduce-overhead", fullgraph=True)
67
  self.pipeline.enable_model_cpu_offload()
68
  self.refiner.enable_model_cpu_offload()
69
+
70
+ self.pidinet = PidiNetDetector.from_pretrained("lllyasviel/Annotators").to("cuda")
71
 
72
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
73
  """