mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-23 23:49:11 +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:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user