Skip to content

Commit 10fd3e6

Browse files
psychedelicioushipsterusername
authored andcommitted
fix(ui): blank viewer when no progress image in last progress event
1 parent d65dd32 commit 10fd3e6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImagePreview.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ import type { AnimationProps } from 'framer-motion';
1212
import { AnimatePresence, motion } from 'framer-motion';
1313
import { memo, useCallback, useMemo, useRef, useState } from 'react';
1414
import { useGetImageDTOQuery } from 'services/api/endpoints/images';
15-
import { $hasProgress, $isProgressFromCanvas } from 'services/events/stores';
15+
import { $hasProgressImage, $isProgressFromCanvas } from 'services/events/stores';
1616

1717
import { NoContentForViewer } from './NoContentForViewer';
1818
import ProgressImage from './ProgressImage';
1919

2020
const CurrentImagePreview = () => {
2121
const shouldShowImageDetails = useAppSelector(selectShouldShowImageDetails);
2222
const imageName = useAppSelector(selectLastSelectedImageName);
23-
const hasDenoiseProgress = useStore($hasProgress);
23+
const hasProgressImage = useStore($hasProgressImage);
2424
const isProgressFromCanvas = useStore($isProgressFromCanvas);
2525
const shouldShowProgressInViewer = useAppSelector(selectShouldShowProgressInViewer);
2626

@@ -59,7 +59,7 @@ const CurrentImagePreview = () => {
5959
justifyContent="center"
6060
position="relative"
6161
>
62-
{hasDenoiseProgress && !isProgressFromCanvas && shouldShowProgressInViewer ? (
62+
{hasProgressImage && !isProgressFromCanvas && shouldShowProgressInViewer ? (
6363
<ProgressImage />
6464
) : (
6565
<IAIDndImage

invokeai/frontend/web/src/services/events/stores.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export const $isConnected = atom<boolean>(false);
99
export const $lastProgressEvent = atom<S['InvocationProgressEvent'] | null>(null);
1010
export const $hasProgress = computed($lastProgressEvent, (val) => Boolean(val));
1111
export const $progressImage = computed($lastProgressEvent, (val) => val?.image ?? null);
12+
export const $hasProgressImage = computed($lastProgressEvent, (val) => Boolean(val?.image));
1213
export const $isProgressFromCanvas = computed($lastProgressEvent, (val) => val?.destination === 'canvas');

0 commit comments

Comments
 (0)