mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): improve starter model search for spandrel models
This commit is contained in:
parent
b4519ea61f
commit
94b5b2a467
@ -19,9 +19,16 @@ export const StarterModelsResults = ({ results }: StarterModelsResultsProps) =>
|
||||
const filteredResults = useMemo(() => {
|
||||
return results.filter((result) => {
|
||||
const trimmedSearchTerm = searchTerm.trim().toLowerCase();
|
||||
const matchStrings = [result.name.toLowerCase(), result.type.toLowerCase(), result.description.toLowerCase()];
|
||||
const matchStrings = [
|
||||
result.name.toLowerCase(),
|
||||
result.type.toLowerCase().replaceAll('_', ' '),
|
||||
result.description.toLowerCase(),
|
||||
];
|
||||
if (result.type === 'spandrel_image_to_image') {
|
||||
matchStrings.push('upscale');
|
||||
matchStrings.push('post-processing');
|
||||
matchStrings.push('postprocessing');
|
||||
matchStrings.push('post processing');
|
||||
}
|
||||
return matchStrings.some((matchString) => matchString.includes(trimmedSearchTerm));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user