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;
|
||||
};
|
||||
|
||||
export const initialIPAdapterState: IPAdapterConfig = {
|
||||
adapterImage: null,
|
||||
model: null,
|
||||
weight: 1,
|
||||
};
|
||||
|
||||
export const initialControlNetState: ControlNetState = {
|
||||
controlNets: {},
|
||||
isEnabled: false,
|
||||
pendingControlImages: [],
|
||||
isIPAdapterEnabled: false,
|
||||
ipAdapterInfo: {
|
||||
adapterImage: null,
|
||||
model: null,
|
||||
weight: 1,
|
||||
},
|
||||
ipAdapterInfo: { ...initialIPAdapterState },
|
||||
};
|
||||
|
||||
export const controlNetSlice = createSlice({
|
||||
@ -388,11 +390,7 @@ export const controlNetSlice = createSlice({
|
||||
},
|
||||
ipAdapterStateReset: (state) => {
|
||||
state.isIPAdapterEnabled = false;
|
||||
state.ipAdapterInfo = {
|
||||
adapterImage: null,
|
||||
model: null,
|
||||
weight: 1,
|
||||
};
|
||||
state.ipAdapterInfo = { ...initialIPAdapterState };
|
||||
},
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
|
Loading…
Reference in New Issue
Block a user