revert: getModels to receivedModels

This commit is contained in:
blessedcoolant
2023-06-18 19:35:46 +12:00
parent e0c105f413
commit 9634c96020
6 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,7 @@ import {
StableDiffusion1ModelDiffusersConfig,
} from 'services/api';
import { getModels } from 'services/thunks/model';
import { receivedModels } from 'services/thunks/model';
export type SD1PipelineModelType = (
| StableDiffusion1ModelCheckpointConfig
@ -35,7 +35,7 @@ export const sd1PipelineModelsSlice = createSlice({
/**
* Received Models - FULFILLED
*/
builder.addCase(getModels.fulfilled, (state, action) => {
builder.addCase(receivedModels.fulfilled, (state, action) => {
if (action.meta.arg.baseModel !== 'sd-1') return;
sd1PipelineModelsAdapter.setAll(state, action.payload);
});

View File

@ -5,7 +5,7 @@ import {
StableDiffusion2ModelDiffusersConfig,
} from 'services/api';
import { getModels } from 'services/thunks/model';
import { receivedModels } from 'services/thunks/model';
export type SD2PipelineModelType = (
| StableDiffusion2ModelCheckpointConfig
@ -35,7 +35,7 @@ export const sd2PipelineModelsSlice = createSlice({
/**
* Received Models - FULFILLED
*/
builder.addCase(getModels.fulfilled, (state, action) => {
builder.addCase(receivedModels.fulfilled, (state, action) => {
if (action.meta.arg.baseModel !== 'sd-2') return;
sd2PipelineModelsAdapater.setAll(state, action.payload);
});

View File

@ -20,7 +20,7 @@ import {
} from 'services/events/actions';
import { ProgressImage } from 'services/events/types';
import { imageUploaded } from 'services/thunks/image';
import { getModels } from 'services/thunks/model';
import { receivedModels } from 'services/thunks/model';
import { isAnySessionRejected, sessionCanceled } from 'services/thunks/session';
import { makeToast } from '../../../app/components/Toaster';
import { LANGUAGES } from '../components/LanguagePicker';
@ -377,7 +377,7 @@ export const systemSlice = createSlice({
/**
* Received available models from the backend
*/
builder.addCase(getModels.fulfilled, (state) => {
builder.addCase(receivedModels.fulfilled, (state) => {
state.wereModelsReceived = true;
});