From ffe7d5785b2693b97ead0f891f9fc8d300454961 Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Thu, 20 Jul 2023 09:33:21 -0400 Subject: [PATCH] if updating intermediate, dont add to gallery list cache --- invokeai/frontend/web/src/services/api/endpoints/images.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/services/api/endpoints/images.ts b/invokeai/frontend/web/src/services/api/endpoints/images.ts index 52f410e315..dc17b28798 100644 --- a/invokeai/frontend/web/src/services/api/endpoints/images.ts +++ b/invokeai/frontend/web/src/services/api/endpoints/images.ts @@ -258,7 +258,12 @@ export const imagesApi = api.injectEndpoints({ */ const patches: PatchCollection[] = []; - const { image_name, board_id, image_category } = oldImageDTO; + const { image_name, board_id, image_category, is_intermediate } = oldImageDTO; + + const isChangingFromIntermediate = changes.is_intermediate === false; + // do not add intermediates to gallery cache + if (is_intermediate && !isChangingFromIntermediate) return; + const categories = IMAGE_CATEGORIES.includes(image_category) ? IMAGE_CATEGORIES : ASSETS_CATEGORIES;