mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
Add all inpainting models to 2D
This commit is contained in:
1 parent
62cd6b85ad
commit
a6ef02aa03
2 files changed
+32
-32
No files matched your search
@@ -575,7 +575,7 @@ const PageDraw = () => {
|
||||
page={PAGE_ID}
|
||||
panelTitle="Select Model"
|
||||
panelClassName="min-w-[300px]"
|
||||
buttonClassName="bg-transparent p-0 text-lg hover:bg-transparent text-white/80 hover:text-white"
|
||||
buttonClassName="bg-transparent p-0 text-lg hover:bg-transparent text-base-fg opacity-80 hover:opacity-100"
|
||||
showIconsInList
|
||||
triggerLabel="Model"
|
||||
/>
|
||||
|
||||
@@ -18,7 +18,7 @@ const buildItems = (
|
||||
models: Model[],
|
||||
fallbackIcon: any
|
||||
) =>
|
||||
models.map((model : Model) => ({
|
||||
models.map((model: Model) => ({
|
||||
label: model.selectorName,
|
||||
icon: withIcon(getCreatorIcon(model.creator), fallbackIcon),
|
||||
description: model.selectorDescription,
|
||||
@@ -33,14 +33,14 @@ const buildItems = (
|
||||
/**
|
||||
* IN-PROGRESS MIGRATION (messy for now)
|
||||
* We're gradually going to phase out ModelList, ModelConfig, etc.
|
||||
* We won't index by name, but rather id, or simply will always have full
|
||||
* We won't index by name, but rather id, or simply will always have full
|
||||
* access to the object directly.
|
||||
*/
|
||||
*/
|
||||
|
||||
export const TEXT_TO_IMAGE_PAGE_MODEL_LIST : ModelList =
|
||||
export const TEXT_TO_IMAGE_PAGE_MODEL_LIST: ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
(function (): Model[] {
|
||||
const set: Set<Model> = new Set();
|
||||
IMAGE_MODELS
|
||||
.filter((model) => model.canTextToImage)
|
||||
.forEach((m) => set.add(m));
|
||||
@@ -51,10 +51,24 @@ export const TEXT_TO_IMAGE_PAGE_MODEL_LIST : ModelList =
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
|
||||
export const CANVAS_2D_PAGE_MODEL_LIST : ModelList =
|
||||
export const CANVAS_2D_PAGE_MODEL_LIST: ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
(function (): Model[] {
|
||||
const set: Set<Model> = new Set();
|
||||
IMAGE_MODELS
|
||||
.filter((m) => m.canEditImages || m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
.forEach((m) => set.add(m));
|
||||
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 STAGE_3D_PAGE_MODEL_LIST: ModelList =
|
||||
buildItems(
|
||||
(function (): Model[] {
|
||||
const set: Set<Model> = new Set();
|
||||
IMAGE_MODELS
|
||||
.filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
.forEach((m) => set.add(m));
|
||||
@@ -65,29 +79,15 @@ export const CANVAS_2D_PAGE_MODEL_LIST : ModelList =
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
|
||||
export const STAGE_3D_PAGE_MODEL_LIST : ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
IMAGE_MODELS
|
||||
.filter((m) => m.tags?.includes(ModelTag.InstructiveEdit))
|
||||
.forEach((m) => set.add(m));
|
||||
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_EDITOR_PAGE_MODEL_LIST : ModelList =
|
||||
export const IMAGE_EDITOR_PAGE_MODEL_LIST: ModelList =
|
||||
buildItems(
|
||||
//[
|
||||
// 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")!,
|
||||
//],
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
(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.canEditImages)
|
||||
@@ -99,14 +99,14 @@ export const IMAGE_EDITOR_PAGE_MODEL_LIST : ModelList =
|
||||
<FontAwesomeIcon icon={faImage} className="h-4 w-4" />
|
||||
);
|
||||
|
||||
export const IMAGE_TO_VIDEO_PAGE_MODEL_LIST : ModelList =
|
||||
export const IMAGE_TO_VIDEO_PAGE_MODEL_LIST: ModelList =
|
||||
buildItems(
|
||||
(function() : Model[] {
|
||||
const set : Set<Model> = new Set();
|
||||
VIDEO_MODELS.forEach((m) => set.add(m));
|
||||
(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" />
|
||||
);
|
||||
);
|
||||
Reference in new issue
Block a user