mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-12 21:02:14 +00:00
sort model lists
This commit is contained in:
1 parent
2e2c433ffe
commit
fdc14a4acf
4 files changed
+21
-49
No files matched your search
@@ -41,13 +41,12 @@ export const TEXT_TO_IMAGE_PAGE_MODEL_LIST : ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
set.add(IMAGE_MODELS_BY_ID.get("flux_pro_1_1")!); // Don't put Midjourney first!
|
||||
IMAGE_MODELS
|
||||
.filter((model) => model.canTextToImage)
|
||||
//.filter((model) => !model.usesInpaintingMask) // We can't use masked inpainting models here
|
||||
//.filter((model) => model.id !== "flux_pro_kontext_max") // NB: Flux Pro Kontext Max requires an input image
|
||||
.forEach((m) => set.add(m));
|
||||
return Array.from(set);
|
||||
const list = Array.from(set);
|
||||
list.sort((a, b) => a.selectorName?.localeCompare(b.selectorName));
|
||||
return list;
|
||||
})(),
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
@@ -56,11 +55,12 @@ export const CANVAS_2D_PAGE_MODEL_LIST : ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
set.add(IMAGE_MODELS_BY_ID.get("gpt_image_1")!); // Place gpt_image_1 first.
|
||||
IMAGE_MODELS
|
||||
.filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
.forEach((m) => set.add(m));
|
||||
return Array.from(set);
|
||||
const list = Array.from(set);
|
||||
list.sort((a, b) => a.selectorName?.localeCompare(b.selectorName));
|
||||
return list;
|
||||
})(),
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
@@ -69,11 +69,12 @@ export const STAGE_3D_PAGE_MODEL_LIST : ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
set.add(IMAGE_MODELS_BY_ID.get("gpt_image_1")!); // Place gpt_image_1 first.
|
||||
IMAGE_MODELS
|
||||
.filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
.forEach((m) => set.add(m));
|
||||
return Array.from(set);
|
||||
const list = Array.from(set);
|
||||
list.sort((a, b) => a.selectorName?.localeCompare(b.selectorName));
|
||||
return list;
|
||||
})(),
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
@@ -91,13 +92,21 @@ export const IMAGE_EDITOR_PAGE_MODEL_LIST : ModelList =
|
||||
IMAGE_MODELS
|
||||
.filter((m) => m.canEditImages)
|
||||
.forEach((m) => set.add(m));
|
||||
return Array.from(set);
|
||||
const list = Array.from(set);
|
||||
list.sort((a, b) => a.selectorName?.localeCompare(b.selectorName));
|
||||
return list;
|
||||
})(),
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
|
||||
export const IMAGE_TO_VIDEO_PAGE_MODEL_LIST : ModelList =
|
||||
buildItems(
|
||||
VIDEO_MODELS,
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
VIDEO_MODELS.forEach((m) => set.add(m));
|
||||
const list = Array.from(set);
|
||||
list.sort((a, b) => a.selectorName?.localeCompare(b.selectorName));
|
||||
return list;
|
||||
})(),
|
||||
<FontAwesomeIcon icon={faFilm} className="h-4 w-4" />
|
||||
);
|
||||
@@ -10,7 +10,6 @@ export * from "./lib/classes/metadata/SizeOption.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";
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
|
||||
/**
|
||||
* 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))
|
||||
@@ -273,7 +273,7 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
tauriId: "seedream_4",
|
||||
fullName: "Seedream 4",
|
||||
category: "image",
|
||||
creator: ModelCreator.OpenAi,
|
||||
creator: ModelCreator.Bytedance,
|
||||
selectorName: "Seedream 4",
|
||||
selectorDescription: "Fast",
|
||||
selectorBadges: ["60 sec."],
|
||||
@@ -302,7 +302,7 @@ export const IMAGE_MODELS: ImageModel[] = [
|
||||
tauriId: "seedream_4p5",
|
||||
fullName: "Seedream 4.5",
|
||||
category: "image",
|
||||
creator: ModelCreator.OpenAi,
|
||||
creator: ModelCreator.Bytedance,
|
||||
selectorName: "Seedream 4.5",
|
||||
selectorDescription: "Fast",
|
||||
selectorBadges: ["60 sec."],
|
||||
|
||||
Reference in new issue
Block a user