diff --git a/invokeai/app/services/shared/invocation_context.py b/invokeai/app/services/shared/invocation_context.py index b48a6acc54..cd88ec876d 100644 --- a/invokeai/app/services/shared/invocation_context.py +++ b/invokeai/app/services/shared/invocation_context.py @@ -357,24 +357,10 @@ class ModelsInterface(InvocationContextInterface): class ConfigInterface(InvocationContextInterface): - def __init__(self, services: InvocationServices, context_data: InvocationContextData) -> None: - super().__init__(services, context_data) - # Config cache, only populated at runtime if requested - self._frozen_config: Optional[InvokeAIAppConfig] = None - def get(self) -> InvokeAIAppConfig: - """ - Gets the app's config. The config is read-only; attempts to mutate it will raise an error. - """ + """Gets the app's config.""" - if self._frozen_config is None: - # The config is a live pydantic model and can be changed at runtime. - # We don't want nodes doing this, so we make a frozen copy. - self._frozen_config = self._services.configuration.get_config().model_copy( - update={"model_config": ConfigDict(frozen=True)} - ) - - return self._frozen_config + return self._services.configuration.get_config() class UtilInterface(InvocationContextInterface):