mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy: remove some traces of ONNX
This commit is contained in:
parent
f0b3485ce9
commit
7d2e840590
@ -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"),
|
||||
|
@ -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 = () => {
|
||||
|
@ -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 = <T extends AnyModelConfig>(props: UseControllerProps<T>) => {
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user