Fixed favicon some progress frames not found - by ComfyWaifu 🤍 (#4143)

This commit is contained in:
comfy-waifu
2025-06-14 07:59:35 +03:00
committed by GitHub
parent 55bf36564d
commit 8274df5075
2 changed files with 5 additions and 2 deletions

View File

@@ -15,7 +15,10 @@ export const useProgressFavicon = () => {
if (isIdle) { if (isIdle) {
favicon.value = defaultFavicon favicon.value = defaultFavicon
} else { } else {
const frame = Math.floor(progress * totalFrames) const frame = Math.min(
Math.max(0, Math.floor(progress * totalFrames)),
totalFrames - 1
)
favicon.value = `/assets/images/favicon_progress_16x16/frame_${frame}.png` favicon.value = `/assets/images/favicon_progress_16x16/frame_${frame}.png`
} }
} }

View File

@@ -88,7 +88,7 @@ export const useExecutionStore = defineStore('execution', () => {
if (!activePrompt.value) return 0 if (!activePrompt.value) return 0
const total = totalNodesToExecute.value const total = totalNodesToExecute.value
const done = nodesExecuted.value const done = nodesExecuted.value
return done / total return total > 0 ? done / total : 0
}) })
function bindExecutionEvents() { function bindExecutionEvents() {