Skip to content

Commit

Permalink
fix(ui): prefer 'lama' infill when handling infill fallback
Browse files Browse the repository at this point in the history
LaMA is the next best infill after patchmatch - prefer it.
  • Loading branch information
psychedelicious authored and hipsterusername committed Sep 23, 2024
1 parent 6e6bbc5 commit 8125ff3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export const addAppConfigReceivedListener = (startAppListening: AppStartListenin
const infillMethod = getState().params.infillMethod;

if (!infill_methods.includes(infillMethod)) {
// if there is no infill method, set it to the first one
// if there is no first one... god help us
dispatch(setInfillMethod(infill_methods[0] as string));
// If the selected infill method does not exist, prefer 'lama' if it's in the list, otherwise 'tile'.
// TODO(psyche): lama _should_ always be in the list, but the API doesn't guarantee it...
const infillMethod = infill_methods.includes('lama') ? 'lama' : 'tile';
dispatch(setInfillMethod(infillMethod));
}

if (!nsfw_methods.includes('nsfw_checker')) {
Expand Down

0 comments on commit 8125ff3

Please sign in to comment.