mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-02 16:38:14 +00:00
fix the model list, wrong tauri ids, new feature predicate (#798)
This commit is contained in:
1 parent
801886d7a8
commit
30634e8be9
3 files changed
+19
-7
No files matched your search
@@ -48,11 +48,12 @@ export const STAGE_3D_PAGE_MODEL_LIST : ModelList = buildItems2(
|
||||
);
|
||||
|
||||
export const IMAGE_EDITOR_PAGE_MODEL_LIST : ModelList = buildItems2(
|
||||
[
|
||||
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")!,
|
||||
],
|
||||
//[
|
||||
// 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")!,
|
||||
//],
|
||||
IMAGE_MODELS.filter((m) => m.canEditImages),
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
|
||||
|
||||
@@ -4,9 +4,15 @@ import { ModelCategory } from "../legacy/ModelConfig.js";
|
||||
import { ModelTag } from "./metadata/ModelTag.js";
|
||||
|
||||
export class ImageModel extends 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;
|
||||
|
||||
@@ -21,6 +27,7 @@ export class ImageModel extends Model {
|
||||
selectorBadges: string[];
|
||||
maxGenerationCount: number;
|
||||
defaultGenerationCount: number;
|
||||
canEditImages?: boolean;
|
||||
usesInpaintingMask?: boolean;
|
||||
tags?: ModelTag[];
|
||||
}) {
|
||||
@@ -36,6 +43,7 @@ export class ImageModel extends Model {
|
||||
super(args);
|
||||
this.maxGenerationCount = args.maxGenerationCount;
|
||||
this.defaultGenerationCount = args.defaultGenerationCount;
|
||||
this.canEditImages = args.canEditImages ?? false;
|
||||
this.usesInpaintingMask = args.usesInpaintingMask ?? false;
|
||||
}
|
||||
}
|
||||
@@ -87,11 +87,12 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
selectorBadges: ["20 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canEditImages: true,
|
||||
tags: [ModelTag.InstructiveEdit],
|
||||
}),
|
||||
new ImageModel({
|
||||
id: "flux_pro_inpaint",
|
||||
tauriId: "flux_pro_inpaint",
|
||||
tauriId: "flux_pro_1",
|
||||
fullName: "Flux Pro Inpaint",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
@@ -100,11 +101,12 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
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_inpaint",
|
||||
tauriId: "flux_dev_juggernaut",
|
||||
fullName: "Flux Dev Juggernaut Inpaint",
|
||||
category: "image",
|
||||
creator: ModelCreator.BlackForestLabs,
|
||||
@@ -113,6 +115,7 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
selectorBadges: ["15 sec."],
|
||||
maxGenerationCount: 4,
|
||||
defaultGenerationCount: 4,
|
||||
canEditImages: true,
|
||||
usesInpaintingMask: true,
|
||||
}),
|
||||
];
|
||||
Reference in new issue
Block a user