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(
|
||||
[stateSelector],
|
||||
({ controlNet }) => {
|
||||
const { controlNets, isEnabled } = controlNet;
|
||||
const { controlNets, isEnabled, isIPAdapterEnabled } = controlNet;
|
||||
|
||||
const validControlNets = getValidControlNets(controlNets);
|
||||
|
||||
const activeLabel =
|
||||
isEnabled && validControlNets.length > 0
|
||||
? `${validControlNets.length} Active`
|
||||
: undefined;
|
||||
let activeLabel = undefined;
|
||||
|
||||
if (isEnabled && validControlNets.length > 0) {
|
||||
activeLabel = `${validControlNets.length} ControlNet`;
|
||||
}
|
||||
|
||||
if (isIPAdapterEnabled) {
|
||||
if (activeLabel) {
|
||||
activeLabel = `${activeLabel}, IP Adapter`;
|
||||
} else {
|
||||
activeLabel = 'IP Adapter';
|
||||
}
|
||||
}
|
||||
|
||||
return { controlNetsArray: map(controlNets), activeLabel };
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user