Rebase Fix - ModelSelect

This commit is contained in:
blessedcoolant 2023-02-08 00:08:00 +13:00
parent 33c5f5a9c2
commit 176add58b2
4 changed files with 38601 additions and 5989 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
cd invokeai/frontend/ && yarn run lint
cd invokeai/frontend/ && npx run lint

View File

@ -17,4 +17,4 @@ From `invokeai/frontend/` run `yarn install` to get everything set up.
To build for dev: `yarn build-dev`
To build for production: `yarn build`
To build for production: `yarn build`

View File

@ -3,7 +3,7 @@ import { createSelector } from '@reduxjs/toolkit';
import { requestModelChange } from 'app/socketio/actions';
import { useAppDispatch, useAppSelector } from 'app/storeHooks';
import IAISelect from 'common/components/IAISelect';
import { isEqual, map, reduce } from 'lodash';
import { isEqual, map } from 'lodash';
import { ChangeEvent } from 'react';
import { activeModelSelector, systemSelector } from '../store/systemSelectors';
@ -13,20 +13,7 @@ const selector = createSelector(
(system) => {
const { isProcessing, model_list } = system;
const models = map(model_list, (model, key) => key);
const activeModel = reduce(
model_list,
(acc, model, key) => {
if (model.status === 'active') {
acc = key;
}
return acc;
},
''
);
const activeDesc = model_list[activeModel].description;
return { models, activeModel, isProcessing, activeDesc };
return { models, isProcessing };
},
{
memoizeOptions: {

File diff suppressed because one or more lines are too long