Commit
•
3424746
1
Parent(s):
f806422
what
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -15,6 +15,7 @@ model_id = "stabilityai/stable-diffusion-2-1-base"
|
|
15 |
|
16 |
class EndpointHandler():
|
17 |
def __init__(self, path=""):
|
|
|
18 |
# load the optimized model
|
19 |
self.textPipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
20 |
self.textPipe.scheduler = DDIMScheduler.from_config(self.textPipe.scheduler.config)
|
@@ -36,7 +37,6 @@ class EndpointHandler():
|
|
36 |
image_data = data.pop("inputs", data).decode('base64')
|
37 |
init_image = Image.open(image_data).convert("RGB")
|
38 |
init_image.thumbnail((512, 512))
|
39 |
-
raise NotImplementedError()
|
40 |
|
41 |
params = data.pop("parameters", data)
|
42 |
|
|
|
15 |
|
16 |
class EndpointHandler():
|
17 |
def __init__(self, path=""):
|
18 |
+
raise NotImplementedError();
|
19 |
# load the optimized model
|
20 |
self.textPipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
21 |
self.textPipe.scheduler = DDIMScheduler.from_config(self.textPipe.scheduler.config)
|
|
|
37 |
image_data = data.pop("inputs", data).decode('base64')
|
38 |
init_image = Image.open(image_data).convert("RGB")
|
39 |
init_image.thumbnail((512, 512))
|
|
|
40 |
|
41 |
params = data.pop("parameters", data)
|
42 |
|