mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not add control adapters with incompatible models to graph
This commit is contained in:
parent
35374ec531
commit
ad136c2680
@ -19,7 +19,9 @@ export const addControlNetToLinearGraph = (
|
||||
graph: NonNullableGraph,
|
||||
baseNodeId: string
|
||||
): void => {
|
||||
const validControlNets = selectValidControlNets(state.controlAdapters);
|
||||
const validControlNets = selectValidControlNets(state.controlAdapters).filter(
|
||||
(ca) => ca.model?.base_model === state.generation.model?.base_model
|
||||
);
|
||||
|
||||
const metadataAccumulator = graph.nodes[METADATA_ACCUMULATOR] as
|
||||
| MetadataAccumulatorInvocation
|
||||
|
@ -17,7 +17,9 @@ export const addIPAdapterToLinearGraph = (
|
||||
graph: NonNullableGraph,
|
||||
baseNodeId: string
|
||||
): void => {
|
||||
const validIPAdapters = selectValidIPAdapters(state.controlAdapters);
|
||||
const validIPAdapters = selectValidIPAdapters(state.controlAdapters).filter(
|
||||
(ca) => ca.model?.base_model === state.generation.model?.base_model
|
||||
);
|
||||
|
||||
const metadataAccumulator = graph.nodes[METADATA_ACCUMULATOR] as
|
||||
| MetadataAccumulatorInvocation
|
||||
|
@ -18,7 +18,9 @@ export const addT2IAdaptersToLinearGraph = (
|
||||
graph: NonNullableGraph,
|
||||
baseNodeId: string
|
||||
): void => {
|
||||
const validT2IAdapters = selectValidT2IAdapters(state.controlAdapters);
|
||||
const validT2IAdapters = selectValidT2IAdapters(state.controlAdapters).filter(
|
||||
(ca) => ca.model?.base_model === state.generation.model?.base_model
|
||||
);
|
||||
|
||||
const metadataAccumulator = graph.nodes[METADATA_ACCUMULATOR] as
|
||||
| MetadataAccumulatorInvocation
|
||||
|
Loading…
Reference in New Issue
Block a user