diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts index 680f9c7041..bef0a2ccdb 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts @@ -41,15 +41,6 @@ export const addInvocationCompleteEventListener = () => { if (isImageOutput(result) && !nodeDenylist.includes(node.type)) { const { image_name } = result.image; - if (boardIdToAddTo) { - dispatch( - api.endpoints.addImageToBoard.initiate({ - board_id: boardIdToAddTo, - image_name, - }) - ); - } - // Get its metadata dispatch( imageMetadataReceived({ @@ -69,6 +60,15 @@ export const addInvocationCompleteEventListener = () => { dispatch(addImageToStagingArea(imageDTO)); } + if (boardIdToAddTo && !imageDTO.is_intermediate) { + dispatch( + api.endpoints.addImageToBoard.initiate({ + board_id: boardIdToAddTo, + image_name, + }) + ); + } + dispatch(progressImageSet(null)); } // pass along the socket event as an application action