fix: Lint Errors

This commit is contained in:
blessedcoolant 2023-07-27 19:40:32 +12:00
parent be00a837cc
commit f057d5c85b
2 changed files with 6 additions and 3 deletions

View File

@ -12,6 +12,7 @@ import { selectIsBusy } from 'features/system/store/systemSelectors';
import { forEach } from 'lodash-es';
import { memo, useCallback, useMemo } from 'react';
import { useGetControlNetModelsQuery } from 'services/api/endpoints/models';
import { BaseModelType } from 'services/api/types';
type ParamControlNetModelProps = {
controlNetId: string;
@ -58,7 +59,7 @@ const ParamControlNetModel = (props: ParamControlNetModelProps) => {
data.push({
value: id,
label: model.model_name,
group: MODEL_TYPE_MAP[model.base_model],
group: MODEL_TYPE_MAP[model.base_model as BaseModelType],
disabled,
tooltip: disabled
? `Incompatible base model: ${model.base_model}`

View File

@ -11,6 +11,7 @@ import { modelIdToControlNetModelParam } from 'features/parameters/util/modelIdT
import { forEach } from 'lodash-es';
import { memo, useCallback, useMemo } from 'react';
import { useGetControlNetModelsQuery } from 'services/api/endpoints/models';
import { BaseModelType } from 'services/api/types';
import { FieldComponentProps } from './types';
const ControlNetModelInputFieldComponent = (
@ -53,7 +54,7 @@ const ControlNetModelInputFieldComponent = (
data.push({
value: id,
label: model.model_name,
group: MODEL_TYPE_MAP[model.base_model],
group: MODEL_TYPE_MAP[model.base_model as BaseModelType],
});
});
@ -87,7 +88,8 @@ const ControlNetModelInputFieldComponent = (
<IAIMantineSelect
tooltip={selectedModel?.description}
label={
selectedModel?.base_model && MODEL_TYPE_MAP[selectedModel?.base_model]
selectedModel?.base_model &&
MODEL_TYPE_MAP[selectedModel?.base_model as BaseModelType]
}
value={selectedModel?.id ?? null}
placeholder="Pick one"