Skip to content

Commit 4352341

Browse files
feat(ui): starter models filter matches spandrel models to "upscale" search term
1 parent d7e0ec5 commit 4352341

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/StarterModels/StarterModelsResults.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ export const StarterModelsResults = ({ results }: StarterModelsResultsProps) =>
1919
const filteredResults = useMemo(() => {
2020
return results.filter((result) => {
2121
const trimmedSearchTerm = searchTerm.trim().toLowerCase();
22-
const name = result.name.toLowerCase();
23-
const type = result.type.toLowerCase();
24-
const description = result.description.toLowerCase();
25-
return (
26-
name.includes(trimmedSearchTerm) || type.includes(trimmedSearchTerm) || description.includes(trimmedSearchTerm)
27-
);
22+
const matchStrings = [result.name.toLowerCase(), result.type.toLowerCase(), result.description.toLowerCase()];
23+
if (result.type === 'spandrel_image_to_image') {
24+
matchStrings.push('upscale');
25+
}
26+
return matchStrings.some((matchString) => matchString.includes(trimmedSearchTerm));
2827
});
2928
}, [results, searchTerm]);
3029

0 commit comments

Comments
 (0)