diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/appConfigReceived.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/appConfigReceived.ts index d4d529b0de2..a8f3602440b 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/appConfigReceived.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/appConfigReceived.ts @@ -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')) {