forked from pinks/eris
1
0
Fork 0

fix: sd gen request crash

This commit is contained in:
pinks 2023-09-26 11:52:11 +02:00
parent 7ebdf6eae4
commit 70a9b1180d
1 changed files with 4 additions and 0 deletions

View File

@ -199,6 +199,10 @@ async function processGenerationJob(
throw new Error(`Unknown task type: ${state.task.type}`); throw new Error(`Unknown task type: ${state.task.type}`);
} }
// we await the promise only after it finishes
// so we need to add catch callback to not crash the process before that
responsePromise.catch(() => undefined);
// poll for progress while the generation request is pending // poll for progress while the generation request is pending
do { do {
const progressResponse = await workerSdClient.GET("/sdapi/v1/progress", { const progressResponse = await workerSdClient.GET("/sdapi/v1/progress", {