fix: import model

This commit is contained in:
Timothy J. Baek 2024-06-08 19:21:37 -07:00
parent e274a0dc3e
commit 5342063e24
2 changed files with 6 additions and 2 deletions

View File

@ -265,7 +265,7 @@
</div> </div>
{/if} {/if}
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<div class="flex items-center"> <div class="flex items-center min-w-fit">
<div class="line-clamp-1"> <div class="line-clamp-1">
{item.label} {item.label}
</div> </div>

View File

@ -127,12 +127,16 @@
if (model.info.base_model_id) { if (model.info.base_model_id) {
const base_model = $models const base_model = $models
.filter((m) => !m?.preset) .filter((m) => !m?.preset)
.find((m) => m.id === model.info.base_model_id); .find((m) =>
[model.info.base_model_id, `${model.info.base_model_id}:latest`].includes(m.id)
);
console.log('base_model', base_model); console.log('base_model', base_model);
if (!base_model) { if (!base_model) {
model.info.base_model_id = null; model.info.base_model_id = null;
} else if ($models.find((m) => m.id === `${model.info.base_model_id}:latest`)) {
model.info.base_model_id = `${model.info.base_model_id}:latest`;
} }
} }