From b521e75c6aea82d0b76341141dd12e339efab3af Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Thu, 5 Mar 2026 16:59:17 +0900 Subject: [PATCH] [feat] Add model metadata fetching with loading skeleton and gated repo support (#9415) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Fetch file sizes via HEAD requests (HuggingFace) and Civitai API with caching and request deduplication - Show skeleton loader while metadata is loading - Display "Accept terms" link for gated HuggingFace models instead of download button ## Changes - **`missingModelsUtils.ts`**: Add `fetchModelMetadata` with Civitai API support, HuggingFace gated repo detection, in-memory cache, and inflight request deduplication - **`MissingModelsContent.vue`**: Add Skeleton loading state, gated model "Accept terms" link, extract `showSkeleton` helper - **`missingModelsUtils.test.ts`**: Tests for HEAD/Civitai fetching, gated repo detection, caching, and deduplication - **`main.json`**: Add `acceptTerms` i18n key ## Related Issues https://github.com/Comfy-Org/ComfyUI_frontend/issues/9410 https://github.com/Comfy-Org/ComfyUI_frontend/issues/9412 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9415-feat-Add-model-metadata-fetching-with-loading-skeleton-and-gated-repo-support-31a6d73d36508127859efa0b3847505e) by [Unito](https://www.unito.io) --- .../dialog/content/MissingModelsContent.vue | 44 ++++-- .../dialog/content/missingModelsUtils.test.ts | 142 ++++++++++++++++++ .../dialog/content/missingModelsUtils.ts | 97 ++++++++++++ src/locales/en/main.json | 3 +- 4 files changed, 273 insertions(+), 13 deletions(-) create mode 100644 src/components/dialog/content/missingModelsUtils.test.ts diff --git a/src/components/dialog/content/MissingModelsContent.vue b/src/components/dialog/content/MissingModelsContent.vue index 09fbeecb96..02ac86e9c6 100644 --- a/src/components/dialog/content/MissingModelsContent.vue +++ b/src/components/dialog/content/MissingModelsContent.vue @@ -29,14 +29,24 @@
+ {{ formatSize(fileSizes.get(model.url)) }} + + {{ $t('missingModelsDialog.acceptTerms') }} +