Skip to content

Commit

Permalink
Run pnpm fix, regenerate schema
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonrising committed Dec 12, 2024
1 parent 1cc9b70 commit a48c5be
Show file tree
Hide file tree
Showing 9 changed files with 176 additions and 270 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
ParameterCLIPEmbedModel,
ParameterCLIPGEmbedModel,
ParameterCLIPLEmbedModel,
ParameterControlLoRAModel,
ParameterGuidance,
ParameterMaskBlurMethod,
ParameterModel,
Expand All @@ -24,7 +25,6 @@ import type {
ParameterSeed,
ParameterSteps,
ParameterStrength,
ParameterControlLoRAModel,
ParameterT5EncoderModel,
ParameterVAEModel,
} from 'features/parameters/types/parameterSchemas';
Expand Down
4 changes: 2 additions & 2 deletions invokeai/frontend/web/src/features/metadata/util/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { zControlField, zIPAdapterField, zModelIdentifierField, zT2IAdapterField
import type {
ParameterCFGRescaleMultiplier,
ParameterCFGScale,
ParameterControlLoRAModel,
ParameterGuidance,
ParameterHeight,
ParameterHRFEnabled,
Expand All @@ -46,7 +47,6 @@ import type {
ParameterSeed,
ParameterSteps,
ParameterStrength,
ParameterControlLoRAModel,
ParameterVAEModel,
ParameterWidth,
} from 'features/parameters/types/parameterSchemas';
Expand Down Expand Up @@ -76,12 +76,12 @@ import {
import { get, isArray, isString } from 'lodash-es';
import { getImageDTOSafe } from 'services/api/endpoints/images';
import {
isControlLoRAModelConfig,
isControlNetModelConfig,
isIPAdapterModelConfig,
isLoRAModelConfig,
isNonRefinerMainModelConfig,
isRefinerMainModelModelConfig,
isControlLoRAModelConfig,
isT2IAdapterModelConfig,
isVAEModelConfig,
} from 'services/api/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import { useTranslation } from 'react-i18next';
import {
useCLIPEmbedModels,
useCLIPVisionModels,
useControlLoRAModel,
useControlNetModels,
useEmbeddingModels,
useIPAdapterModels,
useLoRAModels,
useMainModels,
useRefinerModels,
useSpandrelImageToImageModels,
useControlLoRAModel,
useT2IAdapterModels,
useT5EncoderModels,
useVAEModels,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
isCLIPLEmbedModelFieldInputTemplate,
isColorFieldInputInstance,
isColorFieldInputTemplate,
isControlLoRAModelFieldInputInstance,
isControlLoRAModelFieldInputTemplate,
isControlNetModelFieldInputInstance,
isControlNetModelFieldInputTemplate,
isEnumFieldInputInstance,
Expand Down Expand Up @@ -51,8 +53,6 @@ import {
isSpandrelImageToImageModelFieldInputTemplate,
isStringFieldInputInstance,
isStringFieldInputTemplate,
isControlLoRAModelFieldInputInstance,
isControlLoRAModelFieldInputTemplate,
isT2IAdapterModelFieldInputInstance,
isT2IAdapterModelFieldInputTemplate,
isT5EncoderModelFieldInputInstance,
Expand All @@ -68,6 +68,7 @@ import CLIPEmbedModelFieldInputComponent from './inputs/CLIPEmbedModelFieldInput
import CLIPGEmbedModelFieldInputComponent from './inputs/CLIPGEmbedModelFieldInputComponent';
import CLIPLEmbedModelFieldInputComponent from './inputs/CLIPLEmbedModelFieldInputComponent';
import ColorFieldInputComponent from './inputs/ColorFieldInputComponent';
import ControlLoRAModelFieldInputComponent from './inputs/ControlLoraModelFieldInputComponent';
import ControlNetModelFieldInputComponent from './inputs/ControlNetModelFieldInputComponent';
import EnumFieldInputComponent from './inputs/EnumFieldInputComponent';
import FluxMainModelFieldInputComponent from './inputs/FluxMainModelFieldInputComponent';
Expand All @@ -83,7 +84,6 @@ import SD3MainModelFieldInputComponent from './inputs/SD3MainModelFieldInputComp
import SDXLMainModelFieldInputComponent from './inputs/SDXLMainModelFieldInputComponent';
import SpandrelImageToImageModelFieldInputComponent from './inputs/SpandrelImageToImageModelFieldInputComponent';
import StringFieldInputComponent from './inputs/StringFieldInputComponent';
import ControlLoRAModelFieldInputComponent from './inputs/ControlLoraModelFieldInputComponent';
import T2IAdapterModelFieldInputComponent from './inputs/T2IAdapterModelFieldInputComponent';
import T5EncoderModelFieldInputComponent from './inputs/T5EncoderModelFieldInputComponent';
import VAEModelFieldInputComponent from './inputs/VAEModelFieldInputComponent';
Expand Down Expand Up @@ -159,13 +159,8 @@ const InputFieldRenderer = ({ nodeId, fieldName }: InputFieldProps) => {
return <CLIPGEmbedModelFieldInputComponent nodeId={nodeId} field={fieldInstance} fieldTemplate={fieldTemplate} />;
}

if (
isControlLoRAModelFieldInputInstance(fieldInstance) &&
isControlLoRAModelFieldInputTemplate(fieldTemplate)
) {
return (
<ControlLoRAModelFieldInputComponent nodeId={nodeId} field={fieldInstance} fieldTemplate={fieldTemplate} />
);
if (isControlLoRAModelFieldInputInstance(fieldInstance) && isControlLoRAModelFieldInputTemplate(fieldTemplate)) {
return <ControlLoRAModelFieldInputComponent nodeId={nodeId} field={fieldInstance} fieldTemplate={fieldTemplate} />;
}

if (isFluxVAEModelFieldInputInstance(fieldInstance) && isFluxVAEModelFieldInputTemplate(fieldTemplate)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
import { memo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useControlLoRAModel } from 'services/api/hooks/modelsByType';
import { isControlLoRAModelConfig, type ControlLoRAModelConfig } from 'services/api/types';
import { type ControlLoRAModelConfig, isControlLoRAModelConfig } from 'services/api/types';

import type { FieldComponentProps } from './types';

Expand Down
4 changes: 2 additions & 2 deletions invokeai/frontend/web/src/features/nodes/store/nodesSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
CLIPGEmbedModelFieldValue,
CLIPLEmbedModelFieldValue,
ColorFieldValue,
ControlLoRAModelFieldValue,
ControlNetModelFieldValue,
EnumFieldValue,
FieldValue,
Expand All @@ -28,7 +29,6 @@ import type {
SpandrelImageToImageModelFieldValue,
StatefulFieldValue,
StringFieldValue,
ControlLoRAModelFieldValue,
T2IAdapterModelFieldValue,
T5EncoderModelFieldValue,
VAEModelFieldValue,
Expand All @@ -40,6 +40,7 @@ import {
zCLIPGEmbedModelFieldValue,
zCLIPLEmbedModelFieldValue,
zColorFieldValue,
zControlLoRAModelFieldValue,
zControlNetModelFieldValue,
zEnumFieldValue,
zFloatFieldValue,
Expand All @@ -56,7 +57,6 @@ import {
zSpandrelImageToImageModelFieldValue,
zStatefulFieldValue,
zStringFieldValue,
zControlLoRAModelFieldValue,
zT2IAdapterModelFieldValue,
zT5EncoderModelFieldValue,
zVAEModelFieldValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
CLIPGEmbedModelFieldInputTemplate,
CLIPLEmbedModelFieldInputTemplate,
ColorFieldInputTemplate,
ControlLoRAModelFieldInputTemplate,
ControlNetModelFieldInputTemplate,
EnumFieldInputTemplate,
FieldInputTemplate,
Expand All @@ -28,7 +29,6 @@ import type {
StatefulFieldType,
StatelessFieldInputTemplate,
StringFieldInputTemplate,
ControlLoRAModelFieldInputTemplate,
T2IAdapterModelFieldInputTemplate,
T5EncoderModelFieldInputTemplate,
VAEModelFieldInputTemplate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { AnyModelConfig } from 'services/api/types';
import {
isCLIPEmbedModelConfig,
isCLIPVisionModelConfig,
isControlLoRAModelConfig,
isControlNetModelConfig,
isControlNetOrT2IAdapterModelConfig,
isFluxMainModelModelConfig,
Expand All @@ -23,7 +24,6 @@ import {
isSD3MainModelModelConfig,
isSDXLMainModelModelConfig,
isSpandrelImageToImageModelConfig,
isControlLoRAModelConfig,
isT2IAdapterModelConfig,
isT5EncoderModelConfig,
isTIModelConfig,
Expand Down
Loading

0 comments on commit a48c5be

Please sign in to comment.