Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -32,7 +32,7 @@ class EndpointHandler():
|
|
| 32 |
|
| 33 |
|
| 34 |
self.pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(
|
| 35 |
-
"
|
| 36 |
)
|
| 37 |
|
| 38 |
self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
|
|
@@ -171,6 +171,8 @@ class EndpointHandler():
|
|
| 171 |
guidance_scale=guidance_scale,
|
| 172 |
strength=strength
|
| 173 |
).images[0]
|
|
|
|
|
|
|
| 174 |
|
| 175 |
|
| 176 |
# helper to decode input image
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
self.pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(
|
| 35 |
+
"diffusers/stable-diffusion-xl-1.0-inpainting-0.1", controlnet=self.controlnet, torch_dtype=torch.float16
|
| 36 |
)
|
| 37 |
|
| 38 |
self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
|
|
|
|
| 171 |
guidance_scale=guidance_scale,
|
| 172 |
strength=strength
|
| 173 |
).images[0]
|
| 174 |
+
|
| 175 |
+
return image
|
| 176 |
|
| 177 |
|
| 178 |
# helper to decode input image
|