mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: extract the adapter info initial state
This commit is contained in:
parent
820ec08e9a
commit
3e813ead1f
@ -74,16 +74,18 @@ export type ControlNetState = {
|
|||||||
ipAdapterInfo: IPAdapterConfig;
|
ipAdapterInfo: IPAdapterConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const initialIPAdapterState: IPAdapterConfig = {
|
||||||
|
adapterImage: null,
|
||||||
|
model: null,
|
||||||
|
weight: 1,
|
||||||
|
};
|
||||||
|
|
||||||
export const initialControlNetState: ControlNetState = {
|
export const initialControlNetState: ControlNetState = {
|
||||||
controlNets: {},
|
controlNets: {},
|
||||||
isEnabled: false,
|
isEnabled: false,
|
||||||
pendingControlImages: [],
|
pendingControlImages: [],
|
||||||
isIPAdapterEnabled: false,
|
isIPAdapterEnabled: false,
|
||||||
ipAdapterInfo: {
|
ipAdapterInfo: { ...initialIPAdapterState },
|
||||||
adapterImage: null,
|
|
||||||
model: null,
|
|
||||||
weight: 1,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const controlNetSlice = createSlice({
|
export const controlNetSlice = createSlice({
|
||||||
@ -388,11 +390,7 @@ export const controlNetSlice = createSlice({
|
|||||||
},
|
},
|
||||||
ipAdapterStateReset: (state) => {
|
ipAdapterStateReset: (state) => {
|
||||||
state.isIPAdapterEnabled = false;
|
state.isIPAdapterEnabled = false;
|
||||||
state.ipAdapterInfo = {
|
state.ipAdapterInfo = { ...initialIPAdapterState };
|
||||||
adapterImage: null,
|
|
||||||
model: null,
|
|
||||||
weight: 1,
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extraReducers: (builder) => {
|
extraReducers: (builder) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user