Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Refine image editor controls and model tools

Bitti54dca0d7fc54
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 26d1da5..27b81fc 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -26,6 +26,8 @@ This alpha update adds Prompt video scenes, agent image drafts, Sol attention an
## Fixes and improvements
+- Renamed the Generator settings section to Generators. Refined the lasso icon and integrated the image Generate arrow into one split control. Count help now appears on the label tooltip. Model capabilities disable Object, Text, Group and Background creation for MiniMax H3 while keeping them available for MOSS and Fibo; existing image edits retain Edit Box and Lasso.
+
- First/Last Frame now uses Winnougan's FL2VA W4A8 fallback. Saved fallback selections migrate to the correct model; References retains its REF2VA fallback.
- FastH3 Omni always downloads its Omni transformer. Removed its inherited W4A8 fallback and migrate saved selections to Omni, reusing an existing Omni download when available.
diff --git a/src/components/SettingsView.test.tsx b/src/components/SettingsView.test.tsx
index 24bd7c0..80b6283 100644
--- a/src/components/SettingsView.test.tsx
+++ b/src/components/SettingsView.test.tsx
@@ -50,8 +50,8 @@ describe("the settings page", () => {
render(<SettingsView onClose={onClose} />);
expect(document.activeElement).toBe(screen.getByRole("main", { name: "Settings" }));
expect(screen.queryByRole("dialog")).toBeNull();
- expect(screen.getByRole("heading", { level: 1, name: "Generator" })).toBeTruthy();
- expect(tab("Generator").getAttribute("aria-current")).toBe("page");
+ expect(screen.getByRole("heading", { level: 1, name: "Generators" })).toBeTruthy();
+ expect(tab("Generators").getAttribute("aria-current")).toBe("page");
fireEvent.click(screen.getByRole("button", { name: "Back" }));
expect(onClose).toHaveBeenCalledOnce();
});
@@ -285,7 +285,7 @@ describe("the settings screen", () => {
it("opens on the engine, because that is what has to be set before anything renders", async () => {
open();
- expect(tab("Generator").getAttribute("aria-current")).toBe("page");
+ expect(tab("Generators").getAttribute("aria-current")).toBe("page");
expect(screen.getByRole("heading", { name: "Generators" })).toBeTruthy();
expect(screen.queryByRole("group", { name: "Transformer weights" })).toBeNull();
editDefaultGenerator();
@@ -315,7 +315,7 @@ describe("the settings screen", () => {
open();
const items = within(screen.getByRole("navigation", { name: "Settings sections" })).getAllByRole("button").filter((item) => item.id.startsWith("settings-tab-"));
expect(items.map((item) => item.textContent?.replace(/\d+$/, ""))).toEqual([
- "Generator", "Workers", "Agents", "Appearance", "Diagnostics", "Updates",
+ "Generators", "Workers", "Agents", "Appearance", "Diagnostics", "Updates",
]);
fireEvent.click(tab("Appearance"));
expect(combo("App theme")).toBeTruthy();
@@ -327,18 +327,18 @@ describe("the settings screen", () => {
fireEvent.keyDown(tab("Diagnostics"), { key: "ArrowUp" });
expect(tab("Appearance").getAttribute("aria-current")).toBe("page");
fireEvent.keyDown(tab("Appearance"), { key: "Home" });
- expect(document.activeElement).toBe(tab("Generator"));
- fireEvent.keyDown(tab("Generator"), { key: "End" });
+ expect(document.activeElement).toBe(tab("Generators"));
+ fireEvent.keyDown(tab("Generators"), { key: "End" });
expect(document.activeElement).toBe(tab("Updates"));
});
it("counts the paths still to set on the Generator item, from any section", () => {
open();
// Four of the five fields are required and none is set yet.
- expect(within(tab("Generator")).getByText("4")).toBeTruthy();
- expect(tab("Generator").getAttribute("aria-label")).toBe("Generator, 4 model paths to set");
+ expect(within(tab("Generators")).getByText("4")).toBeTruthy();
+ expect(tab("Generators").getAttribute("aria-label")).toBe("Generators, 4 model paths to set");
fireEvent.click(tab("Appearance"));
- expect(within(tab("Generator")).getByText("4")).toBeTruthy();
+ expect(within(tab("Generators")).getByText("4")).toBeTruthy();
});
it("keeps the settings copy short", () => {
diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsx
index ebed5a9..8f4dd89 100644
--- a/src/components/SettingsView.tsx
+++ b/src/components/SettingsView.tsx
@@ -261,7 +261,7 @@ function DiagnosticsSetting({ desktop, status, onBackendChange }: { desktop: boo
/* --- The page ------------------------------------------------------------------------ */
const TABS = [
- { id: "engine", label: "Generator", icon: Video16, selectedIcon: Video16Filled },
+ { id: "engine", label: "Generators", icon: Video16, selectedIcon: Video16Filled },
{ id: "workers", label: "Workers", icon: Worker16, selectedIcon: Worker16Filled },
{ id: "llms", label: "Agents", icon: Agent16, selectedIcon: Agent16Filled },
{ id: "appearance", label: "Appearance", icon: Palette16, selectedIcon: Palette16Filled },
diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx
index feaeba5..bcc6191 100644
--- a/src/components/ui/icons.tsx
+++ b/src/components/ui/icons.tsx
@@ -112,7 +112,6 @@ import { Filmstrip16Regular, Filmstrip20Regular } from "@fluentui/react-icons/he
import { FolderOpen16Regular, FolderOpen28Regular } from "@fluentui/react-icons/headless/svg/folder-open";
import { Group20Filled, Group20Regular } from "@fluentui/react-icons/headless/svg/group";
import { Image16Regular, Image24Regular } from "@fluentui/react-icons/headless/svg/image";
-import { Lasso20Regular } from "@fluentui/react-icons/headless/svg/lasso";
import { ImageAdd20Regular } from "@fluentui/react-icons/headless/svg/image-add";
import { LockClosed16Filled } from "@fluentui/react-icons/headless/svg/lock-closed";
import { LockOpen16Regular } from "@fluentui/react-icons/headless/svg/lock-open";
@@ -164,7 +163,12 @@ export const Image12 = /*#__PURE__*/ scaled(Image16Regular, 12);
export const Image22 = /*#__PURE__*/ scaled(Image24Regular, 22);
export const ImageAdd14 = /*#__PURE__*/ scaled(ImageAdd20Regular, 14);
export const ImageAdd16 = /*#__PURE__*/ scaled(ImageAdd20Regular, 16);
-export const Lasso16 = /*#__PURE__*/ scaled(Lasso20Regular, 16);
+/** The rope leaves the loop at its lower-right edge on a 45-degree diagonal. */
+export const Lasso16 = ({ className, ...props }: FluentIconsProps) => <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"
+ {...props} className={`ui-icon--16${className ? ` ${className}` : ""}`} fill="none" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" strokeLinejoin="round">
+ <circle cx="6.5" cy="6.5" r="4.75" />
+ <path d="m9.86 9.86 2.39 2.39c1.75 1.75 2.5-.25 1.25-1.5" />
+</svg>;
export const Lock14Filled = /*#__PURE__*/ scaled(LockClosed16Filled, 14);
export const More14 = /*#__PURE__*/ scaled(MoreHorizontal16Regular, 14);
export const Mute14Filled = /*#__PURE__*/ scaled(SpeakerMute16Filled, 14);
diff --git a/src/components/workspace/ImageEditor.test.tsx b/src/components/workspace/ImageEditor.test.tsx
index 6cdc8dd..48f4f23 100644
--- a/src/components/workspace/ImageEditor.test.tsx
+++ b/src/components/workspace/ImageEditor.test.tsx
@@ -19,6 +19,10 @@ import snapshotFixture from "../../../fixtures/image-generation-snapshot.json";
vi.mock("@tauri-apps/api/core", () => ({ invoke: vi.fn() }));
afterEach(() => { cleanup(); localStorage.clear(); vi.restoreAllMocks(); vi.unstubAllGlobals(); });
+function enableCompositionTools() {
+ const template = createGeneratorTemplate("MOSS", "moss");
+ saveGeneratorTemplateSettings({ templates: [template], defaultTemplateId: template.id, catalogVersion: 14 });
+}
function setup(initial = parseProjectConfig(fixture), workItems: WorkItem[] = []) {
let latest: ProjectConfig = initial;
function Harness() {
@@ -432,7 +436,7 @@ it("hides placement and palette controls by model type while preserving boxes an
expect(screen.queryByText("Placement (0–1000)")).not.toBeInTheDocument();
expect(screen.queryByText("Color palette")).not.toBeInTheDocument();
expect(screen.queryByLabelText("Explicit placement")).not.toBeInTheDocument();
- expect(screen.getByRole("radio", { name: "Draw object" })).toBeEnabled();
+ expect(screen.getByRole("radio", { name: "Draw object" })).toBeDisabled();
expect(screen.getByLabelText("Image placement canvas").querySelectorAll("rect[data-node]").length).toBeGreaterThan(0);
choose("Generator", "Future generator");
expect(screen.getByText("Placement (0–1000)")).toBeInTheDocument();
@@ -771,6 +775,7 @@ it("drags whole hierarchy branches to nest or reorder, preserves placement, and
});
it("uses the context menu for creation, inline rename, and independent subtree copy/paste", () => {
+ enableCompositionTools();
const current = setup();
const open = (name: string) => fireEvent.contextMenu(screen.getByRole("button", { name }));
const action = (name: string) => fireEvent.click(screen.getByRole("menuitem", { name: new RegExp(`^${name}(?:$| )`) }));
@@ -813,6 +818,7 @@ it("uses the context menu for creation, inline rename, and independent subtree c
});
it("supports menu keyboard navigation and tree shortcuts without intercepting name editing", () => {
+ enableCompositionTools();
const current = setup();
const rocket = screen.getByRole("button", { name: "Rocket" });
fireEvent.click(rocket);
@@ -842,6 +848,7 @@ it("supports menu keyboard navigation and tree shortcuts without intercepting na
});
it("walks the tree with arrow keys as a single tab stop and duplicates with Ctrl+D", () => {
+ enableCompositionTools();
const current = setup();
const image = screen.getByRole("button", { name: "Image" });
expect(image).toHaveAttribute("tabindex", "0");
@@ -897,6 +904,7 @@ it("deletes a box selected on the canvas, supports undo, and leaves text editing
});
it("undoes and redoes image edits with the keyboard inside the editor only", () => {
+ enableCompositionTools();
const current = setup();
const before = current().imageScene!.nodes.length;
const rocket = screen.getByRole("button", { name: "Rocket" });
@@ -914,6 +922,7 @@ it("undoes and redoes image edits with the keyboard inside the editor only", ()
});
it("picks canvas tools from a radio group or their letter keys and zooms from the keyboard", () => {
+ enableCompositionTools();
setup();
const tools = screen.getByRole("radiogroup", { name: "Canvas tool" });
expect(within(tools).getByRole("radio", { name: "Select" })).toHaveAttribute("aria-checked", "true");
@@ -1146,6 +1155,8 @@ it("sets a temporary generation count, dismisses its panel and resets after one
expect(screen.getByRole("dialog", { name: "Generation options" })).toBeInTheDocument();
const count = screen.getByRole("spinbutton", { name: "Count" });
expect(count).toHaveFocus();
+ expect(screen.getByText("Count")).toHaveAttribute("data-tooltip", "Different seeds for each image. Resets after generating.");
+ expect(screen.queryByText("Different seeds for each image. Resets after generating.")).not.toBeInTheDocument();
expect(count).toHaveValue(1);
for (const value of ["0", "101", "2.5", ""]) {
fireEvent.change(count, { target: { value } });
@@ -1283,3 +1294,34 @@ it("combines and subtracts lassos using release-time modifiers and shows matchin
expect(canvas).not.toHaveClass("lasso-add");
expect(parseProjectConfig(JSON.parse(JSON.stringify(current()))).imageScene).toEqual(current().imageScene);
});
+
+it("gates composition creation by model across menus, shortcuts and model switches", () => {
+ const h3 = createGeneratorTemplate("H3"), moss = createGeneratorTemplate("MOSS", "moss"), fibo = createGeneratorTemplate("Fibo", "fibo2");
+ saveGeneratorTemplateSettings({ templates: [h3, moss, fibo], defaultTemplateId: h3.id, catalogVersion: 14 });
+ const current = setup();
+ const before = structuredClone(current().imageScene!.nodes);
+ for (const name of ["Draw object", "Draw text", "Draw group"]) expect(screen.getByRole("radio", { name })).toBeDisabled();
+ const tree = screen.getByRole("tree", { name: "Image nodes" });
+ fireEvent.contextMenu(tree);
+ for (const name of ["New Object", "New Text", "New Group", "New Background"]) expect(screen.getByRole("menuitem", { name })).toBeDisabled();
+ fireEvent.keyDown(window, { key: "Escape" });
+ const canvas = screen.getByLabelText("Image placement canvas");
+ for (const key of ["o", "t", "g"]) fireEvent.keyDown(canvas, { key });
+ expect(screen.getByRole("radio", { name: "Select" })).toHaveAttribute("aria-checked", "true");
+ const rocket = screen.getByRole("button", { name: "Rocket" });
+ fireEvent.click(rocket);
+ fireEvent.keyDown(rocket, { key: "d", ctrlKey: true });
+ expect(current().imageScene!.nodes).toEqual(before);
+ for (const model of ["MOSS", "Fibo"]) {
+ choose("Generator", model);
+ for (const name of ["Draw object", "Draw text", "Draw group"]) expect(screen.getByRole("radio", { name })).toBeEnabled();
+ fireEvent.contextMenu(tree);
+ for (const name of ["New Object", "New Text", "New Group", "New Background"]) expect(screen.getByRole("menuitem", { name })).toBeEnabled();
+ fireEvent.keyDown(window, { key: "Escape" });
+ fireEvent.click(screen.getByRole("radio", { name: "Draw object" }));
+ expect(screen.getByRole("radio", { name: "Draw object" })).toHaveAttribute("aria-checked", "true");
+ choose("Generator", "H3");
+ expect(screen.getByRole("radio", { name: "Select" })).toHaveAttribute("aria-checked", "true");
+ }
+ expect(current().imageScene!.nodes).toEqual(before);
+});
diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsx
index e48f53d..cb2088a 100644
--- a/src/components/workspace/ImageEditor.tsx
+++ b/src/components/workspace/ImageEditor.tsx
@@ -114,6 +114,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
const effectsBlocked = activeGenerationEffects(scene.generationEffects) && !model.generationEffects ? "This model does not support generation effects. Bypass or remove the effects, or choose another generator." : null;
const editingBlocked = !model.imageEditing ? `${model.label} does not support image editing. Choose an editing generator.` : null;
const referencesBlocked = !model.characterSheets ? `${model.label} does not support character sheets. Choose a character sheet generator.` : null;
+ const creationBlocked = !imageRoot && !model.imageCompositionCreation;
const isMiniMaxH3 = !template || template.modelType === MINIMAX_H3_MODEL_TYPE;
const onChange = (update: ConfigUpdate) => changeConfig((current) => {
const next = typeof update === "function" ? update(current) : update;
@@ -124,6 +125,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
const [generationCount, setGenerationCount] = useState("1");
const [generationOptionsOpen, setGenerationOptionsOpen] = useState(false);
const generationOptionsButton = useRef<HTMLButtonElement>(null);
+ const generationCountInput = useRef<HTMLInputElement>(null);
const count = Number(generationCount);
const validCount = Number.isInteger(count) && count >= 1 && count <= MAX_IMAGE_BATCH_COUNT;
const debugEnabled = useSyncExternalStore(subscribeDebugOptions, loadDebugOptionsEnabled);
@@ -149,6 +151,10 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
const redo = useRef<ImageScene[]>([]);
const [, historyChanged] = useState(0);
const pointer = useRef<{ x: number; y: number; scene: ImageScene; id?: string; resize: boolean; box?: ImageBox; lasso?: ImagePoint[] } | null>(null);
+ useEffect(() => {
+ if (!creationBlocked) return;
+ pointer.current = null; setDraftBox(null); setDraftLasso(null); setDrawKind(null);
+ }, [creationBlocked]);
useEffect(() => {
// Applied edits belong to the old source and must not be resurrected by Undo.
undo.current = []; redo.current = []; historyChanged((value) => value + 1);
@@ -225,7 +231,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
const patchNode = (patch: Partial<ImageNode>) => commit({ ...scene, nodes: scene.nodes.map((node) => node.id === selected.id ? { ...node, ...patch } : node) });
const insertParent = selected.kind === "object" || selected.kind === "text" ? selected.parentId ?? root.id : selected.id;
const add = (kind: Exclude<ImageNode["kind"], "root">, box?: ImageBox) => {
- if (imageRoot && editingBlocked) return;
+ if (creationBlocked || (imageRoot && editingBlocked)) return;
const parent = imageRoot ? root.id : insertParent;
const next = addImageNode(scene, parent, imageRoot ? "object" : kind, box);
if (imageRoot) Object.assign(next.nodes.at(-1)!, { name: "Edit" });
@@ -346,6 +352,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
requestAnimationFrame(() => focusNode(parent));
};
const paste = () => {
+ if (creationBlocked) return;
const result = pasteImageNode(scene, insertParent);
if (!result) return;
commit(result.scene); setSelection(result.id);
@@ -353,6 +360,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
requestAnimationFrame(() => focusNode(result.id));
};
const duplicate = () => {
+ if (creationBlocked) return;
if (selected.kind === "root") return;
const next = duplicateImageNode(scene, selected.id);
const oldIds = new Set(scene.nodes.map((node) => node.id));
@@ -496,13 +504,13 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
{ id: "group", label: "Draw group", key: "G", icon: <Group16 />, onIcon: <Group16Filled /> },
] as const),
] as const;
- const chooseTool = (id: typeof drawKind) => { if (extendMode || (imageRoot && editingBlocked && id)) return; pointer.current = null; setDraftBox(null); setDraftLasso(null); setDrawKind(id); if (id) setBoxes(true); };
+ const chooseTool = (id: typeof drawKind) => { if (extendMode || (id && (creationBlocked || (imageRoot && editingBlocked)))) return; pointer.current = null; setDraftBox(null); setDraftLasso(null); setDrawKind(id); if (id) setBoxes(true); };
useShortcut("V", () => chooseTool(null), { scope: editorRoot });
useShortcut("E", () => chooseTool("object"), { scope: editorRoot, enabled: imageRoot && !editingBlocked });
useShortcut("L", () => chooseTool("lasso"), { scope: editorRoot, enabled: imageRoot && !editingBlocked });
- useShortcut("O", () => chooseTool("object"), { scope: editorRoot, enabled: !imageRoot });
- useShortcut("T", () => chooseTool("text"), { scope: editorRoot, enabled: !imageRoot });
- useShortcut("G", () => chooseTool("group"), { scope: editorRoot, enabled: !imageRoot });
+ useShortcut("O", () => chooseTool("object"), { scope: editorRoot, enabled: !imageRoot && !creationBlocked });
+ useShortcut("T", () => chooseTool("text"), { scope: editorRoot, enabled: !imageRoot && !creationBlocked });
+ useShortcut("G", () => chooseTool("group"), { scope: editorRoot, enabled: !imageRoot && !creationBlocked });
useShortcut("Escape", () => { if (!drawKind) return false; chooseTool(null); }, { scope: editorRoot });
/* Zoom: Fit is the frame fitted to the viewport (100% of the fit); the
@@ -602,12 +610,12 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
{!active && <button ref={generationOptionsButton} type="button" className="primary-button image-generation-options" aria-label="Generation options"
aria-haspopup="dialog" aria-expanded={generationOptionsOpen} data-tooltip="Generation options" disabled={generateDisabled}
onClick={() => setGenerationOptionsOpen(!generationOptionsOpen)}><ChevronDown14 aria-hidden="true" /></button>}
- <Flyout open={generationOptionsOpen && !active} anchor={generationOptionsButton} onClose={() => setGenerationOptionsOpen(false)} placement="top" width={240} aria-label="Generation options" className="image-generation-options-panel">
- <PropRow label="Count" htmlFor={rootField("generation-count")}>
- <input id={rootField("generation-count")} className="text-field" type="number" min={1} max={MAX_IMAGE_BATCH_COUNT} step={1}
- value={generationCount} aria-invalid={!validCount} aria-describedby={rootField("generation-count-help")} onChange={(event) => setGenerationCount(event.target.value)} />
+ <Flyout open={generationOptionsOpen && !active} anchor={generationOptionsButton} initialFocus={generationCountInput} onClose={() => setGenerationOptionsOpen(false)} placement="top" width={240} aria-label="Generation options" className="image-generation-options-panel">
+ <PropRow label="Count" tooltip="Different seeds for each image. Resets after generating." htmlFor={rootField("generation-count")}>
+ <input ref={generationCountInput} id={rootField("generation-count")} className="text-field" type="number" min={1} max={MAX_IMAGE_BATCH_COUNT} step={1}
+ value={generationCount} aria-invalid={!validCount} aria-describedby={!validCount ? rootField("generation-count-help") : undefined} onChange={(event) => setGenerationCount(event.target.value)} />
</PropRow>
- <p id={rootField("generation-count-help")}>{validCount ? "Different seeds for each image. Resets after generating." : `Enter a whole number from 1 to ${MAX_IMAGE_BATCH_COUNT}.`}</p>
+ <p hidden={validCount} id={rootField("generation-count-help")}>{`Enter a whole number from 1 to ${MAX_IMAGE_BATCH_COUNT}.`}</p>
</Flyout>
</div>;
@@ -641,7 +649,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
requestAnimationFrame(() => event.currentTarget.querySelector<HTMLButtonElement>('[aria-checked="true"]')?.focus());
}}>
{TOOLS.map((tool) => <button
- key={tool.label} disabled={imageRoot && Boolean(editingBlocked) && tool.id !== null}
+ key={tool.label} disabled={tool.id !== null && (creationBlocked || (imageRoot && Boolean(editingBlocked)))}
type="button"
role="radio"
aria-checked={drawKind === tool.id}
@@ -693,15 +701,15 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene
<Splitter {...treePane.splitterProps} aria-label="Resize hierarchy" />
{contextMenu && <HierarchyContextMenu {...contextMenu} onClose={closeContextMenu} items={[
...(imageRoot ? [{ label: "New Edit", icon: <Edit16 />, disabled: Boolean(editingBlocked), action: () => attempt(() => add("object")) }] : [
- { label: "New Object", icon: <Cube16 />, action: () => attempt(() => add("object")) },
- { label: "New Text", icon: <Text16 />, action: () => attempt(() => add("text")) },
- { label: "New Group", icon: <FolderAdd16 />, action: () => attempt(() => add("group")) },
- { label: "New Background", icon: <Image16 />, action: () => attempt(() => add("background")) },
+ { label: "New Object", icon: <Cube16 />, disabled: creationBlocked, action: () => attempt(() => add("object")) },
+ { label: "New Text", icon: <Text16 />, disabled: creationBlocked, action: () => attempt(() => add("text")) },
+ { label: "New Group", icon: <FolderAdd16 />, disabled: creationBlocked, action: () => attempt(() => add("group")) },
+ { label: "New Background", icon: <Image16 />, disabled: creationBlocked, action: () => attempt(() => add("background")) },
]),
{ label: "Rename", icon: <Rename16 />, shortcut: "F2", separator: true, action: startRename },
{ label: "Copy", icon: <Copy16 />, shortcut: "Ctrl+C", separator: true, disabled: selected.kind === "root", action: () => copyImageNode(scene, selected.id) },
- { label: "Paste", icon: <Paste16 />, shortcut: "Ctrl+V", disabled: !clipboard, action: () => attempt(paste) },
- { label: "Duplicate", icon: <Copy16 />, shortcut: "Ctrl+D", disabled: selected.kind === "root", action: () => attempt(duplicate) },
+ { label: "Paste", icon: <Paste16 />, shortcut: "Ctrl+V", disabled: creationBlocked || !clipboard, action: () => attempt(paste) },
+ { label: "Duplicate", icon: <Copy16 />, shortcut: "Ctrl+D", disabled: creationBlocked || selected.kind === "root", action: () => attempt(duplicate) },
{ label: "Delete", icon: <Delete16 />, shortcut: "Delete", separator: true, danger: true, disabled: selected.kind === "root", action: removeSelected },
]} />}
{imageMenu && <HierarchyContextMenu {...imageMenu} label="Generated image actions" onClose={closeImageMenu} items={[
diff --git a/src/lib/generatorModels.json b/src/lib/generatorModels.json
index d9a638b..0fee9f5 100644
--- a/src/lib/generatorModels.json
+++ b/src/lib/generatorModels.json
@@ -17,7 +17,8 @@
"maxImageReferences": 9,
"refmods": true,
"sigmaShifts": true,
- "cudaOnly": false
+ "cudaOnly": false,
+ "imageCompositionCreation": false
},
"moss": {
"label": "MOSS Image",
@@ -39,7 +40,8 @@
"maxImageReferences": 0,
"refmods": false,
"sigmaShifts": true,
- "cudaOnly": true
+ "cudaOnly": true,
+ "imageCompositionCreation": true
},
"fibo2": {
"label": "Fibo 2.0",
@@ -59,6 +61,7 @@
"maxImageReferences": 4,
"refmods": false,
"sigmaShifts": false,
- "cudaOnly": true
+ "cudaOnly": true,
+ "imageCompositionCreation": true
}
}
diff --git a/src/styles/image-editor.css b/src/styles/image-editor.css
index 3774295..8c809a2 100644
--- a/src/styles/image-editor.css
+++ b/src/styles/image-editor.css
@@ -43,8 +43,14 @@
.image-generate-button { flex-shrink: 0; white-space: nowrap; }
.image-generation-controls { display: flex; min-width: 0; }
.image-generation-controls > .image-generate-button { flex: 1; }
-.image-generation-controls--split > .image-generate-button { border-top-right-radius: 0; border-bottom-right-radius: 0; }
-.image-generation-options { flex: 0 0 var(--control-md); padding: 0; border-left-color: var(--button-primary-stroke-bottom); border-top-left-radius: 0; border-bottom-left-radius: 0; }
+.image-generation-controls--split { border: 1px solid var(--button-primary-stroke); border-bottom-color: var(--button-primary-stroke-bottom); border-radius: var(--radius-sm); background: var(--button-primary-bg); }
+.image-generation-controls--split:has(> .image-generate-button:disabled) { border-color: transparent; background: var(--button-primary-off-bg); }
+.image-generation-controls--split > .primary-button { min-height: calc(var(--control-md) - 2px); border: 0; background: transparent; border-radius: 0; }
+.image-generation-controls--split > .image-generate-button { border-radius: calc(var(--radius-sm) - 1px) 0 0 calc(var(--radius-sm) - 1px); }
+.image-generation-controls--split > .image-generation-options { position: relative; flex: 0 0 var(--control-md); padding: 0; border-radius: 0 calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px) 0; }
+.image-generation-options::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 1px; background: currentColor; opacity: .22; }
+.image-generation-controls--split > .primary-button:hover:not(:disabled), .image-generation-controls--split > .primary-button[aria-expanded="true"] { background: var(--button-primary-hover); }
+.image-generation-controls--split > .primary-button:active:not(:disabled) { background: var(--button-primary-active); }
.image-generation-options-panel { padding: var(--space-3); }
.image-generation-options-panel .ui-prop-row { padding: 0; }
.image-generation-options-panel p { margin: var(--space-2) 0 0; color: var(--text-secondary); font-size: var(--text-xs); }