Import folders without a Hub repo as local models

The Import form gets "Add as local model": every file in the folder,
kept as it is, named after the folder. A new models.source column
(hub | local) marks them; local models skip Hub checks, metadata,
downloads, updates and deep verify, and Verify checks existence and
size only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-11-08 00:14:56 +01:00
1 parent 90d6007b55
commit 80ccf800df
21 files changed
+1747 -39

No files matched your search

@@ -8,5 +8,6 @@ export const POST = withAuth<RouteContext<"/api/models/[id]/hub-check">>(async (
const { id } = await params;
const model = await getCheckedModel(id);
if (!model) return apiError(404, "not_found", "Model not found.");
if (model.source === "local") return apiError(409, "local_model", "This is a local model without a Hugging Face repo.");
return NextResponse.json(await checkHub(model));
});