InvokeAI/scripts
psychedelicious 3fb116155b refactor(config): simplified config
- Remove OmegaConf. It functioned as an intermediary data format, between YAML/argparse and pydantic. It's not necessary - we can parse YAML or CLI args directly with pydantic.

- Remove dynamic CLI args. Only `root` is explicitly supported. This greatly simplifies config handling. Configuration is done by editing the YAML file. Frequently-used args can be added if there is a demand.

- A separate arg parser is created to handle the slimmed-down CLI args. It's run immediately in the `invokeai-web` script to handle `--version` and `--help`. It is also used inside the singleton config getter (see below).

- Remove categories from the config. Our settings model is mostly flat. Handling categories adds complexity for both us and users - we have to handle transforming a flat config to categorized config (and vice-versa), while users have to be careful with indentation in their YAML file.

- Add a `meta` key to the config file. Currently, this holds the config schema version only. It is not a part of the config object itself.

- Remove legacy settings that are no longer referenced, or were effectively no-op settings when referenced in code.

- Implement simple migration logic to for v3 configs. If migration is successful, the v3 config file is backed up to `invokeai.yaml.bak` and the new config written to `invokeai.yaml`.

- Previously, the singleton config was accessed by calling `InvokeAIAppConfig.get_config()`. This returned an instance of `InvokeAIAppConfig`, which _also_ has the `get_config` function. This created to a confusing situation where you weren't sure if you needed to call `get_config` or just use the config object. This method is replaced by a standalone `get_config` function which returns a singleton config object.

- Wrap CLI arg parsing (for `root`) and loading/migrating `invokeai.yaml` into the new `get_config()` function.

- Move `generate_config_docstrings` into standalone utility function.

- Make `root` a private attr (`_root`). This reduces the temptation to directly modify and or use this sensitive field and ensures it is neither serialized nor read from input data. Use `root_path` to access the resolved root path, or `set_root` to set the root to something.
2024-03-19 09:24:28 +11:00
..
configure_invokeai.py chore: ruff format 2023-11-11 10:55:40 +11:00
generate_openapi_schema.py feat(scripts): add script to generate openapi schema 2024-03-07 10:16:44 +11:00
generate_profile_graphs.sh feat: add profiler util (#5601) 2024-01-31 10:51:57 +00:00
images2prompt.py isort wip 2 2023-09-12 13:01:58 -04:00
invokeai-cli.py isort wip 2 2023-09-12 13:01:58 -04:00
invokeai-model-install.py remove additional unused scripts 2023-09-02 10:05:29 -04:00
invokeai-web.py refactor(config): simplified config 2024-03-19 09:24:28 +11:00
make_models_markdown_table.py isort wip 2 2023-09-12 13:01:58 -04:00
probe-model.py feat(mm): faster hashing for spinning disk HDDs 2024-03-14 15:54:42 +11:00
pypi_helper.py Apply black 2023-07-27 10:54:01 -04:00
scan_models_directory.py chore: ruff check - fix flake8-comprensions 2023-11-11 10:55:23 +11:00
sd-metadata.py isort wip 2 2023-09-12 13:01:58 -04:00
update_config_docstring.py refactor(config): simplified config 2024-03-19 09:24:28 +11:00