From 8a73df4fe1e06d91fdbb536d79ab8966dbac5b26 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:28:07 +1000 Subject: [PATCH] fix(ui): progress image does not hide on viewer with autoswitch disabled --- .../features/gallery/components/ImageViewer/context.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageViewer/context.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageViewer/context.tsx index 9cc723f7e8..7a497c5280 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageViewer/context.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageViewer/context.tsx @@ -78,7 +78,12 @@ export const ImageViewerContextProvider = memo((props: PropsWithChildren) => { // create the illusion of the progress image "resolving" into the final image. If we cleared the progress image // now, there would be a flicker where the progress image disappears before the final image appears, and the // last-selected gallery image should be shown for a brief moment. - if (data.status === 'canceled' || data.status === 'failed') { + // + // When gallery auto-switch is disabled, we do not need to create this illusion, because we are not going to + // switch to the final image automatically. In this case, we clear the progress image immediately. + // + // We also clear the progress image if the queue item is canceled or failed, as there is no final image to show. + if (data.status === 'canceled' || data.status === 'failed' || !autoSwitch) { $progressEvent.set(null); $progressImage.set(null); }