Commit
·
176dbf2
1
Parent(s):
faac81b
Update handler.py
Browse files- handler.py +2 -3
handler.py
CHANGED
|
@@ -27,12 +27,11 @@ class EndpointHandler():
|
|
| 27 |
Return:
|
| 28 |
A :obj:`dict`:. base64 encoded image
|
| 29 |
"""
|
| 30 |
-
|
| 31 |
-
negative_prompt = data.pop("negative_prompt", data)
|
| 32 |
|
| 33 |
# run inference pipeline
|
| 34 |
with autocast(device.type):
|
| 35 |
-
images = self.pipe(
|
| 36 |
# encode image as base 64
|
| 37 |
buffered = BytesIO()
|
| 38 |
base64_images = [];
|
|
|
|
| 27 |
Return:
|
| 28 |
A :obj:`dict`:. base64 encoded image
|
| 29 |
"""
|
| 30 |
+
inputs = data.pop("inputs", data)
|
|
|
|
| 31 |
|
| 32 |
# run inference pipeline
|
| 33 |
with autocast(device.type):
|
| 34 |
+
images = self.pipe(inputs, guidance_scale=7.5).images
|
| 35 |
# encode image as base 64
|
| 36 |
buffered = BytesIO()
|
| 37 |
base64_images = [];
|