viba98 commited on
Commit
ae740d2
·
1 Parent(s): 4a8b43e

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -13,9 +13,9 @@ if device.type != 'cuda':
13
  raise ValueError("need to run on GPU")
14
 
15
  class EndpointHandler():
16
- def __init__(self):
17
  # load the optimized model
18
- self.pipe = StableDiffusionPipeline.from_pretrained("viba98/materialic", torch_dtype=torch.float16)
19
  self.pipe = self.pipe.to(device)
20
 
21
 
 
13
  raise ValueError("need to run on GPU")
14
 
15
  class EndpointHandler():
16
+ def __init__(self, path="viba98/materialic"):
17
  # load the optimized model
18
+ self.pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16)
19
  self.pipe = self.pipe.to(device)
20
 
21