mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(nodes): add comments for ConfigInterface
This commit is contained in:
parent
fcfc0c9a94
commit
a976130899
@ -392,7 +392,7 @@ class ConfigInterface:
|
||||
def __init__(self, services: InvocationServices) -> None:
|
||||
def get() -> InvokeAIAppConfig:
|
||||
"""
|
||||
Gets the app's config.
|
||||
Gets the app's config. The config is read-only; attempts to mutate it will raise an error.
|
||||
"""
|
||||
|
||||
# The config can be changed at runtime.
|
||||
@ -400,6 +400,7 @@ class ConfigInterface:
|
||||
# We don't want nodes doing this, so we make a frozen copy.
|
||||
|
||||
config = services.configuration.get_config()
|
||||
# TODO(psyche): If config cannot be changed at runtime, should we cache this?
|
||||
frozen_config = config.model_copy(update={"model_config": ConfigDict(frozen=True)})
|
||||
return frozen_config
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user