mirror of
https://github.com/vladmandic/automatic
synced 2026-09-17 08:19:11 +02:00
extra error handling during image save
This commit is contained in:
@@ -45,6 +45,7 @@ function checkPaused(state) {
|
||||
}
|
||||
|
||||
function setProgress(res) {
|
||||
console.log(res);
|
||||
elements = ['txt2img_generate', 'img2img_generate', 'extras_generate']
|
||||
const progress = (res?.progress || 0)
|
||||
const perc = res && (progress > 0) ? `${Math.round(100.0 * progress)}%` : ''
|
||||
@@ -70,6 +71,10 @@ function setProgress(res) {
|
||||
}
|
||||
}
|
||||
|
||||
function requestInterrupt() {
|
||||
setProgress();
|
||||
}
|
||||
|
||||
function randomId() {
|
||||
return `task(${Math.random().toString(36).slice(2, 7)}${Math.random().toString(36).slice(2, 7)}${Math.random().toString(36).slice(2, 7)})`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user