diff --git a/invokeai/frontend/public/locales/en.json b/invokeai/frontend/public/locales/en.json index c9a3f48c47..b074e35060 100644 --- a/invokeai/frontend/public/locales/en.json +++ b/invokeai/frontend/public/locales/en.json @@ -63,7 +63,8 @@ "statusConvertingModel": "Converting Model", "statusModelConverted": "Model Converted", "statusMergingModels": "Merging Models", - "statusMergedModels": "Models Merged" + "statusMergedModels": "Models Merged", + "pinOptionsPanel": "Pin Options Panel" }, "gallery": { "generations": "Generations", @@ -393,7 +394,9 @@ "modelMergeInterpAddDifferenceHelp": "In this mode, Model 3 is first subtracted from Model 2. The resulting version is blended with Model 1 with the alpha rate set above.", "inverseSigmoid": "Inverse Sigmoid", "sigmoid": "Sigmoid", - "weightedSum": "Weighted Sum" + "weightedSum": "Weighted Sum", + "none": "none", + "addDifference": "Add Difference" }, "parameters": { "general": "General", diff --git a/invokeai/frontend/src/features/system/components/ModelManager/MergeModels.tsx b/invokeai/frontend/src/features/system/components/ModelManager/MergeModels.tsx index 959896b8e0..8f1dc92f41 100644 --- a/invokeai/frontend/src/features/system/components/ModelManager/MergeModels.tsx +++ b/invokeai/frontend/src/features/system/components/ModelManager/MergeModels.tsx @@ -57,19 +57,19 @@ export default function MergeModels() { const [modelMergeForce, setModelMergeForce] = useState(false); - const modelOneList = Object.keys(diffusersModels).filter((model) => { - if (model !== modelTwo && model !== modelThree) return model; - }); + const modelOneList = Object.keys(diffusersModels).filter( + (model) => model !== modelTwo && model !== modelThree + ); - const modelTwoList = Object.keys(diffusersModels).filter((model) => { - if (model !== modelOne && model !== modelThree) return model; - }); + const modelTwoList = Object.keys(diffusersModels).filter( + (model) => model !== modelOne && model !== modelThree + ); const modelThreeList = [ - 'none', - ...Object.keys(diffusersModels).filter((model) => { - if (model !== modelOne && model !== modelTwo) return model; - }), + { key: t('modelManager.none'), value: 'none' }, + ...Object.keys(diffusersModels) + .filter((model) => model !== modelOne && model !== modelTwo) + .map((model) => ({ key: model, value: model })), ]; const isProcessing = useAppSelector( @@ -209,9 +209,13 @@ export default function MergeModels() { {modelThree === 'none' ? ( <> - weighted_sum - sigmoid - inv_sigmoid + + {t('modelManager.weightedSum')} + + {t('modelManager.sigmoid')} + + {t('modelManager.inverseSigmoid')} + ) : ( @@ -220,7 +224,7 @@ export default function MergeModels() { 'modelManager.modelMergeInterpAddDifferenceHelp' )} > - add_difference + {t('modelManager.addDifference')} )} diff --git a/invokeai/frontend/src/features/ui/components/InvokeParametersPanel.tsx b/invokeai/frontend/src/features/ui/components/InvokeParametersPanel.tsx index 8dcd4f4a78..c342e5c920 100644 --- a/invokeai/frontend/src/features/ui/components/InvokeParametersPanel.tsx +++ b/invokeai/frontend/src/features/ui/components/InvokeParametersPanel.tsx @@ -18,6 +18,7 @@ import { setParametersPanelScrollPosition } from 'features/ui/store/uiSlice'; import InvokeAILogo from 'assets/images/logo.png'; import { isEqual } from 'lodash'; import { uiSelector } from '../store/uiSelectors'; +import { useTranslation } from 'react-i18next'; type Props = { children: ReactNode }; @@ -60,6 +61,8 @@ const InvokeOptionsPanel = (props: Props) => { const { children } = props; + const { t } = useTranslation(); + // Hotkeys useHotkeys( 'o', @@ -176,7 +179,7 @@ const InvokeOptionsPanel = (props: Props) => { } }} > - +