File tree 3 files changed +9
-10
lines changed
invokeai/frontend/web/src/features/nodes
3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -26,19 +26,19 @@ const ImageInputFieldComponent = (
26
26
isLoading,
27
27
isError,
28
28
isSuccess,
29
- } = useGetImageDTOQuery ( field . value ?? skipToken ) ;
29
+ } = useGetImageDTOQuery ( field . value ?. image_name ?? skipToken ) ;
30
30
31
31
const handleDrop = useCallback (
32
- ( droppedImage : ImageDTO ) => {
33
- if ( field . value === droppedImage . image_name ) {
32
+ ( { image_name } : ImageDTO ) => {
33
+ if ( field . value ?. image_name === image_name ) {
34
34
return ;
35
35
}
36
36
37
37
dispatch (
38
38
fieldValueChanged ( {
39
39
nodeId,
40
40
fieldName : field . name ,
41
- value : droppedImage . image_name ,
41
+ value : { image_name } ,
42
42
} )
43
43
) ;
44
44
} ,
Original file line number Diff line number Diff line change @@ -11,14 +11,13 @@ import {
11
11
NodeChange ,
12
12
OnConnectStartParams ,
13
13
} from 'reactflow' ;
14
- import { ImageDTO } from 'services/api/types' ;
14
+ import { ImageField } from 'services/api/types' ;
15
15
import { receivedOpenAPISchema } from 'services/api/thunks/schema' ;
16
16
import { InvocationTemplate , InvocationValue } from '../types/types' ;
17
17
import { parseSchema } from '../util/parseSchema' ;
18
18
import { log } from 'app/logging/useLogger' ;
19
- import { forEach , size } from 'lodash-es' ;
19
+ import { size } from 'lodash-es' ;
20
20
import { RgbaColor } from 'react-colorful' ;
21
- import { imageUrlsReceived } from 'services/api/thunks/image' ;
22
21
import { RootState } from 'app/store/store' ;
23
22
24
23
export type NodesState = {
@@ -66,7 +65,7 @@ const nodesSlice = createSlice({
66
65
action : PayloadAction < {
67
66
nodeId : string ;
68
67
fieldName : string ;
69
- value : string | number | boolean | ImageDTO | RgbaColor | undefined ;
68
+ value : string | number | boolean | ImageField | RgbaColor | undefined ;
70
69
} >
71
70
) => {
72
71
const { nodeId, fieldName, value } = action . payload ;
Original file line number Diff line number Diff line change 1
1
import { OpenAPIV3 } from 'openapi-types' ;
2
2
import { RgbaColor } from 'react-colorful' ;
3
- import { Graph , ImageDTO } from 'services/api/types' ;
3
+ import { Graph , ImageDTO , ImageField } from 'services/api/types' ;
4
4
import { AnyInvocationType } from 'services/events/types' ;
5
5
import { O } from 'ts-toolbelt' ;
6
6
@@ -214,7 +214,7 @@ export type VaeInputFieldValue = FieldValueBase & {
214
214
215
215
export type ImageInputFieldValue = FieldValueBase & {
216
216
type : 'image' ;
217
- value ?: string ;
217
+ value ?: ImageField ;
218
218
} ;
219
219
220
220
export type ModelInputFieldValue = FieldValueBase & {
You can’t perform that action at this time.
0 commit comments