diff --git a/ui/sd_internal/task_manager.py b/ui/sd_internal/task_manager.py index 434394cf..a8c5a4b2 100644 --- a/ui/sd_internal/task_manager.py +++ b/ui/sd_internal/task_manager.py @@ -372,6 +372,8 @@ def thread_render(device): session_cache.keep(task.request.session_id, TASK_TTL) except Exception as e: task.error = e + task.response = {"status": 'failed', "detail": str(task.error)} + task.buffer_queue.put(json.dumps(task.response)) print(traceback.format_exc()) continue finally: