fix(mm): add control adapter default settings to ModelRecordChanges schema

This is needed to update Control Adapter defaults.
This commit is contained in:
psychedelicious 2024-03-08 20:19:10 +11:00 committed by Brandon
parent 4ee4a801c6
commit 7a87ebb3b2

View File

@ -18,7 +18,12 @@ from invokeai.backend.model_manager import (
ModelFormat,
ModelType,
)
from invokeai.backend.model_manager.config import MainModelDefaultSettings, ModelVariantType, SchedulerPredictionType
from invokeai.backend.model_manager.config import (
ControlAdapterDefaultSettings,
MainModelDefaultSettings,
ModelVariantType,
SchedulerPredictionType,
)
class DuplicateModelException(Exception):
@ -68,7 +73,7 @@ class ModelRecordChanges(BaseModelExcludeNull):
description: Optional[str] = Field(description="Model description", default=None)
base: Optional[BaseModelType] = Field(description="The base model.", default=None)
trigger_phrases: Optional[set[str]] = Field(description="Set of trigger phrases for this model", default=None)
default_settings: Optional[MainModelDefaultSettings] = Field(
default_settings: Optional[MainModelDefaultSettings | ControlAdapterDefaultSettings] = Field(
description="Default settings for this model", default=None
)