diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addIPAdapters.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addIPAdapters.ts index 0a3a43a0188..3d99e913b7b 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addIPAdapters.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addIPAdapters.ts @@ -17,7 +17,9 @@ type AddIPAdaptersArg = { }; export const addIPAdapters = ({ entities, g, collector, model }: AddIPAdaptersArg): AddIPAdaptersResult => { - const validIPAdapters = entities.filter((entity) => getGlobalReferenceImageWarnings(entity, model).length === 0); + const validIPAdapters = entities + .filter((entity) => entity.isEnabled) + .filter((entity) => getGlobalReferenceImageWarnings(entity, model).length === 0); const result: AddIPAdaptersResult = { addedIPAdapters: 0, diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts index a1921200d56..2128faab0ee 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts @@ -63,12 +63,9 @@ export const addRegions = async ({ const isSDXL = model.base === 'sdxl'; const isFLUX = model.base === 'flux'; - const validRegions = regions.filter((rg) => { - if (!rg.isEnabled) { - return false; - } - return getRegionalGuidanceWarnings(rg, model).length === 0; - }); + const validRegions = regions + .filter((entity) => entity.isEnabled) + .filter((entity) => getRegionalGuidanceWarnings(entity, model).length === 0); const results: AddedRegionResult[] = [];