fix: sd gen request crash
This commit is contained in:
parent
7ebdf6eae4
commit
70a9b1180d
|
@ -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", {
|
||||||
|
|
Loading…
Reference in New Issue