Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(webv2): keep Gallery a Compose center view
joshistoast65f53bdcde47
diff --git a/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts b/invokeai/frontend/webv2/src/workbench/layoutPresets.test.tsindex 735dc460b5..862dcc947a 100644--- a/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts+++ b/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts@@ -74,7 +74,11 @@ describe('built-in layout preset descriptors', () => {compose: {active: { bottom: 'gallery:bottom', center: 'preview', left: 'generate', right: 'gallery' },bottom: ['server-status', 'queue-status', 'gallery:bottom', 'notifications', 'autosave-status'],- center: ['preview'],+ // Compose keeps Gallery as a center view: the retired `gallery` preset+ // migrates here (see legacyLayoutPresetIds) precisely because it was+ // "Compose with the center view swapped", so the swap has to remain+ // available.+ center: ['preview', 'gallery:center'],left: ['generate', 'upscale'],panels: { isBottomOpen: false, isLeftOpen: true, isRightOpen: true },right: ['gallery', 'queue'],diff --git a/invokeai/frontend/webv2/src/workbench/layoutPresets.ts b/invokeai/frontend/webv2/src/workbench/layoutPresets.tsindex bbf5a23c1c..3a6988d1dd 100644--- a/invokeai/frontend/webv2/src/workbench/layoutPresets.ts+++ b/invokeai/frontend/webv2/src/workbench/layoutPresets.ts@@ -158,9 +158,15 @@ export const builtInLayoutPresetDescriptors: BuiltInLayoutPresetDescriptor[] = [isCollapsed: true,sizePx: 180,}),+ // Gallery stays a center view here: the retired `gallery` preset resolves+ // to Compose because it was "Compose with the center view swapped" (see+ // legacyLayoutPresetIds), so the swap has to stay reachable. Curating it+ // out also made Gallery an *addable* widget instead of a placed one,+ // which routed the switch through a menu that warms the Canvas chunk on+ // intent — a chunk a gallery-only session must never download.center: createRegion({activeInstanceId: 'preview',- instanceIds: ['preview'],+ instanceIds: ['preview', 'gallery:center'],sizePx: 0,}),left: createRegion({diff --git a/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts b/invokeai/frontend/webv2/src/workbench/workbenchState.test.tsindex 753c150543..675b0c9636 100644--- a/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts+++ b/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts@@ -931,7 +931,7 @@ describe('workbench layout presets', () => {});expect(project.widgetRegions.center).toMatchObject({activeInstanceId: 'preview',- instanceIds: ['preview'],+ instanceIds: ['preview', 'gallery:center'],isCollapsed: false,sizePx: 0,});