Skip to content

Commit

Permalink
tweak(ui): slightly clearer logic for skipping regional guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious authored and hipsterusername committed Dec 3, 2024
1 parent 46aa930 commit 5eb3820
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];

Expand Down

0 comments on commit 5eb3820

Please sign in to comment.