From 7d2e84059081945a16ad31680860de953cfd0158 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 27 Feb 2024 18:49:40 +1100 Subject: [PATCH] tidy: remove some traces of ONNX --- invokeai/backend/model_manager/config.py | 32 ------------------- .../ModelManagerPanel/ModelTypeFilter.tsx | 1 - .../ModelPanel/Fields/RepoVariantSelect.tsx | 3 -- .../features/nodes/util/schema/parseSchema.ts | 9 +----- 4 files changed, 1 insertion(+), 44 deletions(-) diff --git a/invokeai/backend/model_manager/config.py b/invokeai/backend/model_manager/config.py index 7a1f3ca946..78635636b9 100644 --- a/invokeai/backend/model_manager/config.py +++ b/invokeai/backend/model_manager/config.py @@ -234,37 +234,6 @@ class MainDiffusersConfig(_DiffusersConfig, _MainConfig): type: Literal[ModelType.Main] = ModelType.Main -class ONNXSD1Config(_MainConfig): - """Model config for ONNX format models based on sd-1.""" - - type: Literal[ModelType.ONNX] = ModelType.ONNX - format: Literal[ModelFormat.Onnx, ModelFormat.Olive] - base: Literal[BaseModelType.StableDiffusion1] = BaseModelType.StableDiffusion1 - prediction_type: SchedulerPredictionType = SchedulerPredictionType.Epsilon - upcast_attention: bool = False - - -class ONNXSD2Config(_MainConfig): - """Model config for ONNX format models based on sd-2.""" - - type: Literal[ModelType.ONNX] = ModelType.ONNX - format: Literal[ModelFormat.Onnx, ModelFormat.Olive] - # No yaml config file for ONNX, so these are part of config - base: Literal[BaseModelType.StableDiffusion2] = BaseModelType.StableDiffusion2 - prediction_type: SchedulerPredictionType = SchedulerPredictionType.VPrediction - upcast_attention: bool = True - - -class ONNXSDXLConfig(_MainConfig): - """Model config for ONNX format models based on sdxl.""" - - type: Literal[ModelType.ONNX] = ModelType.ONNX - format: Literal[ModelFormat.Onnx, ModelFormat.Olive] - # No yaml config file for ONNX, so these are part of config - base: Literal[BaseModelType.StableDiffusionXL] = BaseModelType.StableDiffusionXL - prediction_type: SchedulerPredictionType = SchedulerPredictionType.VPrediction - - class IPAdapterConfig(ModelConfigBase): """Model config for IP Adaptor format models.""" @@ -287,7 +256,6 @@ class T2IConfig(ModelConfigBase): format: Literal[ModelFormat.Diffusers] -_ONNXConfig = Annotated[Union[ONNXSD1Config, ONNXSD2Config, ONNXSDXLConfig], Field(discriminator="base")] _ControlNetConfig = Annotated[ Union[ControlNetDiffusersConfig, ControlNetCheckpointConfig], Field(discriminator="format"), diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelTypeFilter.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelTypeFilter.tsx index b58719078f..71606b4096 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelTypeFilter.tsx +++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelTypeFilter.tsx @@ -14,7 +14,6 @@ export const MODEL_TYPE_LABELS: { [key: string]: string } = { t2i_adapter: 'T2I Adapter', ip_adapter: 'IP Adapter', clip_vision: 'Clip Vision', - onnx: 'Onnx', }; export const ModelTypeFilter = () => { diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Fields/RepoVariantSelect.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Fields/RepoVariantSelect.tsx index 74793be789..66134dbfc0 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Fields/RepoVariantSelect.tsx +++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelPanel/Fields/RepoVariantSelect.tsx @@ -10,9 +10,6 @@ const options: ComboboxOption[] = [ { value: 'none', label: '-' }, { value: 'fp16', label: 'fp16' }, { value: 'fp32', label: 'fp32' }, - { value: 'onnx', label: 'onnx' }, - { value: 'openvino', label: 'openvino' }, - { value: 'flax', label: 'flax' }, ]; const RepoVariantSelect = (props: UseControllerProps) => { diff --git a/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts b/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts index f9bce27372..990c517ad3 100644 --- a/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts +++ b/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts @@ -22,14 +22,7 @@ const RESERVED_INPUT_FIELD_NAMES = ['id', 'type', 'use_cache']; const RESERVED_OUTPUT_FIELD_NAMES = ['type']; const RESERVED_FIELD_TYPES = ['IsIntermediate']; -const invocationDenylist: string[] = [ - 'graph', - 'linear_ui_output', - 'l2i_onnx', - 'prompt_onnx', - 't2l_onnx', - 'onnx_model_loader', -]; +const invocationDenylist: string[] = ['graph', 'linear_ui_output']; const isReservedInputField = (nodeType: string, fieldName: string) => { if (RESERVED_INPUT_FIELD_NAMES.includes(fieldName)) {