From 055f5b2d4b6f03705be993da88bc3e16996906d5 Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Wed, 19 Jul 2023 11:02:33 -0400 Subject: [PATCH] clear canvas alongside intermediates --- .../components/SettingsModal/SettingsClearIntermediates.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx index 86b5753cd4..d75eb4d4c2 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsClearIntermediates.tsx @@ -5,6 +5,7 @@ import { Heading, Text } from '@chakra-ui/react'; import IAIButton from '../../../../common/components/IAIButton'; import { useClearIntermediatesMutation } from '../../../../services/api/endpoints/images'; import { addToast } from '../../store/systemSlice'; +import { resetCanvas } from '../../../canvas/store/canvasSlice'; export default function SettingsClearIntermediates() { const dispatch = useAppDispatch(); @@ -17,6 +18,7 @@ export default function SettingsClearIntermediates() { clearIntermediates({}) .unwrap() .then((response) => { + dispatch(resetCanvas()); dispatch( addToast({ title: @@ -47,6 +49,7 @@ export default function SettingsClearIntermediates() { Will permanently delete first 100 intermediates found on disk and in database + This will also clear your canvas state. Intermediate images are byproducts of generation, different from the result images in the gallery. Purging intermediates will free disk