@@ -72,7 +72,6 @@ import { useWorkflowAutoSave } from '@/composables/useWorkflowAutoSave'
7272import { useWorkflowPersistence } from ' @/composables/useWorkflowPersistence'
7373import { CORE_SETTINGS } from ' @/constants/coreSettings'
7474import { i18n , t } from ' @/i18n'
75- import type { NodeId } from ' @/schemas/comfyWorkflowSchema'
7675import { UnauthorizedError , api } from ' @/scripts/api'
7776import { app as comfyApp } from ' @/scripts/app'
7877import { ChangeTracker } from ' @/scripts/changeTracker'
@@ -192,22 +191,26 @@ watch(
192191 }
193192)
194193
195- // Update the progress of the executing node
194+ // Update the progress of executing nodes
196195watch (
197196 () =>
198- [
199- executionStore . executingNodeId ,
200- executionStore . executingNodeProgress
201- ] satisfies [ NodeId | null , number | null ],
202- ([ executingNodeId , executingNodeProgress ]) => {
203- for ( const node of comfyApp . graph . nodes ) {
204- if (node . id == executingNodeId ) {
205- node .progress = executingNodeProgress ?? undefined
197+ [executionStore . nodeLocationProgressStates , canvasStore . canvas ] as const ,
198+ ([ nodeLocationProgressStates , canvas ]) => {
199+ if ( ! canvas ?. graph ) return
200+ for ( const node of canvas . graph . nodes ) {
201+ const nodeLocatorId = useWorkflowStore (). nodeIdToNodeLocatorId ( node . id )
202+ const progressState = nodeLocationProgressStates [ nodeLocatorId ]
203+ if (progressState && progressState . state === ' running ' ) {
204+ node .progress = progressState . value / progressState . max
206205 } else {
207206 node .progress = undefined
208207 }
209208 }
210- }
209+
210+ // Force canvas redraw to ensure progress updates are visible
211+ canvas .graph .setDirtyCanvas (true , false )
212+ },
213+ { deep: true }
211214)
212215
213216// Update node slot errors
0 commit comments