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
feat(canvas): add progress staging auto-switch
joshistoast35df5237f43d
diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex f048cab5da..210a9b57a5 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -907,7 +907,7 @@},"canvas": {"acceptToLayer": "Accept to Layer",- "candidateCount": "Candidate {{current}} of {{total}}",+ "candidateCount": "{{current}} of {{total}}","commands": {"decreaseBrushSize": "Decrease brush/eraser size","deleteLayer": "Delete layer",@@ -988,7 +988,7 @@"autoSwitch": "Auto-switch","autoSwitchLatest": "Newest","autoSwitchOff": "Off",- "autoSwitchOldest": "Oldest",+ "autoSwitchProgress": "In progress","generating": "Generating…","saveError": "Couldn't save to gallery","saveToGallery": "Save to gallery",diff --git a/invokeai/frontend/webv2/src/workbench/canvasMigration.test.ts b/invokeai/frontend/webv2/src/workbench/canvasMigration.test.tsindex 2197134c3c..b5e698a432 100644--- a/invokeai/frontend/webv2/src/workbench/canvasMigration.test.ts+++ b/invokeai/frontend/webv2/src/workbench/canvasMigration.test.ts@@ -239,6 +239,26 @@ describe('migrateCanvasStateToV2', () => {expect(migrated.stagingArea.autoSwitchMode).toBe('latest');});+ it('preserves the progress canvas staging auto-switch mode', () => {+ const migrated = migrateCanvasStateToV2({+ document: { height: 512, layers: [], width: 512 },+ stagingArea: { autoSwitchMode: 'progress' },+ version: 2,+ });++ expect(migrated.stagingArea.autoSwitchMode).toBe('progress');+ });++ it('normalizes the removed oldest canvas staging auto-switch mode to off', () => {+ const migrated = migrateCanvasStateToV2({+ document: { height: 512, layers: [], width: 512 },+ stagingArea: { autoSwitchMode: 'oldest' },+ version: 2,+ });++ expect(migrated.stagingArea.autoSwitchMode).toBe('off');+ });+it('round-trips content-sized fields (paint offset, gradient width/height) on an already-v2 doc unchanged', () => {const paintOffset = { x: -30, y: 45 };const gradientExtent = { height: 220, width: 180 };diff --git a/invokeai/frontend/webv2/src/workbench/canvasMigration.ts b/invokeai/frontend/webv2/src/workbench/canvasMigration.tsindex 766a96a474..a50c2be686 100644--- a/invokeai/frontend/webv2/src/workbench/canvasMigration.ts+++ b/invokeai/frontend/webv2/src/workbench/canvasMigration.ts@@ -196,7 +196,7 @@ const migrateDocumentToV2 = (rawCanvas: Record<string, unknown>): CanvasDocument};};-const AUTO_SWITCH_MODES: CanvasStagingAreaContractV2['autoSwitchMode'][] = ['off', 'latest', 'oldest'];+const AUTO_SWITCH_MODES: CanvasStagingAreaContractV2['autoSwitchMode'][] = ['off', 'latest', 'progress'];const asAutoSwitchMode = (value: unknown): CanvasStagingAreaContractV2['autoSwitchMode'] =>AUTO_SWITCH_MODES.includes(value as CanvasStagingAreaContractV2['autoSwitchMode'])