diff --git a/ui/sd_internal/runtime.py b/ui/sd_internal/runtime.py index ed6e7c80..7d875559 100644 --- a/ui/sd_internal/runtime.py +++ b/ui/sd_internal/runtime.py @@ -189,8 +189,14 @@ def mk_img(req: Request): try: yield from do_mk_img(req) except Exception as e: + print(traceback.format_exc()) + gc() - raise e + + yield json.dumps({ + "status": 'failed', + "detail": str(e) + }) def do_mk_img(req: Request): global model, modelCS, modelFS, device