feat(mm): add AnyDefaultSettings union

This commit is contained in:
psychedelicious 2024-03-08 15:37:31 +11:00 committed by Brandon
parent 8ce485b036
commit 80c2a4b925

View File

@ -22,7 +22,7 @@ Validation errors will raise an InvalidModelConfigException error.
import time
from enum import Enum
from typing import Literal, Optional, Type, Union
from typing import Literal, Optional, Type, TypeAlias, Union
import torch
from diffusers.models.modeling_utils import ModelMixin
@ -387,6 +387,7 @@ AnyModelConfig = Annotated[
]
AnyModelConfigValidator = TypeAdapter(AnyModelConfig)
AnyDefaultSettings: TypeAlias = Union[MainModelDefaultSettings, ControlAdapterDefaultSettings]
class ModelConfigFactory(object):