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
refactor(webv2): break graph preview's circular type import
joshistoast44c5b915528d
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewPane.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewPane.tsxindex bdbea8fbff..cd458a62c9 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewPane.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewPane.tsx@@ -1,4 +1,4 @@-import type { WorkflowPreviewState } from '@features/workflow/ui/library/WorkflowLibraryDialog';+import type { ProjectGraphState } from '@features/workflow/contracts';import { Box } from '@chakra-ui/react';import { useTranslation } from 'react-i18next';@@ -13,7 +13,7 @@ import { documentToPreviewGraph, GraphPreviewFlow } from './GraphPreviewFlow';* renderer, so importing it for the conversion alone pulled xyflow and d3* (~174 KB) into every editor boot through the workflow widget's host.*/-export const GraphPreviewPane = ({ document }: { document: WorkflowPreviewState['document'] }) => {+export const GraphPreviewPane = ({ document }: { document: ProjectGraphState }) => {const { t } = useTranslation();const { graph, positionHints } = documentToPreviewGraph(document, t('widgets.labels.workflow'));diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsxindex 093302d0e7..2aff40dc8c 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx@@ -38,7 +38,7 @@ import { useSaveWorkflowToLibrary } from './useSaveWorkflowToLibrary';* cache instantly and revalidate in the background.*/-export interface WorkflowPreviewState {+interface WorkflowPreviewState {document: ProjectGraphState;item: WorkflowLibraryListItem;raw: Record<string, unknown>;