From 50f10ce5d75b4efe9427df1fa9ce26071bfdcf73 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 14 Jul 2023 03:36:11 +1200 Subject: [PATCH] fix: model_name reference in Model Manager --- .../ModelManagerPanel/CheckpointModelEdit.tsx | 4 ++-- .../ModelManagerPanel/DiffusersModelEdit.tsx | 4 ++-- .../subpanels/ModelManagerPanel/ModelList.tsx | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/CheckpointModelEdit.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/CheckpointModelEdit.tsx index 0d5d21175a..586be4566e 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/CheckpointModelEdit.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/CheckpointModelEdit.tsx @@ -46,7 +46,7 @@ export default function CheckpointModelEdit(props: CheckpointModelEditProps) { const checkpointEditForm = useForm({ initialValues: { - name: retrievedModel.name, + name: retrievedModel.model_name, base_model: retrievedModel.base_model, type: 'main', path: retrievedModel.path, @@ -67,7 +67,7 @@ export default function CheckpointModelEdit(props: CheckpointModelEditProps) { - {retrievedModel.name} + {retrievedModel.model_name} {MODEL_TYPE_MAP[retrievedModel.base_model]} Model diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/DiffusersModelEdit.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/DiffusersModelEdit.tsx index 6a7b4b3140..f0ed12d361 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/DiffusersModelEdit.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/DiffusersModelEdit.tsx @@ -44,7 +44,7 @@ export default function DiffusersModelEdit(props: DiffusersModelEditProps) { const diffusersEditForm = useForm({ initialValues: { - name: retrievedModel.name, + name: retrievedModel.model_name, base_model: retrievedModel.base_model, type: 'main', path: retrievedModel.path, @@ -63,7 +63,7 @@ export default function DiffusersModelEdit(props: DiffusersModelEditProps) { - {retrievedModel.name} + {retrievedModel.model_name} {MODEL_TYPE_MAP[retrievedModel.base_model]} Model diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/ModelList.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/ModelList.tsx index eb05e70357..c78e2cc6f4 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/ModelList.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/ModelList.tsx @@ -74,13 +74,15 @@ const ModelList = () => { Object.keys(modelList).forEach((model, i) => { if ( - modelList[model].name.toLowerCase().includes(searchText.toLowerCase()) + modelList[model]?.model_name + .toLowerCase() + .includes(searchText.toLowerCase()) ) { filteredModelListItemsToRender.push( ); @@ -89,7 +91,7 @@ const ModelList = () => { ); @@ -100,7 +102,7 @@ const ModelList = () => { ); @@ -109,7 +111,7 @@ const ModelList = () => { );