Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

About & licences: capability names read as words (OCR, Scene 3D, VFX)

Claudefc2df746e3fa
diff --git a/src/lib/licences.ts b/src/lib/licences.ts
index 82f2f84b..c9173d00 100644
--- a/src/lib/licences.ts
+++ b/src/lib/licences.ts
@@ -180,7 +180,13 @@ const KIND_LABEL: Record<string, string> = { image: "Image", video: "Video", aud
/** A model's media kind, or a library workflow's capability, in words. */
export function kindLabel(kind: string): string {
- return KIND_LABEL[kind] ?? kind.replace(/-/g, " ").replace(/^\w/, (c) => c.toUpperCase());
+ return (
+ KIND_LABEL[kind] ??
+ kind
+ .replace(/-/g, " ")
+ .replace(/\b(vfx|ocr|tts|sfx|v2a|v2v|t2v|i2v|t2i|flf2v|3d)\b/g, (a) => a.toUpperCase())
+ .replace(/^\w/, (c) => c.toUpperCase())
+ );
}
export const FLAG_LABEL: Record<LicenceFlag, string> = {
diff --git a/tests/licences.test.ts b/tests/licences.test.ts
index b0541cb0..9ba62d95 100644
--- a/tests/licences.test.ts
+++ b/tests/licences.test.ts
@@ -3,7 +3,7 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import { MODELS } from "@/lib/catalog";
import type { Manifest } from "@/lib/comfy";
-import { buildLicenceList, licenceTerms, UNKNOWN_LICENCE, workflowLicence } from "@/lib/licences";
+import { buildLicenceList, kindLabel, licenceTerms, UNKNOWN_LICENCE, workflowLicence } from "@/lib/licences";
/** The About & licences page (R4-53): every open model's licence, its catches and notices. */
@@ -70,6 +70,10 @@ describe("licences", () => {
expect(list.counts.clear + list.counts["non-commercial"] + list.counts.territory + list.counts.conditions).toBeGreaterThanOrEqual(list.rows.length);
});
+ it("names kinds and capabilities in words", () => {
+ expect([kindLabel("model3d"), kindLabel("scene-3d"), kindLabel("ocr"), kindLabel("remove-object")]).toEqual(["3D", "Scene 3D", "OCR", "Remove object"]);
+ });
+
it("collects notices with the models that need them", () => {
const list = buildLicenceList(MODELS, manifest.workflows);
expect(list.notices.find((n) => n.text === "Built with Llama")?.models).toEqual(["HiDream-I1 Dev"]);