mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-12 09:18:51 +01:00
Better errors when the server fails
This commit is contained in:
parent
310abcd8b9
commit
f98225cdb6
@ -189,8 +189,14 @@ def mk_img(req: Request):
|
|||||||
try:
|
try:
|
||||||
yield from do_mk_img(req)
|
yield from do_mk_img(req)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(traceback.format_exc())
|
||||||
|
|
||||||
gc()
|
gc()
|
||||||
raise e
|
|
||||||
|
yield json.dumps({
|
||||||
|
"status": 'failed',
|
||||||
|
"detail": str(e)
|
||||||
|
})
|
||||||
|
|
||||||
def do_mk_img(req: Request):
|
def do_mk_img(req: Request):
|
||||||
global model, modelCS, modelFS, device
|
global model, modelCS, modelFS, device
|
||||||
|
Loading…
Reference in New Issue
Block a user