Compare commits

...
Author SHA1 Message Date
Brandon Thomas 201bd12834 Add Nano Banana 2 and Seedream 5 Lite to Tauri 2026-03-04 09:53:04 -05:00
Brandon Thomas 430d1c2135 add models to tauri 2026-03-04 09:40:19 -05:00
6 changed files with 117 additions and 1 deletions
@@ -3,5 +3,15 @@
// In the future, we should use code gen (protobufs or similar) to keep the two sides in sync.
export enum CommonImageModel {
Flux1Dev = "flux_1_dev",
Flux1Schnell = "flux_1_schnell",
FluxPro11 = "flux_pro_1p1",
FluxPro11Ultra = "flux_pro_1p1_ultra",
GptImage1p5 = "gpt_image_1p5",
NanaBanana = "nano_banana",
NanaBanana2 = "nano_banana_2",
NanaBananaPro = "nano_banana_pro",
Seedream4 = "seedream_4",
Seedream4p5 = "seedream_4p5",
Seedream5Lite = "seedream_5_lite",
}
@@ -32,6 +32,9 @@
{
"path": "../button"
},
{
"path": "../tooltip"
},
{
"path": "../modal"
},
@@ -73,6 +73,9 @@
{
"path": "../button/tsconfig.lib.json"
},
{
"path": "../tooltip/tsconfig.lib.json"
},
{
"path": "../modal/tsconfig.lib.json"
}
@@ -6,8 +6,28 @@ export function imageModelToCommonImageModel(
tauriId: string,
): CommonImageModel | null {
switch (tauriId) {
case "flux_1_dev":
return CommonImageModel.Flux1Dev;
case "flux_1_schnell":
return CommonImageModel.Flux1Schnell;
case "flux_pro_11":
return CommonImageModel.FluxPro11;
case "flux_pro_11_ultra":
return CommonImageModel.FluxPro11Ultra;
case "gpt_image_1p5":
return CommonImageModel.GptImage1p5;
case "nano_banana":
return CommonImageModel.NanaBanana;
case "nano_banana_2":
return CommonImageModel.NanaBanana2;
case "nano_banana_pro":
return CommonImageModel.NanaBananaPro;
case "seedream_4":
return CommonImageModel.Seedream4;
case "seedream_4p5":
return CommonImageModel.Seedream4p5;
case "seedream_5_lite":
return CommonImageModel.Seedream5Lite;
default:
return null;
}
@@ -236,7 +236,20 @@ export function CostBreakdownModal({ activeTabId }: CostBreakdownModalProps) {
const pageName = getPageName();
// Models that have credit cost data available
const MODELS_WITH_COST_DATA = new Set(["seedance_2p0", "nano_banana_pro"]);
const MODELS_WITH_COST_DATA = new Set([
"flux_1_dev",
"flux_1_schnell",
"flux_pro_11",
"flux_pro_11_ultra",
"gpt_image_1p5",
"nano_banana",
"nano_banana_2",
"nano_banana_pro",
"seedream_4",
"seedream_4p5",
"seedream_5_lite",
"seedance_2p0",
]);
const hasCostData =
selectedModel != null && MODELS_WITH_COST_DATA.has(selectedModel.id);
@@ -193,6 +193,45 @@ export const IMAGE_MODELS: ImageModel[] = [
CommonAspectRatio.TallNineBySixteen,
]
}),
new ImageModel({
id: "nano_banana_2",
tauriId: "nano_banana_2",
fullName: "Nano Banana 2",
category: "image",
creator: ModelCreator.Google,
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,
canChangeResolution: true,
canChangeAspectRatio: true,
defaultAspectRatio: CommonAspectRatio.Square,
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",
@@ -336,6 +375,34 @@ export const IMAGE_MODELS: ImageModel[] = [
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,
canChangeAspectRatio: true,
defaultAspectRatio: CommonAspectRatio.SquareHd,
aspectRatios: [
CommonAspectRatio.Auto2k,
CommonAspectRatio.Square,
CommonAspectRatio.SquareHd,
CommonAspectRatio.WideFourByThree,
CommonAspectRatio.WideSixteenByNine,
CommonAspectRatio.TallThreeByFour,
CommonAspectRatio.TallNineBySixteen,
]
}),
new ImageModel({
id: "flux_pro_kontext_max",
tauriId: "flux_pro_kontext_max",