Devticks commited on
Commit
c4a7be5
·
verified ·
1 Parent(s): bb6bed5

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -0
handler.py CHANGED
@@ -11,6 +11,7 @@ class EndpointHandler():
11
  def __init__(self, path=""):
12
  model_id = "timbrooks/instruct-pix2pix"
13
  self.pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, safety_checker=None)
 
14
  self.pipe.to(device)
15
  self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
16
 
 
11
  def __init__(self, path=""):
12
  model_id = "timbrooks/instruct-pix2pix"
13
  self.pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, safety_checker=None)
14
+ pipe.to("cuda")
15
  self.pipe.to(device)
16
  self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
17