From ca996228c332434c4da848f8a1bfb60c02435756 Mon Sep 17 00:00:00 2001 From: AyaanShah2204 Date: Fri, 23 Jun 2023 15:33:24 -0700 Subject: [PATCH] final fixes --- apps/stable_diffusion/web/index.py | 5 ++--- apps/stable_diffusion/web/ui/txt2img_ui.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/stable_diffusion/web/index.py b/apps/stable_diffusion/web/index.py index a0cbd59a62..004a052e5f 100644 --- a/apps/stable_diffusion/web/index.py +++ b/apps/stable_diffusion/web/index.py @@ -44,6 +44,7 @@ def launch_app(address): img2img_api, upscaler_api, inpaint_api, + outpaint_api, ) from fastapi import FastAPI, APIRouter import uvicorn @@ -55,9 +56,7 @@ def launch_app(address): app.add_api_route("/sdapi/v1/txt2img", txt2img_api, methods=["post"]) app.add_api_route("/sdapi/v1/img2img", img2img_api, methods=["post"]) app.add_api_route("/sdapi/v1/inpaint", inpaint_api, methods=["post"]) - # app.add_api_route( - # "/sdapi/v1/outpaint", outpaint_api, methods=["post"] - # ) + app.add_api_route("/sdapi/v1/outpaint", outpaint_api, methods=["post"]) app.add_api_route("/sdapi/v1/upscaler", upscaler_api, methods=["post"]) app.include_router(APIRouter()) uvicorn.run(app, host="127.0.0.1", port=args.server_port) diff --git a/apps/stable_diffusion/web/ui/txt2img_ui.py b/apps/stable_diffusion/web/ui/txt2img_ui.py index e1f49f6b1f..6e9ff38860 100644 --- a/apps/stable_diffusion/web/ui/txt2img_ui.py +++ b/apps/stable_diffusion/web/ui/txt2img_ui.py @@ -268,7 +268,7 @@ def txt2img_api( # Convert Generator to Subscriptable res = next(res) - + return { "images": encode_pil_to_base64(res[0]), "parameters": {},