remove startup dependency on legacy models.yaml file

This commit is contained in:
Lincoln Stein
2024-02-21 10:18:30 -05:00
committed by psychedelicious
parent a6e1ac6096
commit ae14df97d6
11 changed files with 11 additions and 468 deletions

View File

@ -8,7 +8,6 @@ from invokeai.app.services.config import InvokeAIAppConfig
def check_invokeai_root(config: InvokeAIAppConfig):
try:
assert config.model_conf_path.exists(), f"{config.model_conf_path} not found"
assert config.db_path.parent.exists(), f"{config.db_path.parent} not found"
assert config.models_path.exists(), f"{config.models_path} not found"
if not config.ignore_missing_core_models:

View File

@ -939,7 +939,7 @@ def main() -> None:
# run this unconditionally in case new directories need to be added
initialize_rootdir(config.root_path, opt.yes_to_all)
# this will initialize the models.yaml file if not present
# this will initialize and populate the models tables if not present
install_helper = InstallHelper(config, logger)
models_to_download = default_user_selections(opt, install_helper)

View File

@ -1,7 +1,7 @@
"""
invokeai.backend.model_manager.merge exports:
merge_diffusion_models() -- combine multiple models by location and return a pipeline object
merge_diffusion_models_and_commit() -- combine multiple models by ModelManager ID and write to models.yaml
merge_diffusion_models_and_commit() -- combine multiple models by ModelManager ID and write to the models tables
Copyright (c) 2023 Lincoln Stein and the InvokeAI Development Team
"""
@ -101,7 +101,7 @@ class ModelMerger(object):
**kwargs: Any,
) -> AnyModelConfig:
"""
:param models: up to three models, designated by their InvokeAI models.yaml model name
:param models: up to three models, designated by their registered InvokeAI model name
:param merged_model_name: name for new model
:param alpha: The interpolation parameter. Ranges from 0 to 1. It affects the ratio in which the checkpoints are merged. A 0.8 alpha
would mean that the first model checkpoints would affect the final result far less than an alpha of 0.2

View File

@ -120,7 +120,7 @@ def parse_args() -> Namespace:
"--model",
type=str,
default="sd-1/main/stable-diffusion-v1-5",
help="Name of the diffusers model to train against, as defined in configs/models.yaml.",
help="Name of the diffusers model to train against.",
)
model_group.add_argument(
"--revision",