diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelListHeader.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelListHeader.tsx deleted file mode 100644 index 874d1c9ac2..0000000000 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelListHeader.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Box, Divider, Text } from '@invoke-ai/ui-library'; - -export const ModelListHeader = ({ title }: { title: string }) => { - return ( - - - - - {title} - - - - ); -}; diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Metadata/ModelMetadata.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Metadata/ModelMetadata.tsx deleted file mode 100644 index 5f94ac4d0a..0000000000 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Metadata/ModelMetadata.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { Box, Flex } from '@invoke-ai/ui-library'; -import { skipToken } from '@reduxjs/toolkit/query'; -import { useAppSelector } from 'app/store/storeHooks'; -import DataViewer from 'features/gallery/components/ImageMetadataViewer/DataViewer'; -import { useMemo } from 'react'; -import { useGetModelConfigQuery } from 'services/api/endpoints/models'; -import type { ModelType } from 'services/api/types'; - -import { TriggerPhrases } from './TriggerPhrases'; - -const MODEL_TYPE_TRIGGER_PHRASE: ModelType[] = ['main', 'lora']; - -export const ModelMetadata = () => { - const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey); - const { data } = useGetModelConfigQuery(selectedModelKey ?? skipToken); - - const shouldShowTriggerPhraseSettings = useMemo(() => { - if (!data?.type) { - return false; - } - return MODEL_TYPE_TRIGGER_PHRASE.includes(data.type); - }, [data]); - - const apiResponseFormatted = useMemo(() => { - if (!data?.source_api_response) { - return {}; - } - return JSON.parse(data.source_api_response); - }, [data?.source_api_response]); - - return ( - - {shouldShowTriggerPhraseSettings && ( - - - - )} - - - ); -}; diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/ModelView.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/ModelView.tsx index a7d2e61f7b..a167823596 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/ModelView.tsx +++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/ModelView.tsx @@ -1,7 +1,7 @@ import { Box, Flex, Text } from '@invoke-ai/ui-library'; import { skipToken } from '@reduxjs/toolkit/query'; import { useAppSelector } from 'app/store/storeHooks'; -import { TriggerPhrases } from 'features/modelManagerV2/subpanels/ModelPanel/Metadata/TriggerPhrases'; +import { TriggerPhrases } from 'features/modelManagerV2/subpanels/ModelPanel/TriggerPhrases'; import { useTranslation } from 'react-i18next'; import { useGetModelConfigQuery } from 'services/api/endpoints/models'; diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Metadata/TriggerPhrases.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/TriggerPhrases.tsx similarity index 100% rename from invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Metadata/TriggerPhrases.tsx rename to invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/TriggerPhrases.tsx diff --git a/invokeai/frontend/web/src/services/api/endpoints/models.ts b/invokeai/frontend/web/src/services/api/endpoints/models.ts index 18feddbbd7..9d7cc03a5e 100644 --- a/invokeai/frontend/web/src/services/api/endpoints/models.ts +++ b/invokeai/frontend/web/src/services/api/endpoints/models.ts @@ -30,7 +30,7 @@ export type UpdateModelArg = { body: paths['/api/v2/models/i/{key}']['patch']['requestBody']['content']['application/json']; }; -export type UpdateModelImageArg = { +type UpdateModelImageArg = { key: string; image: Blob; }; diff --git a/invokeai/frontend/web/src/services/api/types.ts b/invokeai/frontend/web/src/services/api/types.ts index 71cf0d63eb..7a870a321f 100644 --- a/invokeai/frontend/web/src/services/api/types.ts +++ b/invokeai/frontend/web/src/services/api/types.ts @@ -49,8 +49,8 @@ export type ControlNetModelConfig = S['ControlNetDiffusersConfig'] | S['ControlN export type IPAdapterModelConfig = S['IPAdapterConfig']; export type T2IAdapterModelConfig = S['T2IAdapterConfig']; export type TextualInversionModelConfig = S['TextualInversionFileConfig'] | S['TextualInversionFolderConfig']; -export type DiffusersModelConfig = S['MainDiffusersConfig']; -export type CheckpointModelConfig = S['MainCheckpointConfig']; +type DiffusersModelConfig = S['MainDiffusersConfig']; +type CheckpointModelConfig = S['MainCheckpointConfig']; type CLIPVisionDiffusersConfig = S['CLIPVisionDiffusersConfig']; export type MainModelConfig = DiffusersModelConfig | CheckpointModelConfig; export type AnyModelConfig =