asoderznik
commited on
Commit
•
d4c5cc1
1
Parent(s):
e4c9997
Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -23,9 +23,9 @@ class EndpointHandler():
|
|
23 |
def __init__(self, path=""):
|
24 |
self.path = path
|
25 |
# load the optimized model
|
26 |
-
model_id = "stabilityai/stable-diffusion-x4-upscaler"
|
27 |
-
|
28 |
-
|
29 |
|
30 |
|
31 |
def __call__(self, data) -> List[Dict[str, Any]]:
|
|
|
23 |
def __init__(self, path=""):
|
24 |
self.path = path
|
25 |
# load the optimized model
|
26 |
+
#model_id = "stabilityai/stable-diffusion-x4-upscaler"
|
27 |
+
self.pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16)
|
28 |
+
self.pipe = self.pipe.to(device)
|
29 |
|
30 |
|
31 |
def __call__(self, data) -> List[Dict[str, Any]]:
|