tweak(ui): slightly clearer logic for skipping regional guidance

This commit is contained in:
psychedelicious
2024-12-03 13:46:22 +10:00
committed by Kent Keirsey
parent 46aa930526
commit 5eb382074e

View File

@@ -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[] = [];