Skip to content

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.

Merge branch 'main' into feat/ltx2-a2v-first-frame

Lincoln Stein8b14cfff03fa
diff --cc invokeai/frontend/webv2/src/app/VideoUiAdapter.browser.test.tsx
index 019cb16d47,5d94fa0e1c..a4c939a3be
--- a/invokeai/frontend/webv2/src/app/VideoUiAdapter.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/app/VideoUiAdapter.browser.test.tsx
@@@ -34,10 -34,9 +34,11 @@@ const revealGalleryItem = vi.fn
);
/** The regions the project's single gallery instance occupies. */
let galleryRegions: string[] = ['right'];
+/** The store's projects, read by `queries.getProject` at call time. */
+let storedProjects: Record<string, unknown> = {};
- vi.mock('@features/video', () => ({
+ vi.mock('@features/video', async (importOriginal) => ({
+ ...(await importOriginal<Record<string, unknown>>()),
VideoUiProvider: ({ adapter: next, children }: { adapter: VideoUiAdapter; children: ReactNode }) => {
adapter = next;
return children;
diff --cc invokeai/frontend/webv2/src/app/VideoUiAdapter.tsx
index 919f7dda56,55be54c56e..160bb994fa
--- a/invokeai/frontend/webv2/src/app/VideoUiAdapter.tsx
+++ b/invokeai/frontend/webv2/src/app/VideoUiAdapter.tsx
@@@ -52,15 -51,17 +52,23 @@@ export const VideoUiAdapterProvider = (
// Key actions by project, not values, to preserve callback identity while typing.
const { projectId } = project;
const patchValues = useCallback<VideoUiAdapter['patchValues']>(
- (values, origin) => commands.widgets.patchValues('video', values, projectId, origin),
+ (values, origin) =>
+ commands.widgets.patchValues(
+ 'video',
+ typeof values === 'function'
+ ? (current) => values(normalizeVideoWidgetValues(current) ?? createDefaultVideoWidgetValues())
+ : values,
+ projectId,
+ origin
+ ),
[commands, projectId]
);
+ // The same project patchValues writes to, so an async commit reads and writes one panel.
+ const readValues = useCallback<VideoUiAdapter['readValues']>(() => {
+ const target = queries.getProject(projectId);
+
+ return target ? getProjectWidgetValues(target, 'video') : {};
+ }, [projectId, queries]);
const reportError = useCallback<VideoUiAdapter['reportError']>(
(message) => commands.notifications.reportError({ area: 'video', message, namespace: 'generation' }),
[commands]