From e274a0dc3e190c3e8d72ae2b8cb260b6174142ba Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 8 Jun 2024 17:21:23 -0700 Subject: [PATCH] fix: base model verification --- .../(app)/workspace/models/create/+page.svelte | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/routes/(app)/workspace/models/create/+page.svelte b/src/routes/(app)/workspace/models/create/+page.svelte index 86b65f708..532b31dd7 100644 --- a/src/routes/(app)/workspace/models/create/+page.svelte +++ b/src/routes/(app)/workspace/models/create/+page.svelte @@ -124,6 +124,18 @@ id = model.id; + if (model.info.base_model_id) { + const base_model = $models + .filter((m) => !m?.preset) + .find((m) => m.id === model.info.base_model_id); + + console.log('base_model', base_model); + + if (!base_model) { + model.info.base_model_id = null; + } + } + params = { ...params, ...model?.info?.params }; params.stop = params?.stop ? (params?.stop ?? []).join(',') : null; @@ -133,6 +145,8 @@ ...info, ...model.info }; + + console.log(info); }; onMount(async () => {