mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Update Control Adapter Collapse active status to reflect IP Adapter
This commit is contained in:
parent
4dd289b337
commit
820ec08e9a
@ -26,14 +26,23 @@ import { v4 as uuidv4 } from 'uuid';
|
|||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
[stateSelector],
|
[stateSelector],
|
||||||
({ controlNet }) => {
|
({ controlNet }) => {
|
||||||
const { controlNets, isEnabled } = controlNet;
|
const { controlNets, isEnabled, isIPAdapterEnabled } = controlNet;
|
||||||
|
|
||||||
const validControlNets = getValidControlNets(controlNets);
|
const validControlNets = getValidControlNets(controlNets);
|
||||||
|
|
||||||
const activeLabel =
|
let activeLabel = undefined;
|
||||||
isEnabled && validControlNets.length > 0
|
|
||||||
? `${validControlNets.length} Active`
|
if (isEnabled && validControlNets.length > 0) {
|
||||||
: undefined;
|
activeLabel = `${validControlNets.length} ControlNet`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isIPAdapterEnabled) {
|
||||||
|
if (activeLabel) {
|
||||||
|
activeLabel = `${activeLabel}, IP Adapter`;
|
||||||
|
} else {
|
||||||
|
activeLabel = 'IP Adapter';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return { controlNetsArray: map(controlNets), activeLabel };
|
return { controlNetsArray: map(controlNets), activeLabel };
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user