extra error handling during image save

This commit is contained in:
Vladimir Mandic
2023-06-03 09:04:58 -04:00
parent 299f1229d4
commit c7051cc1dd
13 changed files with 46 additions and 18 deletions
+5
View File
@@ -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)})`;
}