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
chore(ui): nodes manager mechanical sweep
joshistoast1a48275a0b44
diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex 2bceca01f8..6d3c307860 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -215,6 +215,7 @@"open": "Open","pageNumber": "Page {{page}}","pages": "Pages",+ "plusMore": " +{{count}} more","previousPage": "Previous page","prompt": "Prompt","project": "Project",@@ -1048,7 +1049,6 @@"pauseDownload": "Pause download","pauseFailed": "Pause failed","pauseInstall": "Pause install",- "plusMore": " +{{count}} more","predictionType": "Prediction Type","press": "Press","pruneFailed": "Prune failed",@@ -1164,7 +1164,6 @@"waitingForDownload": "Waiting for download"},"nodes": {- "addCustomNodes": "Add custom nodes","addNodes": "Add Nodes","alreadyInstalledError": "'{{name}}' is already installed. Uninstall it first to reinstall.","copyPath": "Copy path",@@ -1201,8 +1200,12 @@"nodePacks": "Node Packs","nodeType": "Type: {{type}}","nodeVersion": "Version: {{version}}",+ "nodeClassification": "Classification: {{classification}}",+ "nodeDetailsAria": "Details for {{title}}",+ "nodePackLabel": "Node pack: {{name}}","nodesDirectory": "Nodes Directory","nodesInPack": "Nodes in this pack",+ "noExposedFields": "No exposed fields.","noNodesRegistered": "No nodes registered","noNodesRegisteredHint": "This pack registered no nodes — reload nodes or restart InvokeAI, and check its dependencies.","noPacks": "No custom node packs",diff --git a/invokeai/frontend/webv2/src/features/models/ui/install-queue/InstallQueueBar.tsx b/invokeai/frontend/webv2/src/features/models/ui/install-queue/InstallQueueBar.tsxindex 99c2740b8b..9193aab201 100644--- a/invokeai/frontend/webv2/src/features/models/ui/install-queue/InstallQueueBar.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/install-queue/InstallQueueBar.tsx@@ -124,7 +124,7 @@ export const InstallQueueBar = () => {const summary =activeJobs.length > 0- ? `${getInstallJobDisplayName(activeJobs[0]!)}${activeJobs.length > 1 ? t('models.plusMore', { count: activeJobs.length - 1 }) : ''}`+ ? `${getInstallJobDisplayName(activeJobs[0]!)}${activeJobs.length > 1 ? t('common.plusMore', { count: activeJobs.length - 1 }) : ''}`: jobs.length > 0? t('models.installJobSummary', { count: jobs.length }): t('models.noInstallsYet');diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/NodesPage.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/NodesPage.tsxindex 92afc102ec..15aab6051a 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/NodesPage.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/NodesPage.tsx@@ -1,6 +1,14 @@import { Center, Spinner } from '@chakra-ui/react';import { lazy, Suspense } from 'react';+/**+ * The Launchpad's nodes manager: pack library, add-nodes flow, and install+ * activity. The Launchpad doesn't need any of it at first paint, so it is+ * code-split: the chunk loads the first time this tab is opened (the shell's+ * `lazyMount` keeps it off the critical path until then) and stays warm+ * afterwards. All pack state lives in external stores, so the view needs no+ * workbench providers here.+ */const NodeManagerView = lazy(() =>import('@features/nodes/ui/NodeManagerView').then((module) => ({ default: module.NodeManagerView })));diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeActivityBar.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeActivityBar.tsxindex 66f1bb9e23..52862f2935 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeActivityBar.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeActivityBar.tsx@@ -17,7 +17,7 @@ export const NodeActivityBar = () => {const summary =installingCount > 0? `${log.find((entry) => entry.status === 'installing')?.name ?? t('nodes.installing')}${- installingCount > 1 ? t('models.plusMore', { count: installingCount - 1 }) : ''+ installingCount > 1 ? t('common.plusMore', { count: installingCount - 1 }) : ''}`: log.length > 0? t('nodes.recentActivitySummary', { count: log.length })@@ -85,4 +85,3 @@ export const NodeActivityBar = () => {</Collapsible.Root>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeInstallLog.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeInstallLog.tsxindex 89b93eecb9..0cb85b9647 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeInstallLog.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/activity/NodeInstallLog.tsx@@ -87,4 +87,3 @@ const InstallLogRow = ({ entry }: { entry: CustomNodeInstallLogEntry }) => {</Table.Row>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsxindex b09d82663d..476786f81b 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsx@@ -115,4 +115,3 @@ const UninstallButton = ({ onUninstalled, pack }: { onUninstalled: () => void; p</>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePreviewCard.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePreviewCard.tsxindex cdf89fa973..cc08765d5e 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePreviewCard.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePreviewCard.tsx@@ -120,6 +120,7 @@ const NodeInfoTooltip = ({ template }: { template: InvocationTemplate }) => {};export const NodePreviewCard = ({ template }: { template: InvocationTemplate }) => {+ const { t } = useTranslation();const inputTemplates = sortByUiOrder(Object.values(template.inputs).filter((input) => !input.uiHidden));const outputTemplates = Object.values(template.outputs);const hasFields = inputTemplates.length > 0 || outputTemplates.length > 0;@@ -142,7 +143,12 @@ export const NodePreviewCard = ({ template }: { template: InvocationTemplate })</Text><Box flex="1" /><Tooltip content={<NodeInfoTooltip template={template} />} positioning={{ placement: 'top-end' }} showArrow>- <Icon aria-label={`Details for ${template.title}`} as={InfoIcon} boxSize="3.5" color="fg.subtle" />+ <Icon+ aria-label={t('nodes.nodeDetailsAria', { title: template.title })}+ as={InfoIcon}+ boxSize="3.5"+ color="fg.subtle"+ /></Tooltip></Flex><Stack bg="bg.muted" borderBottomRadius="lg" gap="0" py="1">@@ -157,11 +163,10 @@ export const NodePreviewCard = ({ template }: { template: InvocationTemplate })</>) : (<Text color="fg.muted" fontSize="2xs" px="3" py="1">- No exposed fields.+ {t('nodes.noExposedFields')}</Text>)}</Stack></Box>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackContextMenu.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackContextMenu.tsxindex 80a8f4ce7e..7fca430867 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackContextMenu.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackContextMenu.tsx@@ -81,4 +81,3 @@ export const NodePackContextMenu = ({</>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsxindex 6a1f2f6870..0b082c7e27 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsx@@ -187,4 +187,3 @@ const PackRow = ({)}</Row>);-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsxindex bdfb278c44..a7f3a25254 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx@@ -1,4 +1,6 @@/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */+import type { NodePackInfo } from '@features/nodes/core/catalog';+import { Box, Flex, Icon, Text } from '@chakra-ui/react';import { useCustomNodesSelector } from '@features/nodes/data/nodesStore';import { NodeActivityBar } from '@features/nodes/ui/activity/NodeActivityBar';@@ -47,7 +49,7 @@ export const DetailPane = () => {<Box flex="1" minH="0"><Tabs.Content h="full" p="0" value="details">- <DetailTab packName={activePackName} />+ <DetailTab activePack={activePack} /></Tabs.Content><Tabs.Content h="full" p="0" value="add"><AddNodesView />@@ -60,10 +62,8 @@ export const DetailPane = () => {);};-const DetailTab = ({ packName }: { packName: string | null }) => {+const DetailTab = ({ activePack }: { activePack: NodePackInfo | null }) => {const { t } = useTranslation();- const nodePacks = useCustomNodesSelector((snapshot) => snapshot.nodePacks);- const activePack = nodePacks.find((pack) => pack.name === packName) ?? null;if (!activePack) {return (@@ -85,4 +85,3 @@ const DetailTab = ({ packName }: { packName: string | null }) => {</Scrollable>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsxindex a13edc70d6..6719af6009 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsx@@ -50,4 +50,3 @@ export const LibraryColumn = () => {</Flex>);};-/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsxindex 4ae456fbd2..a2ad11b1f7 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsx@@ -34,6 +34,7 @@ import {TriangleAlertIcon,} from 'lucide-react';import { memo, useState, type ChangeEvent, type KeyboardEvent } from 'react';+import { useTranslation } from 'react-i18next';import type { InvocationFlowNode as InvocationFlowNodeType, InvocationNodeTemplateView } from './flowAdapters';@@ -217,15 +218,19 @@ const InputFieldTooltip = ({</Stack>);-const OutputFieldTooltip = ({ template }: { template: FieldOutputTemplate }) => (- <Stack gap="0.5" maxW="18rem">- <Text fontWeight="700">{template.title}</Text>- <Text color="fg.subtle">Field: {template.name}</Text>- <Text color="fg.subtle">Type: {getFieldTypeLabel(template.type)}</Text>- <Text color="fg.subtle">Output</Text>- {template.description ? <Text>{template.description}</Text> : null}- </Stack>-);+const OutputFieldTooltip = ({ template }: { template: FieldOutputTemplate }) => {+ const { t } = useTranslation();++ return (+ <Stack gap="0.5" maxW="18rem">+ <Text fontWeight="700">{template.title}</Text>+ <Text color="fg.subtle">{t('nodes.fieldName', { name: template.name })}</Text>+ <Text color="fg.subtle">{t('nodes.fieldType', { type: getFieldTypeLabel(template.type) })}</Text>+ <Text color="fg.subtle">{t('nodes.output')}</Text>+ {template.description ? <Text>{template.description}</Text> : null}+ </Stack>+ );+};const NodeInfoTooltipContent = ({node,@@ -234,17 +239,18 @@ const NodeInfoTooltipContent = ({node: WorkflowInvocationNode;template: InvocationNodeTemplateView['template'];}) => {+ const { t } = useTranslation();const title = node.data.label ? `${node.data.label} (${template.title})` : template.title;const nodePack = node.data.nodePack || template.nodePack;return (<Stack gap="1" maxW="20rem"><Text fontWeight="700">{title}</Text>- <Text color="fg.subtle">Type: {template.type}</Text>- <Text color="fg.subtle">Node pack: {nodePack}</Text>- <Text color="fg.subtle">Version: {node.data.version}</Text>- <Text color="fg.subtle">Classification: {template.classification}</Text>- <Text color="fg.subtle">Category: {template.category}</Text>+ <Text color="fg.subtle">{t('nodes.nodeType', { type: template.type })}</Text>+ <Text color="fg.subtle">{t('nodes.nodePackLabel', { name: nodePack })}</Text>+ <Text color="fg.subtle">{t('nodes.nodeVersion', { version: node.data.version })}</Text>+ <Text color="fg.subtle">{t('nodes.nodeClassification', { classification: template.classification })}</Text>+ <Text color="fg.subtle">{t('nodes.nodeCategory', { category: template.category })}</Text>{template.description ? <Text fontStyle="italic">{template.description}</Text> : null}{node.data.notes ? <Text>{node.data.notes}</Text> : null}</Stack>