Update handler.py
Browse files- 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(
|
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 |
|