mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
parent
4d2b87ea01
commit
b8b46aec09
@ -12,7 +12,6 @@ import { selectIsBusy } from 'features/system/store/systemSelectors';
|
|||||||
import { forEach } from 'lodash-es';
|
import { forEach } from 'lodash-es';
|
||||||
import { memo, useCallback, useMemo } from 'react';
|
import { memo, useCallback, useMemo } from 'react';
|
||||||
import { useGetControlNetModelsQuery } from 'services/api/endpoints/models';
|
import { useGetControlNetModelsQuery } from 'services/api/endpoints/models';
|
||||||
import { BaseModelType } from 'services/api/types';
|
|
||||||
|
|
||||||
type ParamControlNetModelProps = {
|
type ParamControlNetModelProps = {
|
||||||
controlNetId: string;
|
controlNetId: string;
|
||||||
@ -59,7 +58,7 @@ const ParamControlNetModel = (props: ParamControlNetModelProps) => {
|
|||||||
data.push({
|
data.push({
|
||||||
value: id,
|
value: id,
|
||||||
label: model.model_name,
|
label: model.model_name,
|
||||||
group: MODEL_TYPE_MAP[model.base_model as BaseModelType],
|
group: MODEL_TYPE_MAP[model.base_model],
|
||||||
disabled,
|
disabled,
|
||||||
tooltip: disabled
|
tooltip: disabled
|
||||||
? `Incompatible base model: ${model.base_model}`
|
? `Incompatible base model: ${model.base_model}`
|
||||||
|
@ -11,7 +11,6 @@ import { modelIdToControlNetModelParam } from 'features/parameters/util/modelIdT
|
|||||||
import { forEach } from 'lodash-es';
|
import { forEach } from 'lodash-es';
|
||||||
import { memo, useCallback, useMemo } from 'react';
|
import { memo, useCallback, useMemo } from 'react';
|
||||||
import { useGetControlNetModelsQuery } from 'services/api/endpoints/models';
|
import { useGetControlNetModelsQuery } from 'services/api/endpoints/models';
|
||||||
import { BaseModelType } from 'services/api/types';
|
|
||||||
import { FieldComponentProps } from './types';
|
import { FieldComponentProps } from './types';
|
||||||
|
|
||||||
const ControlNetModelInputFieldComponent = (
|
const ControlNetModelInputFieldComponent = (
|
||||||
@ -54,7 +53,7 @@ const ControlNetModelInputFieldComponent = (
|
|||||||
data.push({
|
data.push({
|
||||||
value: id,
|
value: id,
|
||||||
label: model.model_name,
|
label: model.model_name,
|
||||||
group: MODEL_TYPE_MAP[model.base_model as BaseModelType],
|
group: MODEL_TYPE_MAP[model.base_model],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -88,8 +87,7 @@ const ControlNetModelInputFieldComponent = (
|
|||||||
<IAIMantineSelect
|
<IAIMantineSelect
|
||||||
tooltip={selectedModel?.description}
|
tooltip={selectedModel?.description}
|
||||||
label={
|
label={
|
||||||
selectedModel?.base_model &&
|
selectedModel?.base_model && MODEL_TYPE_MAP[selectedModel?.base_model]
|
||||||
MODEL_TYPE_MAP[selectedModel?.base_model as BaseModelType]
|
|
||||||
}
|
}
|
||||||
value={selectedModel?.id ?? null}
|
value={selectedModel?.id ?? null}
|
||||||
placeholder="Pick one"
|
placeholder="Pick one"
|
||||||
|
Loading…
Reference in New Issue
Block a user