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
bf48e8a03a
commit
3f5ab02da9
@ -392,7 +392,7 @@ class ConfigInterface:
|
|||||||
def __init__(self, services: InvocationServices) -> None:
|
def __init__(self, services: InvocationServices) -> None:
|
||||||
def get() -> InvokeAIAppConfig:
|
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.
|
# 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.
|
# We don't want nodes doing this, so we make a frozen copy.
|
||||||
|
|
||||||
config = services.configuration.get_config()
|
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)})
|
frozen_config = config.model_copy(update={"model_config": ConfigDict(frozen=True)})
|
||||||
return frozen_config
|
return frozen_config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user