mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
initiate TI model query when socket connects so user doesnt have to wait when opening prompt trigger phrases
This commit is contained in:
parent
1d2743af1b
commit
cd55c23713
@ -4,6 +4,7 @@ import { $baseUrl } from 'app/store/nanostores/baseUrl';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { atom } from 'nanostores';
|
||||
import { api } from 'services/api';
|
||||
import { modelsApi } from 'services/api/endpoints/models';
|
||||
import { queueApi, selectQueueStatus } from 'services/api/endpoints/queue';
|
||||
import { socketConnected } from 'services/events/actions';
|
||||
|
||||
@ -17,6 +18,9 @@ export const addSocketConnectedEventListener = (startAppListening: AppStartListe
|
||||
effect: async (action, { dispatch, getState, cancelActiveListeners, delay }) => {
|
||||
log.debug('Connected');
|
||||
|
||||
// query TIs so they are ready if user opens trigger phrases
|
||||
dispatch(modelsApi.endpoints.getTextualInversionModels.initiate());
|
||||
|
||||
/**
|
||||
* The rest of this listener has recovery logic for when the socket disconnects and reconnects.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user