From 3ef2872dda5818d34062d0a4db989b2db4404640 Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Tue, 1 Jul 2025 16:31:18 -0400 Subject: [PATCH] handle flux-kontext models --- .../src/features/controlLayers/store/refImagesSlice.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/invokeai/frontend/web/src/features/controlLayers/store/refImagesSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/refImagesSlice.ts index f96aa9af69..059a0b26d4 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/refImagesSlice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/refImagesSlice.ts @@ -121,6 +121,16 @@ export const refImagesSlice = createSlice({ return; } + if (entity.config.model.base === 'flux-kontext') { + // Switching to flux-kontext ref image + entity.config = { + ...initialFluxKontextReferenceImage, + image: entity.config.image, + model: entity.config.model, + }; + return; + } + if (entity.config.model.type === 'flux_redux') { // Switching to flux_redux entity.config = {