diff --git a/invokeai/frontend/web/src/services/api/run-graph.ts b/invokeai/frontend/web/src/services/api/run-graph.ts index b369a45420..206027bd93 100644 --- a/invokeai/frontend/web/src/services/api/run-graph.ts +++ b/invokeai/frontend/web/src/services/api/run-graph.ts @@ -159,7 +159,11 @@ export const runGraph = (arg: RunGraphArg): Promise => { const cleanupFunctions: Set<() => void> = new Set(); const cleanup = () => { for (const func of cleanupFunctions) { - func(); + try { + func(); + } catch (error) { + log.warn({ error: parseify(error) }, 'Error during cleanup'); + } } };