mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-20 17:02:53 -04:00
670 lines
20 KiB
TypeScript
670 lines
20 KiB
TypeScript
import { GenerationProvider } from "@storyteller/api-enums";
|
|
import { ImageModel } from "../classes/ImageModel.js";
|
|
import { ModelCreator } from "../classes/metadata/ModelCreator.js";
|
|
import { ModelTag } from "../classes/metadata/ModelTag.js";
|
|
import { CommonAspectRatio } from "../classes/properties/CommonAspectRatio.js";
|
|
import { CommonResolution } from "../classes/properties/CommonResolution.js";
|
|
import { CommonQuality } from "../classes/properties/CommonQuality.js";
|
|
|
|
// TODO: Some of the model configs, such as generation counts, are authoritatively controlled in `legacy/Models.ts`
|
|
|
|
export const IMAGE_MODELS: ImageModel[] = [
|
|
new ImageModel({
|
|
id: "grok_image",
|
|
tauriId: "grok_imagine_image",
|
|
fullName: "Grok",
|
|
category: "image",
|
|
creator: ModelCreator.Grok,
|
|
providers: [GenerationProvider.Artcraft],
|
|
selectorName: "Grok",
|
|
selectorDescription: "Fast af",
|
|
selectorBadges: ["10 sec."],
|
|
// NB: Grok only supports 6 images at a time
|
|
defaultGenerationCount: 6,
|
|
maxGenerationCount: 6,
|
|
predefinedGenerationCounts: [6],
|
|
canUseImagePrompt: false,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 10000,
|
|
maxPromptLength: 8000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.Square,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.WideThreeByTwo,
|
|
CommonAspectRatio.TallTwoByThree,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "midjourney",
|
|
tauriId: "midjourney",
|
|
fullName: "Midjourney",
|
|
category: "image",
|
|
creator: ModelCreator.Midjourney,
|
|
providers: [GenerationProvider.Midjourney, GenerationProvider.Artcraft],
|
|
selectorName: "Midjourney",
|
|
selectorDescription: "Stunning style and quality",
|
|
selectorBadges: ["45 sec."],
|
|
// NB: Midjourney only supports 4 images at a time
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 4,
|
|
predefinedGenerationCounts: [4],
|
|
canUseImagePrompt: false,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 45000,
|
|
maxPromptLength: 6000,
|
|
canChangeAspectRatio: true,
|
|
// TODO: Rust client doesn't support aspect ratios for MidJourney yet.
|
|
}),
|
|
new ImageModel({
|
|
id: "flux_pro_1_1_ultra",
|
|
tauriId: "flux_pro_1p1_ultra",
|
|
fullName: "Flux Pro 1.1 Ultra",
|
|
category: "image",
|
|
creator: ModelCreator.BlackForestLabs,
|
|
selectorName: "Flux Pro 1.1 Ultra",
|
|
selectorDescription: "Higher quality model",
|
|
selectorBadges: ["35 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 4,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 35000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.Square,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.WideThreeByTwo,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.WideTwentyOneByNine,
|
|
CommonAspectRatio.TallTwoByThree,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
CommonAspectRatio.TallNineByTwentyOne,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "flux_pro_1_1",
|
|
tauriId: "flux_pro_1p1",
|
|
fullName: "Flux Pro 1.1",
|
|
category: "image",
|
|
creator: ModelCreator.BlackForestLabs,
|
|
selectorName: "Flux Pro 1.1",
|
|
selectorDescription: "High quality model",
|
|
selectorBadges: ["10 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 4,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 10000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.Square,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "flux_1_dev",
|
|
tauriId: "flux_1_dev",
|
|
fullName: "Flux 1 Dev",
|
|
category: "image",
|
|
creator: ModelCreator.BlackForestLabs,
|
|
providers: [
|
|
GenerationProvider.Artcraft,
|
|
GenerationProvider.Fal,
|
|
],
|
|
selectorName: "Flux 1 Dev",
|
|
selectorDescription: "Fast, but lower quality",
|
|
selectorBadges: ["10 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 4,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 10000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.Square,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "flux_1_schnell",
|
|
tauriId: "flux_1_schnell",
|
|
fullName: "Flux 1 Schnell",
|
|
category: "image",
|
|
creator: ModelCreator.BlackForestLabs,
|
|
providers: [
|
|
GenerationProvider.Artcraft,
|
|
GenerationProvider.Fal,
|
|
],
|
|
selectorName: "Flux 1 Schnell",
|
|
selectorDescription: "Fastest image gen, but lowest quality",
|
|
selectorBadges: ["10 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 4,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 10000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.Square,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "nano_banana",
|
|
tauriId: "nano_banana",
|
|
fullName: "Nano Banana",
|
|
category: "image",
|
|
creator: ModelCreator.Google,
|
|
selectorName: "Nano Banana",
|
|
selectorDescription: "Fast instructive editing",
|
|
selectorBadges: ["25 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
canTextToImage: true,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
progressBarTime: 25000,
|
|
maxPromptLength: Infinity,
|
|
// canChangeResolution: true,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.WideFiveByFour,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideThreeByTwo,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.WideTwentyOneByNine,
|
|
CommonAspectRatio.TallFourByFive,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallTwoByThree,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "nano_banana_2",
|
|
tauriId: "nano_banana_2",
|
|
fullName: "Nano Banana 2",
|
|
category: "image",
|
|
creator: ModelCreator.Google,
|
|
providers: [
|
|
GenerationProvider.Artcraft,
|
|
GenerationProvider.Fal,
|
|
],
|
|
selectorName: "Nano Banana 2",
|
|
selectorDescription: "Fast instructive editing",
|
|
selectorBadges: ["25 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
canTextToImage: true,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
progressBarTime: 25000,
|
|
maxPromptLength: Infinity,
|
|
canChangeResolution: true,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.WideFiveByFour,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideThreeByTwo,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.WideTwentyOneByNine,
|
|
CommonAspectRatio.TallFourByFive,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallTwoByThree,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
resolutions: [
|
|
CommonResolution.OneK,
|
|
CommonResolution.TwoK,
|
|
CommonResolution.FourK,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "nano_banana_pro",
|
|
tauriId: "nano_banana_pro",
|
|
fullName: "Nano Banana Pro",
|
|
category: "image",
|
|
creator: ModelCreator.Google,
|
|
providers: [
|
|
GenerationProvider.Artcraft,
|
|
GenerationProvider.Fal,
|
|
],
|
|
selectorName: "Nano Banana Pro",
|
|
selectorDescription: "Powerful instructive editing",
|
|
selectorBadges: ["30 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 4,
|
|
canTextToImage: true,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
progressBarTime: 25000,
|
|
maxPromptLength: Infinity,
|
|
canChangeResolution: true,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.WideFiveByFour,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideThreeByTwo,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.WideTwentyOneByNine,
|
|
CommonAspectRatio.TallFourByFive,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallTwoByThree,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
resolutions: [
|
|
CommonResolution.OneK,
|
|
CommonResolution.TwoK,
|
|
CommonResolution.FourK,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "gpt_image_1",
|
|
tauriId: "gpt_image_1",
|
|
fullName: "GPT Image 1 (GPT-4o)",
|
|
category: "image",
|
|
creator: ModelCreator.OpenAi,
|
|
providers: [GenerationProvider.Artcraft],
|
|
selectorName: "GPT Image 1 (GPT-4o)",
|
|
selectorDescription: "Slow, but super smart",
|
|
selectorBadges: ["60 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 60000,
|
|
maxPromptLength: Infinity,
|
|
canChangeAspectRatio: true,
|
|
defaultQuality: CommonQuality.High,
|
|
qualityOptions: [
|
|
CommonQuality.High,
|
|
CommonQuality.Medium,
|
|
CommonQuality.Low,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "gpt_image_1p5",
|
|
tauriId: "gpt_image_1p5",
|
|
fullName: "GPT Image 1.5",
|
|
category: "image",
|
|
creator: ModelCreator.OpenAi,
|
|
selectorName: "GPT Image 1.5",
|
|
selectorDescription: "Faster, improved",
|
|
selectorBadges: ["60 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 60000,
|
|
maxPromptLength: Infinity,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.Square,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.Wide,
|
|
CommonAspectRatio.Tall,
|
|
],
|
|
defaultQuality: CommonQuality.High,
|
|
qualityOptions: [
|
|
CommonQuality.High,
|
|
CommonQuality.Medium,
|
|
CommonQuality.Low,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "gpt_image_2",
|
|
tauriId: "gpt_image_2",
|
|
fullName: "GPT Image 2",
|
|
category: "image",
|
|
creator: ModelCreator.OpenAi,
|
|
selectorName: "GPT Image 2",
|
|
selectorDescription: "Smart with great text support",
|
|
selectorBadges: ["2 min."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 120000,
|
|
maxPromptLength: Infinity,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
],
|
|
defaultQuality: CommonQuality.High,
|
|
qualityOptions: [
|
|
CommonQuality.High,
|
|
CommonQuality.Medium,
|
|
CommonQuality.Low,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "gpt_image_2p5_flare",
|
|
tauriId: "gpt_image_2p5_flare",
|
|
fullName: "GPT Image 2.5 Flare",
|
|
category: "image",
|
|
creator: ModelCreator.OpenAi,
|
|
selectorName: "GPT Image 2.5 Flare",
|
|
selectorDescription: "Precise edits, keeps subjects intact",
|
|
selectorBadges: ["60 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 60000,
|
|
maxPromptLength: Infinity,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
],
|
|
defaultQuality: CommonQuality.High,
|
|
qualityOptions: [
|
|
CommonQuality.High,
|
|
CommonQuality.Medium,
|
|
CommonQuality.Low,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "gpt_image_2p5_sunburst",
|
|
tauriId: "gpt_image_2p5_sunburst",
|
|
fullName: "GPT Image 2.5 Sunburst",
|
|
category: "image",
|
|
creator: ModelCreator.OpenAi,
|
|
selectorName: "GPT Image 2.5 Sunburst",
|
|
selectorDescription: "Premium detail, slower",
|
|
selectorBadges: ["2 min."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 120000,
|
|
maxPromptLength: Infinity,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
],
|
|
defaultQuality: CommonQuality.High,
|
|
qualityOptions: [
|
|
CommonQuality.High,
|
|
CommonQuality.Medium,
|
|
CommonQuality.Low,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "seedream_4",
|
|
tauriId: "seedream_4",
|
|
fullName: "Seedream 4",
|
|
category: "image",
|
|
creator: ModelCreator.Bytedance,
|
|
selectorName: "Seedream 4",
|
|
selectorDescription: "Fast",
|
|
selectorBadges: ["60 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 60000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto2k,
|
|
CommonAspectRatio.Auto4k,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "seedream_4p5",
|
|
tauriId: "seedream_4p5",
|
|
fullName: "Seedream 4.5",
|
|
category: "image",
|
|
creator: ModelCreator.Bytedance,
|
|
selectorName: "Seedream 4.5",
|
|
selectorDescription: "Fast",
|
|
selectorBadges: ["60 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 60000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto2k,
|
|
CommonAspectRatio.Auto4k,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "seedream_5_lite",
|
|
tauriId: "seedream_5_lite",
|
|
fullName: "Seedream 5 Lite",
|
|
category: "image",
|
|
creator: ModelCreator.Bytedance,
|
|
selectorName: "Seedream 5 Lite",
|
|
selectorDescription: "Fast",
|
|
selectorBadges: ["60 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
canEditImages: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 6,
|
|
progressBarTime: 60000,
|
|
maxPromptLength: 4000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.WideSixteenByNine,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Auto2k,
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "qwen_edit_2511_angles",
|
|
tauriId: "qwen_edit_2511_angles",
|
|
fullName: "Qwen Edit 2511 Angles",
|
|
category: "image",
|
|
creator: ModelCreator.Alibaba,
|
|
selectorName: "Qwen Edit 2511 Angles",
|
|
selectorDescription: "Angle manipulation with optional prompt",
|
|
selectorBadges: ["30 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
maxPromptLength: 800,
|
|
canTextToImage: false,
|
|
canEditImages: false,
|
|
canEditAngles: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 1,
|
|
progressBarTime: 30000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.SquareHd,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
new ImageModel({
|
|
id: "flux_2_lora_angles",
|
|
tauriId: "flux_2_lora_angles",
|
|
fullName: "Flux 2 LoRA Angles",
|
|
category: "image",
|
|
creator: ModelCreator.BlackForestLabs,
|
|
selectorName: "Flux 2 LoRA Angles",
|
|
selectorDescription: "Angle manipulation",
|
|
selectorBadges: ["30 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 1,
|
|
maxPromptLength: 4000,
|
|
canTextToImage: false,
|
|
canEditImages: false,
|
|
canEditAngles: true,
|
|
canUseImagePrompt: true,
|
|
maxImagePromptCount: 1,
|
|
progressBarTime: 30000,
|
|
canChangeAspectRatio: true,
|
|
defaultAspectRatio: CommonAspectRatio.SquareHd,
|
|
aspectRatios: [
|
|
CommonAspectRatio.Square,
|
|
CommonAspectRatio.SquareHd,
|
|
CommonAspectRatio.WideFourByThree,
|
|
CommonAspectRatio.WideSixteenByNine,
|
|
CommonAspectRatio.TallThreeByFour,
|
|
CommonAspectRatio.TallNineBySixteen,
|
|
],
|
|
}),
|
|
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,
|
|
maxPromptLength: 4000,
|
|
canEditImages: true,
|
|
canTextToImage: false,
|
|
tags: [ModelTag.InstructiveEdit],
|
|
progressBarTime: 20000,
|
|
canChangeAspectRatio: true,
|
|
}),
|
|
new ImageModel({
|
|
id: "flux_pro_inpaint",
|
|
tauriId: "flux_pro_1",
|
|
fullName: "Flux Pro Inpaint",
|
|
category: "image",
|
|
creator: ModelCreator.BlackForestLabs,
|
|
selectorName: "Flux Pro (Inpainting)",
|
|
selectorDescription: "Fast inpainting",
|
|
selectorBadges: ["30 sec."],
|
|
maxGenerationCount: 1, // NB: Fal only allows one image for some reason!
|
|
maxPromptLength: 4000,
|
|
defaultGenerationCount: 1, // NB: Fal only allows one image for some reason!
|
|
canEditImages: true,
|
|
usesInpaintingMask: true,
|
|
editingIsInpainting: true,
|
|
canTextToImage: false,
|
|
progressBarTime: 30000,
|
|
canChangeAspectRatio: 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, low quality",
|
|
selectorBadges: ["10 sec."],
|
|
maxGenerationCount: 4,
|
|
defaultGenerationCount: 4,
|
|
maxPromptLength: 4000,
|
|
canEditImages: true,
|
|
usesInpaintingMask: true,
|
|
editingIsInpainting: true,
|
|
canTextToImage: false,
|
|
progressBarTime: 10000,
|
|
canChangeAspectRatio: 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");
|
|
}
|