fix: model_name reference in Model Manager

This commit is contained in:
blessedcoolant 2023-07-14 03:36:11 +12:00
parent d46261a528
commit 50f10ce5d7
3 changed files with 11 additions and 9 deletions

View File

@ -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) {
<Flex justifyContent="space-between" alignItems="center">
<Flex flexDirection="column">
<Text fontSize="lg" fontWeight="bold">
{retrievedModel.name}
{retrievedModel.model_name}
</Text>
<Text fontSize="sm" color="base.400">
{MODEL_TYPE_MAP[retrievedModel.base_model]} Model

View File

@ -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) {
<Flex flexDirection="column" rowGap={4} width="100%">
<Flex flexDirection="column">
<Text fontSize="lg" fontWeight="bold">
{retrievedModel.name}
{retrievedModel.model_name}
</Text>
<Text fontSize="sm" color="base.400">
{MODEL_TYPE_MAP[retrievedModel.base_model]} Model

View File

@ -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(
<ModelListItem
key={i}
modelKey={model}
name={modelList[model].name}
name={modelList[model]?.model_name}
description={modelList[model].description}
/>
);
@ -89,7 +91,7 @@ const ModelList = () => {
<ModelListItem
key={i}
modelKey={model}
name={modelList[model].name}
name={modelList[model]?.model_name}
description={modelList[model].description}
/>
);
@ -100,7 +102,7 @@ const ModelList = () => {
<ModelListItem
key={i}
modelKey={model}
name={modelList[model].name}
name={modelList[model]?.model_name}
description={modelList[model].description}
/>
);
@ -109,7 +111,7 @@ const ModelList = () => {
<ModelListItem
key={i}
modelKey={model}
name={modelList[model].name}
name={modelList[model]?.model_name}
description={modelList[model].description}
/>
);