mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Rebase Fix - ModelSelect
This commit is contained in:
parent
33c5f5a9c2
commit
176add58b2
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
cd invokeai/frontend/ && yarn run lint
|
||||
cd invokeai/frontend/ && npx run lint
|
||||
|
@ -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`
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user