mirror of
https://github.com/storytold/placeholder-artcraft.git
synced 2026-10-09 00:09:55 +00:00
mirror repo (WIP)
Need to remove secrets before entire repo can be made public.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.json"
|
||||
],
|
||||
"parser": "jsonc-eslint-parser",
|
||||
"rules": {
|
||||
"@nx/dependency-checks": [
|
||||
"error",
|
||||
{
|
||||
"ignoredFiles": [
|
||||
"{projectRoot}/eslint.config.{js,cjs,mjs}",
|
||||
"{projectRoot}/vite.config.{js,ts,mjs,mts}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# model-list
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build model-list` to build the library.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `nx test model-list` to execute the unit tests via [Vitest](https://vitest.dev/).
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
export * from './lib/classes/ImageModel.js';
|
||||
export * from './lib/classes/Model.js';
|
||||
export * from './lib/classes/VideoModel.js';
|
||||
export * from './lib/classes/metadata/ModelCreator.js';
|
||||
export * from './lib/classes/metadata/ModelCreatorIcons.js';
|
||||
export * from './lib/classes/metadata/ModelMapping.js';
|
||||
export * from './lib/classes/metadata/ModelTag.js';
|
||||
export * from './lib/legacy/ModelConfig.js';
|
||||
export * from './lib/legacy/ModelInfo.js';
|
||||
export * from './lib/legacy/Models.js';
|
||||
export * from './lib/legacy/ModelsByPage.js';
|
||||
export * from './lib/lists/AllModels.js';
|
||||
export * from './lib/lists/AllModelsById.js';
|
||||
export * from './lib/lists/ImageModels.js';
|
||||
export * from './lib/lists/VideoModels.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
||||
+2160
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
import { ModelCreator } from 'src/index.js';
|
||||
import { Model, ModelKind } from './Model.js';
|
||||
import { ModelCategory } from '../legacy/ModelConfig.js';
|
||||
import { ModelTag } from './metadata/ModelTag.js';
|
||||
export declare class ImageModel extends Model {
|
||||
readonly kind: ModelKind;
|
||||
readonly maxGenerationCount: number;
|
||||
readonly defaultGenerationCount: number;
|
||||
readonly canEditImages: boolean;
|
||||
readonly usesInpaintingMask: boolean;
|
||||
readonly canUseImagePrompt: boolean;
|
||||
readonly maxImagePromptCount: number;
|
||||
constructor(args: {
|
||||
id: string;
|
||||
tauriId: string;
|
||||
fullName: string;
|
||||
category: ModelCategory;
|
||||
creator: ModelCreator;
|
||||
selectorName: string;
|
||||
selectorDescription: string;
|
||||
selectorBadges: string[];
|
||||
maxGenerationCount: number;
|
||||
defaultGenerationCount: number;
|
||||
canEditImages?: boolean;
|
||||
usesInpaintingMask?: boolean;
|
||||
canUseImagePrompt?: boolean;
|
||||
maxImagePromptCount?: number;
|
||||
tags?: ModelTag[];
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=ImageModel.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ImageModel.d.ts","sourceRoot":"","sources":["../../../src/lib/classes/ImageModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,qBAAa,UAAW,SAAQ,KAAK;IAInC,SAAkB,IAAI,EAAE,SAAS,CAAiB;IAGlD,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAGpC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IAGxC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAGhC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAGrC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAGpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;gBAEzB,IAAI,EAAE;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,aAAa,CAAC;QACxB,OAAO,EAAE,YAAY,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,sBAAsB,EAAE,MAAM,CAAC;QAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;KACnB;CAoBF"}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { ModelCreator } from './metadata/ModelCreator.js';
|
||||
import { ModelCategory, ModelConfig } from '../legacy/ModelConfig.js';
|
||||
import { ModelTag } from './metadata/ModelTag.js';
|
||||
export type ModelKind = "model" | "image_model" | "video_model";
|
||||
export declare class Model {
|
||||
readonly kind: ModelKind;
|
||||
readonly id: string;
|
||||
readonly tauriId: string;
|
||||
readonly fullName: string;
|
||||
readonly category: ModelCategory;
|
||||
readonly creator: ModelCreator;
|
||||
readonly selectorName: string;
|
||||
readonly selectorDescription: string;
|
||||
readonly selectorBadges: string[];
|
||||
readonly tags: ModelTag[];
|
||||
protected constructor(args: {
|
||||
id: string;
|
||||
tauriId: string;
|
||||
fullName: string;
|
||||
category: ModelCategory;
|
||||
creator: ModelCreator;
|
||||
selectorName: string;
|
||||
selectorDescription: string;
|
||||
selectorBadges: string[];
|
||||
tags?: ModelTag[];
|
||||
});
|
||||
toLegacyBadges(): {
|
||||
label: string;
|
||||
}[];
|
||||
toLegacyModelConfig(): ModelConfig;
|
||||
}
|
||||
//# sourceMappingURL=Model.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../../src/lib/classes/Model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,aAAa,CAAC;AAGhE,qBAAa,KAAK;IAIhB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAW;IAGnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAIpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAGzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAI1B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IAGjC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAG/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAG9B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAGrC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAGlC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC;IAE1B,SAAS,aAAa,IAAI,EAAE;QAC1B,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,aAAa,CAAC;QACxB,OAAO,EAAE,YAAY,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;KACnB;IAYD,cAAc,IAAK;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE;IAKtC,mBAAmB,IAAI,WAAW;CAmBnC"}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ModelCreator } from 'src/index.js';
|
||||
import { Model, ModelKind } from './Model.js';
|
||||
import { ModelCategory } from '../legacy/ModelConfig.js';
|
||||
import { ModelTag } from './metadata/ModelTag.js';
|
||||
export declare class VideoModel extends Model {
|
||||
readonly kind: ModelKind;
|
||||
readonly startFrame: boolean;
|
||||
readonly endFrame: boolean;
|
||||
constructor(args: {
|
||||
id: string;
|
||||
tauriId: string;
|
||||
fullName: string;
|
||||
category: ModelCategory;
|
||||
creator: ModelCreator;
|
||||
selectorName: string;
|
||||
selectorDescription: string;
|
||||
selectorBadges: string[];
|
||||
startFrame: boolean;
|
||||
endFrame: boolean;
|
||||
tags?: ModelTag[];
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=VideoModel.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"VideoModel.d.ts","sourceRoot":"","sources":["../../../src/lib/classes/VideoModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,qBAAa,UAAW,SAAQ,KAAK;IAInC,SAAkB,IAAI,EAAE,SAAS,CAAiB;IAGlD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAG7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;gBAEf,IAAI,EAAE;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,aAAa,CAAC;QACxB,OAAO,EAAE,YAAY,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,UAAU,EAAE,OAAO,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;KACnB;CAKF"}
|
||||
@@ -0,0 +1,23 @@
|
||||
export declare enum ModelCreator {
|
||||
BlackForestLabs = "BlackForestLabs",
|
||||
Bytedance = "Bytedance",
|
||||
Google = "Google",
|
||||
Hailuo = "Hailuo",
|
||||
Kling = "Kling",
|
||||
Midjourney = "Midjourney",
|
||||
OpenAi = "OpenAi",
|
||||
Runway = "Runway",
|
||||
Stability = "Stability",
|
||||
Tencent = "Tencent",// hunyuan
|
||||
Recraft = "Recraft",
|
||||
Krea = "Krea",
|
||||
Fal = "Fal",
|
||||
Replicate = "Replicate",
|
||||
TensorArt = "TensorArt",
|
||||
OpenArt = "OpenArt",
|
||||
Higgsfield = "Higgsfield",
|
||||
Alibaba = "Alibaba",// qwen and wanvideo
|
||||
Vidu = "Vidu",
|
||||
ArtCraft = "ArtCraft"
|
||||
}
|
||||
//# sourceMappingURL=ModelCreator.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelCreator.d.ts","sourceRoot":"","sources":["../../../../src/lib/classes/metadata/ModelCreator.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,eAAe,oBAAoB;IACnC,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY,CAAE,UAAU;IAC/B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY,CAAE,oBAAoB;IACzC,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { ModelCreator } from './ModelCreator.js';
|
||||
export declare const CREATOR_ICON_PATHS: Partial<Record<ModelCreator, string>>;
|
||||
export declare const getCreatorIconPath: (creator: ModelCreator) => string | undefined;
|
||||
export declare const getCreatorIcon: (creator: ModelCreator, className?: string) => ReactNode | null;
|
||||
//# sourceMappingURL=ModelCreatorIcons.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelCreatorIcons.d.ts","sourceRoot":"","sources":["../../../../src/lib/classes/metadata/ModelCreatorIcons.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAmBpE,CAAC;AAIF,eAAO,MAAM,kBAAkB,GAAI,SAAS,YAAY,KAAG,MAAM,GAAG,SACvC,CAAC;AAE9B,eAAO,MAAM,cAAc,GACzB,SAAS,YAAY,EACrB,kBAA4B,KAC3B,SAAS,GAAG,IAOd,CAAC"}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { default as React } from 'react';
|
||||
import { ModelCreator } from './ModelCreator.js';
|
||||
export declare const MODEL_TYPE_TO_CREATOR: Record<string, ModelCreator>;
|
||||
export declare const getModelCreatorIcon: (modelType: string) => React.ReactNode | null;
|
||||
export declare const getModelCreatorName: (modelType: string) => string | null;
|
||||
export declare const getModelDisplayName: (modelType: string) => string;
|
||||
export declare const getProviderDisplayName: (provider: string) => string;
|
||||
//# sourceMappingURL=ModelMapping.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelMapping.d.ts","sourceRoot":"","sources":["../../../../src/lib/classes/metadata/ModelMapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAoB9D,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,KAChB,KAAK,CAAC,SAAS,GAAG,IAIpB,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG,MAAM,GAAG,IA8ChE,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG,MAiCvD,CAAC;AAGF,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,KAAG,MASzD,CAAC"}
|
||||
@@ -0,0 +1,6 @@
|
||||
export declare enum ModelTag {
|
||||
InstructiveEdit = "instructiveEdit",
|
||||
MaskedInpainting = "maskedInpainting",
|
||||
NonMaskedInpainting = "nonMaskedInpainting"
|
||||
}
|
||||
//# sourceMappingURL=ModelTag.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelTag.d.ts","sourceRoot":"","sources":["../../../../src/lib/classes/metadata/ModelTag.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAElB,eAAe,oBAAoB;IAGnC,gBAAgB,qBAAqB;IAGrC,mBAAmB,wBAAwB;CAC5C"}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { ModelInfo } from './ModelInfo.js';
|
||||
import { ModelTag } from '../classes/metadata/ModelTag.js';
|
||||
export type ModelCategory = "image" | "video";
|
||||
export interface ModelCapabilities {
|
||||
maxGenerationCount: number;
|
||||
defaultGenerationCount?: number;
|
||||
}
|
||||
export interface ModelConfig {
|
||||
id: string;
|
||||
label: string;
|
||||
description?: string;
|
||||
badges?: {
|
||||
label: string;
|
||||
}[];
|
||||
category: ModelCategory;
|
||||
info: ModelInfo;
|
||||
capabilities: ModelCapabilities;
|
||||
tags?: (ModelTag | string)[];
|
||||
}
|
||||
//# sourceMappingURL=ModelConfig.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelConfig.d.ts","sourceRoot":"","sources":["../../../src/lib/legacy/ModelConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC;AAK9C,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7B,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B"}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { ModelCreator } from '../classes/metadata/ModelCreator.js';
|
||||
export interface ModelInfo {
|
||||
name: string;
|
||||
tauri_id: string;
|
||||
creator: ModelCreator;
|
||||
}
|
||||
//# sourceMappingURL=ModelInfo.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelInfo.d.ts","sourceRoot":"","sources":["../../../src/lib/legacy/ModelInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,MAAM,WAAW,SAAS;IAGxB,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAE,YAAY,CAAC;CACvB"}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { ModelConfig, ModelCapabilities, ModelCategory } from './ModelConfig.js';
|
||||
import { Model } from '../classes/Model.js';
|
||||
export declare const getAllModels: () => ModelConfig[];
|
||||
export declare const getModelsByCategory: (category: ModelCategory) => ModelConfig[];
|
||||
export declare const getInstructiveImageEditModels: () => ModelConfig[];
|
||||
export declare const getMaskedInpaintModels: () => ModelConfig[];
|
||||
export declare const lookupModelByTauriId: (tauriId: string) => ModelConfig | undefined;
|
||||
export declare const getCapabilitiesForModel: (model?: Model) => ModelCapabilities;
|
||||
//# sourceMappingURL=Models.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/lib/legacy/Models.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAoN5C,eAAO,MAAM,YAAY,QAAO,WAAW,EAAgB,CAAC;AAE5D,eAAO,MAAM,mBAAmB,GAAI,UAAU,aAAa,KAAG,WAAW,EACtB,CAAC;AAEpD,eAAO,MAAM,6BAA6B,QAAO,WAAW,EAGzD,CAAC;AAEJ,eAAO,MAAM,sBAAsB,QAAO,WAAW,EAGlD,CAAC;AAEJ,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,KACd,WAAW,GAAG,SACoC,CAAC;AAGtD,eAAO,MAAM,uBAAuB,GAClC,QAAQ,KAAK,KACZ,iBAIF,CAAC"}
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* We might not want to always programatically build the list of models, because
|
||||
* we likely want to control the order of models in the UI to prioritize
|
||||
* more popular models. We may also want to selectively prune non-useful models.
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=ModelsByPage.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModelsByPage.d.ts","sourceRoot":"","sources":["../../../src/lib/legacy/ModelsByPage.ts"],"names":[],"mappings":"AACA;;;;GAIG"}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Model } from '../classes/Model.js';
|
||||
export declare const ALL_MODELS_LIST: Model[];
|
||||
//# sourceMappingURL=AllModels.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AllModels.d.ts","sourceRoot":"","sources":["../../../src/lib/lists/AllModels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE,KAAK,EAAuC,CAAC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Model } from '../classes/Model.js';
|
||||
export declare const ALL_MODELS_BY_ID: Map<string, Model>;
|
||||
//# sourceMappingURL=AllModelsById.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AllModelsById.d.ts","sourceRoot":"","sources":["../../../src/lib/lists/AllModelsById.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,eAAO,MAAM,gBAAgB,EAAG,GAAG,CAAC,MAAM,EAAE,KAAK,CAEhD,CAAC"}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { ImageModel } from '../classes/ImageModel.js';
|
||||
export declare const IMAGE_MODELS: ImageModel[];
|
||||
export declare const IMAGE_MODELS_BY_ID: Map<string, ImageModel>;
|
||||
//# sourceMappingURL=ImageModels.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ImageModels.d.ts","sourceRoot":"","sources":["../../../src/lib/lists/ImageModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAItD,eAAO,MAAM,YAAY,EAAE,UAAU,EAiJpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAEvD,CAAC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { VideoModel } from '../classes/VideoModel.js';
|
||||
export declare const VIDEO_MODELS: VideoModel[];
|
||||
//# sourceMappingURL=VideoModels.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"VideoModels.d.ts","sourceRoot":"","sources":["../../../src/lib/lists/VideoModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD,eAAO,MAAM,YAAY,EAAE,UAAU,EA6DpC,CAAC"}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "@storyteller/model-list",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"development": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
export * from "./lib/classes/ImageModel.js";
|
||||
export * from "./lib/classes/Model.js";
|
||||
export * from "./lib/classes/VideoModel.js";
|
||||
export * from "./lib/classes/metadata/ModelCreator.js";
|
||||
export * from "./lib/classes/metadata/ModelCreatorIcons.js";
|
||||
export * from "./lib/classes/metadata/ModelMapping.js";
|
||||
export * from "./lib/classes/metadata/ModelTag.js";
|
||||
export * from "./lib/legacy/ModelConfig.js";
|
||||
export * from "./lib/legacy/ModelInfo.js";
|
||||
export * from "./lib/legacy/Models.js";
|
||||
export * from "./lib/legacy/ModelsByPage.js";
|
||||
export * from "./lib/lists/AllModels.js";
|
||||
export * from "./lib/lists/AllModelsById.js";
|
||||
export * from "./lib/lists/ImageModels.js";
|
||||
export * from "./lib/lists/VideoModels.js";
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
import { ModelCreator } from "src/index.js";
|
||||
import { Model, ModelKind } from "./Model.js";
|
||||
import { ModelCategory } from "../legacy/ModelConfig.js";
|
||||
import { ModelTag } from "./metadata/ModelTag.js";
|
||||
|
||||
export class ImageModel extends Model {
|
||||
// Typescript type discriminator property
|
||||
// Since Vite minification and class name mangling can break instanceof checks,
|
||||
// we have a type discriminator property to check against.
|
||||
override readonly kind: ModelKind = "image_model";
|
||||
|
||||
// Maximum number of images that can be generated at once
|
||||
readonly maxGenerationCount: number;
|
||||
|
||||
// Default number of images that can be generated at once
|
||||
readonly defaultGenerationCount: number;
|
||||
|
||||
// Signals image editing models that focus on editing a single image.
|
||||
readonly canEditImages: boolean;
|
||||
|
||||
// For inpainting models, does it require sending a mask?
|
||||
readonly usesInpaintingMask: boolean;
|
||||
|
||||
// Whether this model supports additional image prompts (reference images)
|
||||
readonly canUseImagePrompt: boolean;
|
||||
|
||||
// Maximum number of image prompts that can be attached
|
||||
readonly maxImagePromptCount: number;
|
||||
|
||||
constructor(args: {
|
||||
id: string;
|
||||
tauriId: string;
|
||||
fullName: string;
|
||||
category: ModelCategory;
|
||||
creator: ModelCreator;
|
||||
selectorName: string;
|
||||
selectorDescription: string;
|
||||
selectorBadges: string[];
|
||||
maxGenerationCount: number;
|
||||
defaultGenerationCount: number;
|
||||
canEditImages?: boolean;
|
||||
usesInpaintingMask?: boolean;
|
||||
canUseImagePrompt?: boolean;
|
||||
maxImagePromptCount?: number;
|
||||
tags?: ModelTag[];
|
||||
}) {
|
||||
if (args.maxGenerationCount < 1) {
|
||||
throw new Error("maxGenerationCount must be at least 1");
|
||||
}
|
||||
if (args.defaultGenerationCount < 1) {
|
||||
throw new Error("defaultGenerationCount must be at least 1");
|
||||
}
|
||||
if (args.defaultGenerationCount > args.maxGenerationCount) {
|
||||
throw new Error(
|
||||
"defaultGenerationCount must be less than or equal to maxGenerationCount"
|
||||
);
|
||||
}
|
||||
super(args);
|
||||
this.maxGenerationCount = args.maxGenerationCount;
|
||||
this.defaultGenerationCount = args.defaultGenerationCount;
|
||||
this.canEditImages = args.canEditImages ?? false;
|
||||
this.usesInpaintingMask = args.usesInpaintingMask ?? false;
|
||||
this.canUseImagePrompt = args.canUseImagePrompt ?? false;
|
||||
this.maxImagePromptCount = Math.max(0, args.maxImagePromptCount ?? 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import { ModelCreator } from "./metadata/ModelCreator.js";
|
||||
import { ModelCategory, ModelConfig } from "../legacy/ModelConfig.js";
|
||||
import { ModelTag } from "./metadata/ModelTag.js";
|
||||
|
||||
export type ModelKind = "model" | "image_model" | "video_model";
|
||||
|
||||
// NB: Do not create instances of this class directly, use subclasses.
|
||||
export class Model {
|
||||
// Typescript type discriminator property
|
||||
// Since Vite minification and class name mangling can break instanceof checks,
|
||||
// we have a type discriminator property to check against.
|
||||
readonly kind: ModelKind = "model";
|
||||
|
||||
// A unique frontend-only string for the model
|
||||
readonly id: string;
|
||||
|
||||
// A unique identifier that Tauri uses for the model (this
|
||||
// might differ from our backend or other systems)
|
||||
readonly tauriId: string;
|
||||
|
||||
// A long name for the model that might need to be abbreviated.
|
||||
readonly fullName: string;
|
||||
|
||||
// The type of model (image, video, etc.)
|
||||
// TODO: Not sure that this is used for anything
|
||||
readonly category: ModelCategory;
|
||||
|
||||
// What company made the model.
|
||||
readonly creator: ModelCreator;
|
||||
|
||||
// Name for the selector
|
||||
readonly selectorName: string;
|
||||
|
||||
// Description for the selector
|
||||
readonly selectorDescription: string;
|
||||
|
||||
// Labels for the selector
|
||||
readonly selectorBadges: string[];
|
||||
|
||||
// A list of filterable "capabilities" that can be used to filter models.
|
||||
readonly tags: ModelTag[];
|
||||
|
||||
protected constructor(args: {
|
||||
id: string;
|
||||
tauriId: string;
|
||||
fullName: string;
|
||||
category: ModelCategory;
|
||||
creator: ModelCreator;
|
||||
selectorName: string;
|
||||
selectorDescription: string;
|
||||
selectorBadges: string[];
|
||||
tags?: ModelTag[];
|
||||
}) {
|
||||
this.id = args.id;
|
||||
this.tauriId = args.tauriId;
|
||||
this.fullName = args.fullName;
|
||||
this.category = args.category;
|
||||
this.creator = args.creator;
|
||||
this.selectorName = args.selectorName;
|
||||
this.selectorDescription = args.selectorDescription;
|
||||
this.selectorBadges = args.selectorBadges;
|
||||
this.tags = args.tags ?? [];
|
||||
}
|
||||
|
||||
toLegacyBadges() : { label: string }[] {
|
||||
return this.selectorBadges.map((b) => ({ label: b }));
|
||||
}
|
||||
|
||||
// TODO: This is a method to support migration. Kill it after we no longer need it.
|
||||
toLegacyModelConfig(): ModelConfig {
|
||||
return {
|
||||
id: this.id,
|
||||
label: this.selectorName,
|
||||
description: this.selectorDescription,
|
||||
badges: this.toLegacyBadges(),
|
||||
category: this.category,
|
||||
info: {
|
||||
name: this.fullName,
|
||||
tauri_id: this.tauriId,
|
||||
creator: this.creator,
|
||||
},
|
||||
capabilities: {
|
||||
maxGenerationCount: 9, // NB: Sentinel value to detect continued use
|
||||
defaultGenerationCount: 9, // NB: Sentinel value to detect continued use
|
||||
},
|
||||
tags: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { ModelCreator } from "src/index.js";
|
||||
import { Model, ModelKind } from "./Model.js";
|
||||
import { ModelCategory } from "../legacy/ModelConfig.js";
|
||||
import { ModelTag } from "./metadata/ModelTag.js";
|
||||
|
||||
export class VideoModel extends Model {
|
||||
// Typescript type discriminator property
|
||||
// Since Vite minification and class name mangling can break instanceof checks,
|
||||
// we have a type discriminator property to check against.
|
||||
override readonly kind: ModelKind = "video_model";
|
||||
|
||||
// Whether the model supports image starting frames
|
||||
readonly startFrame: boolean;
|
||||
|
||||
// Whether the model supports image ending frames
|
||||
readonly endFrame: boolean;
|
||||
|
||||
constructor(args: {
|
||||
id: string;
|
||||
tauriId: string;
|
||||
fullName: string;
|
||||
category: ModelCategory;
|
||||
creator: ModelCreator;
|
||||
selectorName: string;
|
||||
selectorDescription: string;
|
||||
selectorBadges: string[];
|
||||
startFrame: boolean;
|
||||
endFrame: boolean;
|
||||
tags?: ModelTag[];
|
||||
}) {
|
||||
super(args);
|
||||
this.startFrame = args.startFrame;
|
||||
this.endFrame = args.endFrame;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
export enum ModelCreator {
|
||||
BlackForestLabs = "BlackForestLabs",
|
||||
Bytedance = "Bytedance",
|
||||
Google = "Google",
|
||||
Hailuo = "Hailuo",
|
||||
Kling = "Kling",
|
||||
Midjourney = "Midjourney",
|
||||
OpenAi = "OpenAi",
|
||||
Runway = "Runway",
|
||||
Stability = "Stability",
|
||||
Tencent = "Tencent", // hunyuan
|
||||
Recraft = "Recraft",
|
||||
Krea = "Krea",
|
||||
Fal = "Fal",
|
||||
Replicate = "Replicate",
|
||||
TensorArt = "TensorArt",
|
||||
OpenArt = "OpenArt",
|
||||
Higgsfield = "Higgsfield",
|
||||
Alibaba = "Alibaba", // qwen and wanvideo
|
||||
Vidu = "Vidu",
|
||||
ArtCraft = "ArtCraft",
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import React, { ReactNode } from "react";
|
||||
import { ModelCreator } from "./ModelCreator.js";
|
||||
|
||||
export const CREATOR_ICON_PATHS: Partial<Record<ModelCreator, string>> = {
|
||||
[ModelCreator.BlackForestLabs]:
|
||||
"/resources/images/services/blackforestlabs.svg",
|
||||
[ModelCreator.Kling]: "/resources/images/services/kling.svg",
|
||||
[ModelCreator.Midjourney]: "/resources/images/services/midjourney.svg",
|
||||
[ModelCreator.OpenAi]: "/resources/images/services/openai.svg",
|
||||
[ModelCreator.Bytedance]: "/resources/images/services/bytedance.svg",
|
||||
[ModelCreator.Google]: "/resources/images/services/google.svg",
|
||||
[ModelCreator.Recraft]: "/resources/images/services/recraft.svg",
|
||||
[ModelCreator.Tencent]: "/resources/images/services/tencent.svg",
|
||||
[ModelCreator.Krea]: "/resources/images/services/krea.svg",
|
||||
[ModelCreator.Fal]: "/resources/images/services/fal.svg",
|
||||
[ModelCreator.Replicate]: "/resources/images/services/replicate.svg",
|
||||
[ModelCreator.TensorArt]: "/resources/images/services/tensorart.svg",
|
||||
[ModelCreator.OpenArt]: "/resources/images/services/openart.svg",
|
||||
[ModelCreator.Higgsfield]: "/resources/images/services/higgsfield.svg",
|
||||
[ModelCreator.Alibaba]: "/resources/images/services/alibaba.svg",
|
||||
[ModelCreator.Vidu]: "/resources/images/services/vidu.svg",
|
||||
[ModelCreator.ArtCraft]: "/resources/images/services/artcraft.svg",
|
||||
};
|
||||
|
||||
const DEFAULT_ICON_PATH = "/resources/images/services/generic.svg";
|
||||
|
||||
export const getCreatorIconPath = (creator: ModelCreator): string | undefined =>
|
||||
CREATOR_ICON_PATHS[creator];
|
||||
|
||||
export const getCreatorIcon = (
|
||||
creator: ModelCreator,
|
||||
className = "h-4 w-4 invert"
|
||||
): ReactNode | null => {
|
||||
const path = getCreatorIconPath(creator) ?? DEFAULT_ICON_PATH;
|
||||
return React.createElement("img", {
|
||||
src: path,
|
||||
alt: `${creator} logo`,
|
||||
className,
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,132 @@
|
||||
import React from "react";
|
||||
import { ModelCreator } from "./ModelCreator.js";
|
||||
import { getCreatorIcon } from "./ModelCreatorIcons.js";
|
||||
|
||||
// Map from model type strings to ModelCreator enum values
|
||||
export const MODEL_TYPE_TO_CREATOR: Record<string, ModelCreator> = {
|
||||
flux_1_dev: ModelCreator.BlackForestLabs,
|
||||
flux_1_schnell: ModelCreator.BlackForestLabs,
|
||||
flux_pro_1p1: ModelCreator.BlackForestLabs,
|
||||
flux_pro_1p1_ultra: ModelCreator.BlackForestLabs,
|
||||
gpt_image_1: ModelCreator.OpenAi,
|
||||
kling_1p6_pro: ModelCreator.Kling,
|
||||
kling_2p1_pro: ModelCreator.Kling,
|
||||
kling_2p1_master: ModelCreator.Kling,
|
||||
seedance_1p0_lite: ModelCreator.Bytedance,
|
||||
veo_2: ModelCreator.Google,
|
||||
recraft_3: ModelCreator.Recraft,
|
||||
hunyuan_3d: ModelCreator.Tencent,
|
||||
midjourney: ModelCreator.Midjourney,
|
||||
midjourney_v6: ModelCreator.Midjourney,
|
||||
midjourney_v6p1: ModelCreator.Midjourney,
|
||||
midjourney_v6p1_raw: ModelCreator.Midjourney,
|
||||
midjourney_v7: ModelCreator.Midjourney,
|
||||
midjourney_v7_raw: ModelCreator.Midjourney,
|
||||
midjourney_v7_draft_raw: ModelCreator.Midjourney,
|
||||
};
|
||||
|
||||
// Get creator icon for a model type
|
||||
export const getModelCreatorIcon = (
|
||||
modelType: string
|
||||
): React.ReactNode | null => {
|
||||
const creator = MODEL_TYPE_TO_CREATOR[modelType];
|
||||
if (!creator) return null;
|
||||
return getCreatorIcon(creator, "h-4 w-4 invert");
|
||||
};
|
||||
|
||||
// Get creator name for display
|
||||
export const getModelCreatorName = (modelType: string): string | null => {
|
||||
const creator = MODEL_TYPE_TO_CREATOR[modelType];
|
||||
|
||||
// Convert enum value to display name
|
||||
switch (creator) {
|
||||
case ModelCreator.BlackForestLabs:
|
||||
return "Black Forest Labs";
|
||||
case ModelCreator.OpenAi:
|
||||
return "OpenAI";
|
||||
case ModelCreator.Kling:
|
||||
return "Kling AI";
|
||||
case ModelCreator.Bytedance:
|
||||
return "ByteDance";
|
||||
case ModelCreator.Google:
|
||||
return "Google";
|
||||
case ModelCreator.Midjourney:
|
||||
return "Midjourney";
|
||||
case ModelCreator.Stability:
|
||||
return "Stability AI";
|
||||
case ModelCreator.Runway:
|
||||
return "Runway";
|
||||
case ModelCreator.Hailuo:
|
||||
return "Hailuo";
|
||||
case ModelCreator.Recraft:
|
||||
return "Recraft";
|
||||
case ModelCreator.Tencent:
|
||||
return "Tencent";
|
||||
case ModelCreator.Alibaba:
|
||||
return "Alibaba";
|
||||
case ModelCreator.Vidu:
|
||||
return "Vidu";
|
||||
case ModelCreator.Fal:
|
||||
return "Fal";
|
||||
case ModelCreator.Replicate:
|
||||
return "Replicate";
|
||||
case ModelCreator.TensorArt:
|
||||
return "TensorArt";
|
||||
case ModelCreator.OpenArt:
|
||||
return "OpenArt";
|
||||
case ModelCreator.Higgsfield:
|
||||
return "Higgsfield";
|
||||
case ModelCreator.Krea:
|
||||
return "Krea";
|
||||
default:
|
||||
return creator;
|
||||
}
|
||||
};
|
||||
|
||||
// Convert model type string to human-readable display name
|
||||
export const getModelDisplayName = (modelType: string): string => {
|
||||
const displayNames: Record<string, string> = {
|
||||
flux_1_dev: "Flux 1 Dev",
|
||||
flux_1_schnell: "Flux 1 Schnell",
|
||||
flux_pro_1p1: "Flux Pro 1.1",
|
||||
flux_pro_1p1_ultra: "Flux Pro 1.1 Ultra",
|
||||
gpt_image_1: "GPT Image 1",
|
||||
kling_1p6_pro: "Kling 1.6 Pro",
|
||||
kling_2p1_pro: "Kling 2.1 Pro",
|
||||
kling_2p1_master: "Kling 2.1 Master",
|
||||
seedance_1p0_lite: "Seedance 1.0 Lite",
|
||||
veo_2: "Veo 2",
|
||||
recraft_3: "Recraft 3",
|
||||
hunyuan_3d_2p0: "Hunyuan 3D 2.0",
|
||||
hunyuan_3d_2p1: "Hunyuan 3D 2.1",
|
||||
hunyuan_3d: "Hunyuan 3D",
|
||||
flux_pro_kontext_max: "Flux Pro Kontext Max",
|
||||
|
||||
// Catch-all bucket for Midjourney.
|
||||
midjourney: "Midjourney",
|
||||
|
||||
// Specific Midjourney models.
|
||||
midjourney_v6: "Midjourney V6",
|
||||
midjourney_v6p1: "Midjourney V6.1",
|
||||
midjourney_v6p1_raw: "Midjourney V6.1 (Raw)",
|
||||
midjourney_v7: "Midjourney V7",
|
||||
midjourney_v7_raw: "Midjourney V7 (Raw)",
|
||||
midjourney_v7_draft_raw: "Midjourney V7 (Draft Raw)",
|
||||
|
||||
// TODO: add more models here - BFlat
|
||||
};
|
||||
|
||||
return displayNames[modelType] || modelType;
|
||||
};
|
||||
|
||||
// Convert provider string to human-readable display name (this is for the provider priority in settings)
|
||||
export const getProviderDisplayName = (provider: string): string => {
|
||||
const displayNames: Record<string, string> = {
|
||||
artcraft: "ArtCraft",
|
||||
fal: "FAL",
|
||||
midjourney: "Midjourney",
|
||||
sora: "Sora",
|
||||
};
|
||||
|
||||
return displayNames[provider] || provider;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
// TODO: It might be better to have top-level boolean fields on the models.
|
||||
|
||||
export enum ModelTag {
|
||||
// Models that show up in the 2D and 3D editors
|
||||
InstructiveEdit = "instructiveEdit",
|
||||
|
||||
// Models that show up in the inpainting editor and that use masking.
|
||||
MaskedInpainting = "maskedInpainting",
|
||||
|
||||
// Models that show up in the inpainting editor, but that do not use masking.
|
||||
NonMaskedInpainting = "nonMaskedInpainting",
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ModelInfo } from "./ModelInfo.js";
|
||||
import { ModelTag } from "../classes/metadata/ModelTag.js";
|
||||
|
||||
export type ModelCategory = "image" | "video";
|
||||
|
||||
// Centralized model capability definition
|
||||
// For setting options for the model
|
||||
// TODO: add more capabilities here - BFlat
|
||||
export interface ModelCapabilities {
|
||||
maxGenerationCount: number;
|
||||
defaultGenerationCount?: number;
|
||||
}
|
||||
|
||||
export interface ModelConfig {
|
||||
id: string;
|
||||
label: string; // UI label
|
||||
description?: string;
|
||||
badges?: { label: string }[];
|
||||
category: ModelCategory;
|
||||
info: ModelInfo;
|
||||
capabilities: ModelCapabilities;
|
||||
tags?: (ModelTag | string)[]; // optional tags, e.g. ["instructiveEdit"] - for filtering
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ModelCreator } from "../classes/metadata/ModelCreator.js";
|
||||
|
||||
export interface ModelInfo {
|
||||
// Human-readible name
|
||||
// Other components may want to rename the model, eg. to fit in smaller width elements
|
||||
name: string;
|
||||
|
||||
// The identifier that Tauri uses (it may send different signals downstream)
|
||||
tauri_id: string;
|
||||
|
||||
// Creator of the model type
|
||||
creator: ModelCreator;
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
import { ModelCreator } from "../classes/metadata/ModelCreator.js";
|
||||
import { ModelInfo } from "./ModelInfo.js";
|
||||
import { ModelTag } from "../classes/metadata/ModelTag.js";
|
||||
import {
|
||||
ModelConfig,
|
||||
ModelCapabilities,
|
||||
ModelCategory,
|
||||
} from "./ModelConfig.js";
|
||||
import { Model } from "../classes/Model.js";
|
||||
|
||||
const mc = ModelCreator;
|
||||
|
||||
const DEFAULT_CAPABILITIES: ModelCapabilities = {
|
||||
maxGenerationCount: 1,
|
||||
defaultGenerationCount: 1,
|
||||
};
|
||||
|
||||
const cfg = (
|
||||
m: Partial<ModelConfig> & {
|
||||
id: string;
|
||||
category: ModelCategory;
|
||||
info: ModelInfo;
|
||||
}
|
||||
): ModelConfig => ({
|
||||
label: m.label ?? m.info.name,
|
||||
description: m.description,
|
||||
badges: m.badges,
|
||||
capabilities: m.capabilities ?? DEFAULT_CAPABILITIES,
|
||||
tags: m.tags ?? [],
|
||||
...m,
|
||||
});
|
||||
|
||||
const ALL_MODELS: ModelConfig[] = [
|
||||
//////////////////////////////
|
||||
// Image models
|
||||
//////////////////////////////
|
||||
cfg({
|
||||
id: "midjourney",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Midjourney",
|
||||
tauri_id: "midjourney",
|
||||
creator: mc.Midjourney,
|
||||
},
|
||||
description: "Incredible style and quality",
|
||||
badges: [{ label: "15 sec." }],
|
||||
capabilities: { maxGenerationCount: 4, defaultGenerationCount: 4 },
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_pro_1_1_ultra",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux Pro 1.1 Ultra",
|
||||
tauri_id: "flux_pro_11_ultra",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "High quality model",
|
||||
badges: [{ label: "15 sec." }],
|
||||
capabilities: { maxGenerationCount: 4, defaultGenerationCount: 4 },
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_pro_1_1",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux Pro 1.1",
|
||||
tauri_id: "flux_pro_11",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "High quality model",
|
||||
badges: [{ label: "15 sec." }],
|
||||
capabilities: { maxGenerationCount: 4, defaultGenerationCount: 4 },
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_1_dev",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux 1 Dev",
|
||||
tauri_id: "flux_1_dev",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "High quality model",
|
||||
badges: [{ label: "15 sec." }],
|
||||
capabilities: { maxGenerationCount: 4, defaultGenerationCount: 4 },
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_1_schnell",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux 1 Schnell",
|
||||
tauri_id: "flux_1_schnell",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "High quality model",
|
||||
badges: [{ label: "15 sec." }],
|
||||
capabilities: { maxGenerationCount: 4, defaultGenerationCount: 4 },
|
||||
}),
|
||||
cfg({
|
||||
id: "gpt_image_1",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "GPT Image 1 (GPT-4o)",
|
||||
tauri_id: "gpt_image_1",
|
||||
creator: mc.OpenAi,
|
||||
},
|
||||
description: "Slow, ultra instructive model",
|
||||
badges: [{ label: "45 sec." }],
|
||||
capabilities: { maxGenerationCount: 1 },
|
||||
tags: ["instructiveEdit"],
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_pro_kontext_max",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux Pro Kontext Max",
|
||||
tauri_id: "flux_pro_kontext_max",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "Fast and high-quality model",
|
||||
badges: [{ label: "20 sec." }],
|
||||
capabilities: {
|
||||
maxGenerationCount: 4,
|
||||
},
|
||||
tags: [ModelTag.InstructiveEdit, ModelTag.NonMaskedInpainting],
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_pro_inpaint",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux Pro 1 (Inpainting)",
|
||||
tauri_id: "flux_pro_1",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "Fast and high-quality model",
|
||||
badges: [{ label: "20 sec." }],
|
||||
capabilities: {
|
||||
maxGenerationCount: 1, // NB: For some reason Fal only supports ONE image!
|
||||
},
|
||||
tags: [ModelTag.MaskedInpainting],
|
||||
}),
|
||||
cfg({
|
||||
id: "flux_dev_juggernaut_inpaint",
|
||||
category: "image",
|
||||
info: {
|
||||
name: "Flux Dev Juggernaut (Inpainting)",
|
||||
tauri_id: "flux_dev_juggernaut",
|
||||
creator: mc.BlackForestLabs,
|
||||
},
|
||||
description: "Fast and high-quality model",
|
||||
badges: [{ label: "20 sec." }],
|
||||
capabilities: {
|
||||
maxGenerationCount: 4,
|
||||
},
|
||||
tags: [ModelTag.MaskedInpainting],
|
||||
}),
|
||||
|
||||
//////////////////////////////
|
||||
// Video models
|
||||
//////////////////////////////
|
||||
cfg({
|
||||
id: "kling_1_6_pro",
|
||||
category: "video",
|
||||
info: {
|
||||
name: "Kling 1.6 Pro",
|
||||
tauri_id: "kling_1.6_pro",
|
||||
creator: mc.Kling,
|
||||
},
|
||||
description: "Good quality model",
|
||||
badges: [{ label: "2 min." }],
|
||||
capabilities: { maxGenerationCount: 1 },
|
||||
}),
|
||||
cfg({
|
||||
id: "kling_2_1_pro",
|
||||
category: "video",
|
||||
info: {
|
||||
name: "Kling 2.1 Pro",
|
||||
tauri_id: "kling_2.1_pro",
|
||||
creator: mc.Kling,
|
||||
},
|
||||
description: "High quality model",
|
||||
badges: [{ label: "2 min." }],
|
||||
capabilities: { maxGenerationCount: 1 },
|
||||
}),
|
||||
cfg({
|
||||
id: "kling_2_1_master",
|
||||
category: "video",
|
||||
info: {
|
||||
name: "Kling 2.1 Master",
|
||||
tauri_id: "kling_2.1_master",
|
||||
creator: mc.Kling,
|
||||
},
|
||||
description: "Master quality model ($$)",
|
||||
badges: [{ label: "2 min." }],
|
||||
capabilities: { maxGenerationCount: 1 },
|
||||
}),
|
||||
cfg({
|
||||
id: "seedance_1_0_lite",
|
||||
category: "video",
|
||||
info: {
|
||||
name: "Seedance 1.0 Lite",
|
||||
tauri_id: "seedance_1.0_lite",
|
||||
creator: mc.Bytedance,
|
||||
},
|
||||
description: "Fast and high-quality model",
|
||||
badges: [{ label: "2 min." }],
|
||||
capabilities: { maxGenerationCount: 1 },
|
||||
}),
|
||||
cfg({
|
||||
id: "veo_2",
|
||||
category: "video",
|
||||
info: { name: "Google Veo 2", tauri_id: "veo_2", creator: mc.Google },
|
||||
description: "Fast and high-quality model",
|
||||
badges: [{ label: "2 min." }],
|
||||
capabilities: { maxGenerationCount: 1 },
|
||||
}),
|
||||
];
|
||||
|
||||
// export const ALL_MODELS_BY_ID: Map<string, ModelConfig> = new Map(
|
||||
// ALL_MODELS.map((model) => [model.id, model])
|
||||
// );
|
||||
|
||||
export const getAllModels = (): ModelConfig[] => ALL_MODELS;
|
||||
|
||||
export const getModelsByCategory = (category: ModelCategory): ModelConfig[] =>
|
||||
ALL_MODELS.filter((m) => m.category === category);
|
||||
|
||||
export const getInstructiveImageEditModels = (): ModelConfig[] =>
|
||||
ALL_MODELS.filter(
|
||||
(m) => m.category === "image" && m.tags?.includes("instructiveEdit")
|
||||
);
|
||||
|
||||
export const getMaskedInpaintModels = (): ModelConfig[] =>
|
||||
ALL_MODELS.filter(
|
||||
(m) => m.category === "image" && m.tags?.includes(ModelTag.MaskedInpainting)
|
||||
);
|
||||
|
||||
export const lookupModelByTauriId = (
|
||||
tauriId: string
|
||||
): ModelConfig | undefined =>
|
||||
ALL_MODELS.find((m) => m.info.tauri_id === tauriId);
|
||||
|
||||
// Single exported capability resolver so callers never need to touch anything else
|
||||
export const getCapabilitiesForModel = (
|
||||
model?: Model
|
||||
): ModelCapabilities => {
|
||||
if (!model) return DEFAULT_CAPABILITIES;
|
||||
const cfg = lookupModelByTauriId(model.tauriId);
|
||||
return cfg?.capabilities ?? DEFAULT_CAPABILITIES;
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
/**
|
||||
* We might not want to always programatically build the list of models, because
|
||||
* we likely want to control the order of models in the UI to prioritize
|
||||
* more popular models. We may also want to selectively prune non-useful models.
|
||||
*/
|
||||
|
||||
// export const TEXT_TO_IMAGE_PAGE_MODELS : ModelConfig[] =
|
||||
// getModelsByCategory("image")
|
||||
// // Remove inpainting and editing models.
|
||||
// .filter((m) => m.id !== "flux_pro_inpaint")
|
||||
// .filter((m) => m.id !== "flux_pro_kontext_max");
|
||||
|
||||
// export const IMAGE_TO_VIDEO_PAGE_MODELS : ModelConfig[] =
|
||||
// getModelsByCategory("video");
|
||||
|
||||
// export const CANVAS_2D_PAGE_MODELS : ModelConfig[] =
|
||||
// getModelsByCategory("image")
|
||||
// // Remove non-instructive models.
|
||||
// .filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
|
||||
// export const STAGE_3D_PAGE_MODELS : ModelConfig[] =
|
||||
// getModelsByCategory("image")
|
||||
// // Remove non-instructive models.
|
||||
// .filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
|
||||
// export const IMAGE_EDITOR_PAGE_MODELS : ModelConfig[] = [
|
||||
// // Explicit list for now.
|
||||
// ALL_MODELS_BY_ID.get("flux_pro_inpaint")!,
|
||||
// ALL_MODELS_BY_ID.get("flux_dev_juggernaut_inpaint")!,
|
||||
// ALL_MODELS_BY_ID.get("flux_pro_kontext_max")!,
|
||||
// ];
|
||||
|
||||
// export const CANVAS_2D_PAGE_MODELS_NEW : ImageModel[] = IMAGE_MODELS
|
||||
// // Remove non-instructive models.
|
||||
// .filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
@@ -0,0 +1,5 @@
|
||||
import { IMAGE_MODELS } from "./ImageModels.js";
|
||||
import { VIDEO_MODELS } from "./VideoModels.js";
|
||||
import { Model } from "../classes/Model.js";
|
||||
|
||||
export const ALL_MODELS_LIST: Model[] = [...IMAGE_MODELS, ...VIDEO_MODELS];
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Model } from "../classes/Model.js";
|
||||
import { ALL_MODELS_LIST } from "./AllModels.js";
|
||||
|
||||
export const ALL_MODELS_BY_ID : Map<string, Model> = new Map(
|
||||
ALL_MODELS_LIST.map((model) => [model.id, model])
|
||||
);
|
||||
|
||||
if (ALL_MODELS_BY_ID.size !== ALL_MODELS_LIST.length) {
|
||||
throw new Error("All models must have unique IDs");
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
import { ImageModel } from "../classes/ImageModel.js";
|
||||
import { ModelCreator } from "../classes/metadata/ModelCreator.js";
|
||||
import { ModelTag } from "../classes/metadata/ModelTag.js";
|
||||
|
||||
export const IMAGE_MODELS: ImageModel[] = [
|
||||
new ImageModel({
|
||||
id: "midjourney",
|
||||
tauriId: "midjourney",
|
||||
fullName: "Midjourney",
|
||||
category: "image",
|
||||
creator: ModelCreator.Midjourney,
|
||||
selectorName: "Midjourney",
|
||||
selectorDescription: "Incredible style and quality",
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canUseImagePrompt: false,
|
||||
maxImagePromptCount: 6,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_pro_1_1_ultra",
|
||||
tauriId: "flux_pro_11_ultra",
|
||||
fullName: "Flux Pro 1.1 Ultra",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux Pro 1.1 Ultra",
|
||||
selectorDescription: "High quality model",
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canUseImagePrompt: true,
|
||||
maxImagePromptCount: 6,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_pro_1_1",
|
||||
tauriId: "flux_pro_11",
|
||||
fullName: "Flux Pro 1.1",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux Pro 1.1",
|
||||
selectorDescription: "High quality model",
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canUseImagePrompt: true,
|
||||
maxImagePromptCount: 6,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_1_dev",
|
||||
tauriId: "flux_1_dev",
|
||||
fullName: "Flux 1 Dev",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux 1 Dev",
|
||||
selectorDescription: "High quality model",
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canUseImagePrompt: true,
|
||||
maxImagePromptCount: 6,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_1_schnell",
|
||||
tauriId: "flux_1_schnell",
|
||||
fullName: "Flux 1 Schnell",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux 1 Schnell",
|
||||
selectorDescription: "High quality model",
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canUseImagePrompt: true,
|
||||
maxImagePromptCount: 6,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "gemini_25_flash",
|
||||
tauriId: "gemini_25_flash",
|
||||
fullName: "Gemini 2.5 Flash",
|
||||
category: "image",
|
||||
creator: ModelCreator.Google,
|
||||
selectorName: "Gemini 2.5 Flash",
|
||||
selectorDescription: "Ultra instructive model",
|
||||
selectorBadges: ["35 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 1,
|
||||
canEditImages: true,
|
||||
canUseImagePrompt: true,
|
||||
maxImagePromptCount: 6,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "gpt_image_1",
|
||||
tauriId: "gpt_image_1",
|
||||
fullName: "GPT Image 1 (GPT-4o)",
|
||||
category: "image",
|
||||
creator: ModelCreator.OpenAi,
|
||||
selectorName: "GPT Image 1 (GPT-4o)",
|
||||
selectorDescription: "Slow, ultra instructive model",
|
||||
selectorBadges: ["45 sec."],
|
||||
maxGenerationCount: 1,
|
||||
defaultGenerationCount: 1,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
canEditImages: true,
|
||||
canUseImagePrompt: true,
|
||||
maxImagePromptCount: 6,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_pro_kontext_max",
|
||||
tauriId: "flux_pro_kontext_max",
|
||||
fullName: "Flux Pro Kontext Max",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux Pro Kontext Max",
|
||||
selectorDescription: "Fast instructive editing",
|
||||
selectorBadges: ["20 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canEditImages: true,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_pro_inpaint",
|
||||
tauriId: "flux_pro_1",
|
||||
fullName: "Flux Pro Inpaint",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux Pro",
|
||||
selectorDescription: "Fast inpainting",
|
||||
selectorBadges: ["30 sec."],
|
||||
maxGenerationCount: 1, // NB: Fal only allows one image for some reason!
|
||||
defaultGenerationCount: 1, // NB: Fal only allows one image for some reason!
|
||||
canEditImages: true,
|
||||
usesInpaintingMask: true,
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_dev_juggernaut_inpaint",
|
||||
tauriId: "flux_dev_juggernaut",
|
||||
fullName: "Flux Dev Juggernaut Inpaint",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
selectorName: "Flux Dev Juggernaut",
|
||||
selectorDescription: "Fast inpainting",
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canEditImages: true,
|
||||
usesInpaintingMask: true,
|
||||
}),
|
||||
];
|
||||
|
||||
export const IMAGE_MODELS_BY_ID : Map<string, ImageModel> = new Map(
|
||||
IMAGE_MODELS.map((model) => [model.id, model])
|
||||
);
|
||||
|
||||
if (IMAGE_MODELS_BY_ID.size !== IMAGE_MODELS.length) {
|
||||
throw new Error("All image models must have unique IDs");
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import { VideoModel } from "../classes/VideoModel.js";
|
||||
import { ModelCreator } from "../classes/metadata/ModelCreator.js";
|
||||
|
||||
export const VIDEO_MODELS: VideoModel[] = [
|
||||
new VideoModel({
|
||||
id: "kling_1_6_pro",
|
||||
tauriId: "kling_1.6_pro",
|
||||
fullName: "Kling 1.6 Pro",
|
||||
category: "video",
|
||||
creator: ModelCreator.Kling,
|
||||
selectorName: "Kling 1.6 Pro",
|
||||
selectorDescription: "Fast video model",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: true,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "kling_2_1_pro",
|
||||
tauriId: "kling_2.1_pro",
|
||||
fullName: "Kling 2.1 Pro",
|
||||
category: "video",
|
||||
creator: ModelCreator.Kling,
|
||||
selectorName: "Kling 2.1 Pro",
|
||||
selectorDescription: "Fast video model",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: true,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "kling_2_1_master",
|
||||
tauriId: "kling_2.1_master",
|
||||
fullName: "Kling 2.1 Master",
|
||||
category: "video",
|
||||
creator: ModelCreator.Kling,
|
||||
selectorName: "Kling 2.1 Master",
|
||||
selectorDescription: "Fast video model",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: false,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "seedance_1_0_lite",
|
||||
tauriId: "seedance_1.0_lite",
|
||||
fullName: "Seedance 1.0 Lite",
|
||||
category: "video",
|
||||
creator: ModelCreator.Bytedance,
|
||||
selectorName: "Seedance 1.0 Lite",
|
||||
selectorDescription: "Fast video model",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: false,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "veo_2",
|
||||
tauriId: "veo_2",
|
||||
fullName: "Google Veo 2",
|
||||
category: "video",
|
||||
creator: ModelCreator.Google,
|
||||
selectorName: "Google Veo 2",
|
||||
selectorDescription: "Fast video model",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: false,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "veo_3",
|
||||
tauriId: "veo_3",
|
||||
fullName: "Google Veo 3",
|
||||
category: "video",
|
||||
creator: ModelCreator.Google,
|
||||
selectorName: "Google Veo 3",
|
||||
selectorDescription: "Slow, high-quality model",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: false,
|
||||
}),
|
||||
new VideoModel({
|
||||
id: "veo_3_fast",
|
||||
tauriId: "veo_3_fast",
|
||||
fullName: "Google Veo 3 Fast",
|
||||
category: "video",
|
||||
creator: ModelCreator.Google,
|
||||
selectorName: "Google Veo 3 Fast",
|
||||
selectorDescription: "High-quality model (faster)",
|
||||
selectorBadges: ["2 min."],
|
||||
startFrame: true,
|
||||
endFrame: false,
|
||||
}),
|
||||
];
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
|
||||
"emitDeclarationOnly": true,
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"types": [
|
||||
"node",
|
||||
"vite/client"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"references": [],
|
||||
"exclude": [
|
||||
"vite.config.ts",
|
||||
"vite.config.mts",
|
||||
"vitest.config.ts",
|
||||
"vitest.config.mts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.test.tsx",
|
||||
"src/**/*.spec.tsx",
|
||||
"src/**/*.test.js",
|
||||
"src/**/*.spec.js",
|
||||
"src/**/*.test.jsx",
|
||||
"src/**/*.spec.jsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/vitest",
|
||||
"types": [
|
||||
"vitest/globals",
|
||||
"vitest/importMeta",
|
||||
"vite/client",
|
||||
"node",
|
||||
"vitest"
|
||||
],
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"vite.config.mts",
|
||||
"vitest.config.ts",
|
||||
"vitest.config.mts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.test.tsx",
|
||||
"src/**/*.spec.tsx",
|
||||
"src/**/*.test.js",
|
||||
"src/**/*.spec.js",
|
||||
"src/**/*.test.jsx",
|
||||
"src/**/*.spec.jsx",
|
||||
"src/**/*.d.ts"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/// <reference types='vitest' />
|
||||
import { defineConfig } from 'vite';
|
||||
import dts from 'vite-plugin-dts';
|
||||
import * as path from 'path';
|
||||
|
||||
export default defineConfig(() => ({
|
||||
root: __dirname,
|
||||
cacheDir: '../../node_modules/.vite/libs/model-list',
|
||||
plugins: [dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
|
||||
// Uncomment this if you are using workers.
|
||||
// worker: {
|
||||
// plugins: [ nxViteTsPaths() ],
|
||||
// },
|
||||
// Configuration for building your library.
|
||||
// See: https://vitejs.dev/guide/build.html#library-mode
|
||||
build: {
|
||||
outDir: './dist',
|
||||
emptyOutDir: true,
|
||||
reportCompressedSize: true,
|
||||
commonjsOptions: {
|
||||
transformMixedEsModules: true,
|
||||
},
|
||||
lib: {
|
||||
// Could also be a dictionary or array of multiple entry points.
|
||||
entry: 'src/index.ts',
|
||||
name: '@frontend/model-list',
|
||||
fileName: 'index',
|
||||
// Change this to the formats you want to support.
|
||||
// Don't forget to update your package.json as well.
|
||||
formats: ['es' as const]
|
||||
},
|
||||
rollupOptions: {
|
||||
// External packages that should not be bundled into your library.
|
||||
external: []
|
||||
},
|
||||
},
|
||||
test: {
|
||||
watch: false,
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||
reporters: ['default'],
|
||||
coverage: {
|
||||
reportsDirectory: './test-output/vitest/coverage',
|
||||
provider: 'v8' as const,
|
||||
}
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user