Download more, file labels, split-file grouping, settings for labels and tags

- Files tab: "Download more" adds files to a model's selection and queues them
- Colored file labels (Model, MTP, Vision/mmproj, imatrix, Config, …)
- Split GGUF/safetensors parts shown and selected as one entry everywhere
- Settings page with a Labels section: file label names/colors, tag
  rename/recolor/delete; new settings table and tags.color
- Quants only count model weights

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-05 20:42:03 +02:00
1 parent 5211ec9064
commit df18415e02
34 files changed
+2256 -132

No files matched your search

+18 -3
View File
@@ -24,8 +24,10 @@ import { formatBytes, shortSha } from "@/lib/format";
import { fetchModelCard } from "@/lib/hub/client";
import { modelFamilies } from "@/lib/hub/metadata";
import { getModelByRepo, relatedModels } from "@/lib/library";
import { fileRole } from "@/lib/file-roles";
import { quantGroup } from "@/lib/selection";
import { modelTagList } from "@/lib/tags";
import { getWorkerStatus } from "@/lib/worker-status";
import { DownloadCard } from "./download-card";
import { FilesTab } from "./files-tab";
import { JobsTab } from "./jobs-tab";
@@ -89,16 +91,19 @@ export default async function ModelPage({ params, searchParams }: PageProps<"/[o
const baseModels = model.baseModels ?? [];
const hubTags = model.hubTags ?? [];
const [tags, related, card] = await Promise.all([
const [tags, related, card, worker] = await Promise.all([
modelTagList(model.id),
relatedModels(model.id, baseModels),
tab === "card" ? fetchModelCard(model.repoId, model.pinnedSha).catch(() => undefined) : Promise.resolve(undefined),
getWorkerStatus(),
]);
const selected = files.filter((f) => f.selected);
const others = files.filter((f) => !f.selected);
const selectedBytes = selected.reduce((s, f) => s + f.size, 0);
const quants = [...new Set(selected.map((f) => quantGroup(f.path)).filter(Boolean))] as string[];
const quants = [
...new Set(selected.filter((f) => fileRole(f.path) === "model").map((f) => quantGroup(f.path)).filter(Boolean)),
] as string[];
const formats = hubTags.filter((t) => FORMATS[t]).map((t) => FORMATS[t]);
const languages = hubTags.map(languageName).filter(Boolean) as string[];
@@ -206,7 +211,17 @@ export default async function ModelPage({ params, searchParams }: PageProps<"/[o
)}
</div>
)}
{tab === "files" && <FilesTab repoId={model.repoId} sha={model.pinnedSha} selected={selected} others={others} />}
{tab === "files" && (
<FilesTab
modelId={model.id}
repoId={model.repoId}
sha={model.pinnedSha}
selected={selected}
others={others}
freeBytes={worker.online ? worker.modelsDirFreeBytes : null}
busy={model.status === "downloading"}
/>
)}
{tab === "jobs" && (
<div className="px-2 pb-2">
<JobsTab modelId={model.id} />