mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix control adapter autoprocess
This commit is contained in:
parent
6b8ce34eb3
commit
913fc83cbf
@ -37,14 +37,20 @@ const predicate: AnyListenerPredicate<RootState> = (
|
||||
}
|
||||
|
||||
const { id } = action.payload;
|
||||
const ca = selectControlAdapterById(prevState.controlAdapters, id);
|
||||
if (!ca || !isControlNetOrT2IAdapter(ca)) {
|
||||
const prevCA = selectControlAdapterById(prevState.controlAdapters, id);
|
||||
const ca = selectControlAdapterById(state.controlAdapters, id);
|
||||
if (
|
||||
!prevCA ||
|
||||
!isControlNetOrT2IAdapter(prevCA) ||
|
||||
!ca ||
|
||||
!isControlNetOrT2IAdapter(ca)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (controlAdapterAutoConfigToggled.match(action)) {
|
||||
// do not process if the user just disabled auto-config
|
||||
if (ca.shouldAutoConfig === true) {
|
||||
if (prevCA.shouldAutoConfig === true) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user