Skip to content

Commit 3caf1ab

Browse files
Merge branch 'main' into psychedelicious-patch-7
2 parents 4e155f4 + f3dfb1b commit 3caf1ab

File tree

202 files changed

+6414
-3366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+6414
-3366
lines changed

invokeai/frontend/web/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@
5858
"@dagrejs/dagre": "^1.1.4",
5959
"@dagrejs/graphlib": "^2.2.4",
6060
"@fontsource-variable/inter": "^5.1.0",
61-
"@invoke-ai/ui-library": "^0.0.44",
61+
"@invoke-ai/ui-library": "^0.0.46",
6262
"@nanostores/react": "^0.7.3",
6363
"@reduxjs/toolkit": "2.2.3",
6464
"@roarr/browser-log-writer": "^1.3.0",
65+
"@xyflow/react": "^12.4.2",
6566
"async-mutex": "^0.5.0",
6667
"chakra-react-select": "^4.9.2",
6768
"cmdk": "^1.0.0",
@@ -96,9 +97,9 @@
9697
"react-icons": "^5.3.0",
9798
"react-redux": "9.1.2",
9899
"react-resizable-panels": "^2.1.4",
100+
"react-textarea-autosize": "^8.5.7",
99101
"react-use": "^17.5.1",
100102
"react-virtuoso": "^4.10.4",
101-
"reactflow": "^11.11.4",
102103
"redux-dynamic-middlewares": "^2.2.0",
103104
"redux-remember": "^5.1.0",
104105
"redux-undo": "^1.1.0",

invokeai/frontend/web/pnpm-lock.yaml

Lines changed: 267 additions & 319 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

invokeai/frontend/web/public/locales/en.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@
187187
"values": "Values",
188188
"resetToDefaults": "Reset to Defaults",
189189
"seed": "Seed",
190-
"combinatorial": "Combinatorial"
190+
"combinatorial": "Combinatorial",
191+
"layout": "Layout",
192+
"row": "Row",
193+
"column": "Column"
191194
},
192195
"hrf": {
193196
"hrf": "High Resolution Fix",
@@ -931,13 +934,15 @@
931934
"noWorkflows": "No Workflows",
932935
"noMatchingWorkflows": "No Matching Workflows",
933936
"noWorkflow": "No Workflow",
937+
"unableToUpdateNode": "Node update failed: node {{node}} of type {{type}} (may require deleting and recreating)",
934938
"mismatchedVersion": "Invalid node: node {{node}} of type {{type}} has mismatched version (try updating?)",
935939
"missingTemplate": "Invalid node: node {{node}} of type {{type}} missing template (not installed?)",
936940
"sourceNodeDoesNotExist": "Invalid edge: source/output node {{node}} does not exist",
937941
"targetNodeDoesNotExist": "Invalid edge: target/input node {{node}} does not exist",
938942
"sourceNodeFieldDoesNotExist": "Invalid edge: source/output field {{node}}.{{field}} does not exist",
939943
"targetNodeFieldDoesNotExist": "Invalid edge: target/input field {{node}}.{{field}} does not exist",
940944
"deletedInvalidEdge": "Deleted invalid edge {{source}} -> {{target}}",
945+
"deletedMissingNodeFieldFormElement": "Deleted missing form field: node {{nodeId}} field {{fieldName}}",
941946
"noConnectionInProgress": "No connection in progress",
942947
"node": "Node",
943948
"nodeOutputs": "Node Outputs",
@@ -952,6 +957,7 @@
952957
"nodeVersion": "Node Version",
953958
"noOutputRecorded": "No outputs recorded",
954959
"notes": "Notes",
960+
"description": "Description",
955961
"notesDescription": "Add notes about your workflow",
956962
"problemSettingTitle": "Problem Setting Title",
957963
"resetToDefaultValue": "Reset to default value",
@@ -1694,7 +1700,26 @@
16941700
"download": "Download",
16951701
"copyShareLink": "Copy Share Link",
16961702
"copyShareLinkForWorkflow": "Copy Share Link for Workflow",
1697-
"delete": "Delete"
1703+
"delete": "Delete",
1704+
"builder": {
1705+
"builder": "Builder",
1706+
"layout": "Layout",
1707+
"row": "Row",
1708+
"column": "Column",
1709+
"label": "Label",
1710+
"description": "Description",
1711+
"component": "Component",
1712+
"numberInput": "Number Input",
1713+
"slider": "Slider",
1714+
"both": "Both",
1715+
"emptyRootPlaceholderViewMode": "Click Edit to start building a form for this workflow.",
1716+
"emptyRootPlaceholderEditMode": "Drag a form element or node field here to get started.",
1717+
"containerPlaceholder": "Empty Container",
1718+
"containerPlaceholderDesc": "Drag a form element or node field into this container.",
1719+
"headingPlaceholder": "Empty Heading",
1720+
"textPlaceholder": "Empty Text",
1721+
"workflowBuilderAlphaWarning": "The workflow builder is currently in alpha. There may be breaking changes before the stable release."
1722+
}
16981723
},
16991724
"controlLayers": {
17001725
"regional": "Regional",

invokeai/frontend/web/src/app/components/ThemeLocaleProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import '@fontsource-variable/inter';
22
import 'overlayscrollbars/overlayscrollbars.css';
3+
import '@xyflow/react/dist/base.css';
34

45
import { ChakraProvider, DarkMode, extendTheme, theme as _theme, TOAST_OPTIONS } from '@invoke-ai/ui-library';
56
import type { ReactNode } from 'react';

invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDeletionListeners.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,50 @@ import { imageDeletionConfirmed } from 'features/deleteImageModal/store/actions'
88
import { isModalOpenChanged } from 'features/deleteImageModal/store/slice';
99
import { selectListImagesQueryArgs } from 'features/gallery/store/gallerySelectors';
1010
import { imageSelected } from 'features/gallery/store/gallerySlice';
11-
import { fieldImageValueChanged } from 'features/nodes/store/nodesSlice';
12-
import { isImageFieldInputInstance } from 'features/nodes/types/field';
11+
import { fieldImageCollectionValueChanged, fieldImageValueChanged } from 'features/nodes/store/nodesSlice';
12+
import { isImageFieldCollectionInputInstance, isImageFieldInputInstance } from 'features/nodes/types/field';
1313
import { isInvocationNode } from 'features/nodes/types/invocation';
1414
import { forEach, intersectionBy } from 'lodash-es';
1515
import { imagesApi } from 'services/api/endpoints/images';
1616
import type { ImageDTO } from 'services/api/types';
17+
import type { Param0 } from 'tsafe';
1718

1819
const log = logger('gallery');
1920

2021
//TODO(psyche): handle image deletion (canvas staging area?)
2122

2223
// Some utils to delete images from different parts of the app
2324
const deleteNodesImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => {
25+
const actions: Param0<typeof dispatch>[] = [];
2426
state.nodes.present.nodes.forEach((node) => {
2527
if (!isInvocationNode(node)) {
2628
return;
2729
}
2830

2931
forEach(node.data.inputs, (input) => {
3032
if (isImageFieldInputInstance(input) && input.value?.image_name === imageDTO.image_name) {
31-
dispatch(
33+
actions.push(
3234
fieldImageValueChanged({
3335
nodeId: node.data.id,
3436
fieldName: input.name,
3537
value: undefined,
3638
})
3739
);
40+
return;
41+
}
42+
if (isImageFieldCollectionInputInstance(input)) {
43+
actions.push(
44+
fieldImageCollectionValueChanged({
45+
nodeId: node.data.id,
46+
fieldName: input.name,
47+
value: input.value?.filter((value) => value?.image_name !== imageDTO.image_name),
48+
})
49+
);
3850
}
3951
});
4052
});
53+
54+
actions.forEach(dispatch);
4155
};
4256

4357
const deleteControlLayerImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => {

invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/workflowLoadRequested.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { logger } from 'app/logging/logger';
22
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
3-
import { $nodeExecutionStates } from 'features/nodes/hooks/useExecutionState';
3+
import { $nodeExecutionStates } from 'features/nodes/hooks/useNodeExecutionState';
44
import { workflowLoaded, workflowLoadRequested } from 'features/nodes/store/actions';
55
import { $templates } from 'features/nodes/store/nodesSlice';
66
import { $needsFit } from 'features/nodes/store/reactFlowInstance';

invokeai/frontend/web/src/common/components/IAIImageFallback.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import type { As, ChakraProps, FlexProps } from '@invoke-ai/ui-library';
1+
import type { ChakraProps, FlexProps } from '@invoke-ai/ui-library';
22
import { Flex, Icon, Skeleton, Spinner, Text } from '@invoke-ai/ui-library';
3+
import type { ElementType } from 'react';
34
import { memo, useMemo } from 'react';
45
import { PiImageBold } from 'react-icons/pi';
56
import type { ImageDTO } from 'services/api/types';
@@ -28,7 +29,7 @@ IAILoadingImageFallback.displayName = 'IAILoadingImageFallback';
2829

2930
type IAINoImageFallbackProps = FlexProps & {
3031
label?: string;
31-
icon?: As | null;
32+
icon?: ElementType | null;
3233
boxSize?: ChakraProps['boxSize'];
3334
};
3435

invokeai/frontend/web/src/common/components/NodeSelectionOverlay.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)