@@ -5,6 +5,7 @@ import { BeginEndStepPct } from 'features/controlLayers/components/common/BeginE
5
5
import { CanvasEntitySettingsWrapper } from 'features/controlLayers/components/common/CanvasEntitySettingsWrapper' ;
6
6
import { Weight } from 'features/controlLayers/components/common/Weight' ;
7
7
import { CLIPVisionModel } from 'features/controlLayers/components/IPAdapter/CLIPVisionModel' ;
8
+ import { FLUXReduxImageInfluence } from 'features/controlLayers/components/IPAdapter/FLUXReduxImageInfluence' ;
8
9
import { IPAdapterMethod } from 'features/controlLayers/components/IPAdapter/IPAdapterMethod' ;
9
10
import { IPAdapterSettingsEmptyState } from 'features/controlLayers/components/IPAdapter/IPAdapterSettingsEmptyState' ;
10
11
import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext' ;
@@ -13,14 +14,20 @@ import { useCanvasIsBusy } from 'features/controlLayers/hooks/useCanvasIsBusy';
13
14
import {
14
15
referenceImageIPAdapterBeginEndStepPctChanged ,
15
16
referenceImageIPAdapterCLIPVisionModelChanged ,
17
+ referenceImageIPAdapterFLUXReduxImageInfluenceChanged ,
16
18
referenceImageIPAdapterImageChanged ,
17
19
referenceImageIPAdapterMethodChanged ,
18
20
referenceImageIPAdapterModelChanged ,
19
21
referenceImageIPAdapterWeightChanged ,
20
22
} from 'features/controlLayers/store/canvasSlice' ;
21
23
import { selectIsFLUX } from 'features/controlLayers/store/paramsSlice' ;
22
24
import { selectCanvasSlice , selectEntity , selectEntityOrThrow } from 'features/controlLayers/store/selectors' ;
23
- import type { CanvasEntityIdentifier , CLIPVisionModelV2 , IPMethodV2 } from 'features/controlLayers/store/types' ;
25
+ import type {
26
+ CanvasEntityIdentifier ,
27
+ CLIPVisionModelV2 ,
28
+ FLUXReduxImageInfluence as FLUXReduxImageInfluenceType ,
29
+ IPMethodV2 ,
30
+ } from 'features/controlLayers/store/types' ;
24
31
import type { SetGlobalReferenceImageDndTargetData } from 'features/dnd/dnd' ;
25
32
import { setGlobalReferenceImageDndTarget } from 'features/dnd/dnd' ;
26
33
import { memo , useCallback , useMemo } from 'react' ;
@@ -65,6 +72,13 @@ const IPAdapterSettingsContent = memo(() => {
65
72
[ dispatch , entityIdentifier ]
66
73
) ;
67
74
75
+ const onChangeFLUXReduxImageInfluence = useCallback (
76
+ ( imageInfluence : FLUXReduxImageInfluenceType ) => {
77
+ dispatch ( referenceImageIPAdapterFLUXReduxImageInfluenceChanged ( { entityIdentifier, imageInfluence } ) ) ;
78
+ } ,
79
+ [ dispatch , entityIdentifier ]
80
+ ) ;
81
+
68
82
const onChangeModel = useCallback (
69
83
( modelConfig : IPAdapterModelConfig | FLUXReduxModelConfig ) => {
70
84
dispatch ( referenceImageIPAdapterModelChanged ( { entityIdentifier, modelConfig } ) ) ;
@@ -124,6 +138,14 @@ const IPAdapterSettingsContent = memo(() => {
124
138
< BeginEndStepPct beginEndStepPct = { ipAdapter . beginEndStepPct } onChange = { onChangeBeginEndStepPct } />
125
139
</ Flex >
126
140
) }
141
+ { ipAdapter . type === 'flux_redux' && (
142
+ < Flex flexDir = "column" gap = { 2 } w = "full" alignItems = "flex-start" >
143
+ < FLUXReduxImageInfluence
144
+ imageInfluence = { ipAdapter . imageInfluence ?? 'lowest' }
145
+ onChange = { onChangeFLUXReduxImageInfluence }
146
+ />
147
+ </ Flex >
148
+ ) }
127
149
< Flex alignItems = "center" justifyContent = "center" h = { 32 } w = { 32 } aspectRatio = "1/1" flexGrow = { 1 } >
128
150
< IPAdapterImagePreview
129
151
image = { ipAdapter . image }
0 commit comments