diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 4816e0162b..0ccb332978 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1106,7 +1106,8 @@ }, "toast": { "addedToBoard": "Added to board", - "baseModelChangedCleared": "Base model changed, cleared", + "baseModelChangedCleared_one": "Base model changed, cleared or disabled {{number}} incompatible submodel", + "baseModelChangedCleared_many": "$t(toast.baseModelChangedCleared_one)s", "canceled": "Processing Canceled", "canvasCopiedClipboard": "Canvas Copied to Clipboard", "canvasDownloaded": "Canvas Downloaded", @@ -1126,7 +1127,6 @@ "imageSavingFailed": "Image Saving Failed", "imageUploaded": "Image Uploaded", "imageUploadFailed": "Image Upload Failed", - "incompatibleSubmodel": "incompatible submodel", "initialImageNotSet": "Initial Image Not Set", "initialImageNotSetDesc": "Could not load initial image", "initialImageSet": "Initial Image Set", diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.ts index 473d0454ae..c320c437f6 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.ts @@ -1,7 +1,7 @@ import { logger } from 'app/logging/logger'; import { setBoundingBoxDimensions } from 'features/canvas/store/canvasSlice'; import { - controlAdapterModelCleared, + controlAdapterIsEnabledChanged, selectControlAdapterAll, } from 'features/controlAdapters/store/controlAdaptersSlice'; import { loraRemoved } from 'features/lora/store/loraSlice'; @@ -62,7 +62,9 @@ export const addModelSelectedListener = () => { // handle incompatible controlnets selectControlAdapterAll(state.controlAdapters).forEach((ca) => { if (ca.model?.base_model !== base_model) { - dispatch(controlAdapterModelCleared({ id: ca.id })); + dispatch( + controlAdapterIsEnabledChanged({ id: ca.id, isEnabled: false }) + ); modelsCleared += 1; } }); @@ -71,11 +73,14 @@ export const addModelSelectedListener = () => { dispatch( addToast( makeToast({ - title: `${t( - 'toast.baseModelChangedCleared' - )} ${modelsCleared} ${t('toast.incompatibleSubmodel')}${ - modelsCleared === 1 ? '' : 's' - }`, + title: t( + modelsCleared === 1 + ? 'toast.baseModelChangedCleared_one' + : 'toast.baseModelChangedCleared_many', + { + number: modelsCleared, + } + ), status: 'warning', }) )