diff --git a/src/components/dialog/content/MissingModelsWarning.vue b/src/components/dialog/content/MissingModelsWarning.vue index 7ca1f2b20a..1430a54f4b 100644 --- a/src/components/dialog/content/MissingModelsWarning.vue +++ b/src/components/dialog/content/MissingModelsWarning.vue @@ -49,6 +49,10 @@ const allowedSources = [ 'http://localhost:' // Included for testing usage only ] const allowedSuffixes = ['.safetensors', '.sft'] +// Models that fail above conditions but are still allowed +const whiteListedUrls = new Set([ + 'https://huggingface.co/stabilityai/stable-zero123/resolve/main/stable_zero123.ckpt' +]) interface ModelInfo { name: string @@ -93,18 +97,20 @@ const missingModels = computed(() => { folder_path: paths[0] } modelDownloads.value[model.name] = downloadInfo - if (!allowedSources.some((source) => model.url.startsWith(source))) { - return { - label: `${model.directory} / ${model.name}`, - url: model.url, - error: `Download not allowed from source '${model.url}', only allowed from '${allowedSources.join("', '")}'` + if (!whiteListedUrls.has(model.url)) { + if (!allowedSources.some((source) => model.url.startsWith(source))) { + return { + label: `${model.directory} / ${model.name}`, + url: model.url, + error: `Download not allowed from source '${model.url}', only allowed from '${allowedSources.join("', '")}'` + } } - } - if (!allowedSuffixes.some((suffix) => model.name.endsWith(suffix))) { - return { - label: `${model.directory} / ${model.name}`, - url: model.url, - error: `Only allowed suffixes are: '${allowedSuffixes.join("', '")}'` + if (!allowedSuffixes.some((suffix) => model.name.endsWith(suffix))) { + return { + label: `${model.directory} / ${model.name}`, + url: model.url, + error: `Only allowed suffixes are: '${allowedSuffixes.join("', '")}'` + } } } return {