diff --git a/invokeai/app/services/shared/sqlite_migrator/migrations/migration_7.py b/invokeai/app/services/shared/sqlite_migrator/migrations/migration_7.py index 6f5ddbf561..fa573d63a6 100644 --- a/invokeai/app/services/shared/sqlite_migrator/migrations/migration_7.py +++ b/invokeai/app/services/shared/sqlite_migrator/migrations/migration_7.py @@ -11,7 +11,7 @@ class Migration7Callback: def _drop_old_models_tables(self, cursor: sqlite3.Cursor) -> None: """Drops the old model_records, model_metadata, model_tags and tags tables.""" - tables = ["model_records", "model_metadata", "model_tags", "tags"] + tables = ["model_config", "model_metadata", "model_tags", "tags"] for table in tables: cursor.execute(f"DROP TABLE IF EXISTS {table};") diff --git a/invokeai/backend/stable_diffusion/seamless.py b/invokeai/backend/stable_diffusion/seamless.py index e5af27bf4c..2e22c19d0e 100644 --- a/invokeai/backend/stable_diffusion/seamless.py +++ b/invokeai/backend/stable_diffusion/seamless.py @@ -28,6 +28,10 @@ def _conv_forward_asymmetric(self, input, weight, bias): @contextmanager def set_seamless(model: Union[UNet2DConditionModel, AutoencoderKL, AutoencoderTiny], seamless_axes: List[str]): + if not seamless_axes: + yield + return + # Callable: (input: Tensor, weight: Tensor, bias: Optional[Tensor]) -> Tensor to_restore: list[tuple[nn.Conv2d | nn.ConvTranspose2d, Callable]] = [] try: diff --git a/invokeai/backend/util/db_maintenance.py b/invokeai/backend/util/db_maintenance.py index d5f6200ad9..e7d3432121 100644 --- a/invokeai/backend/util/db_maintenance.py +++ b/invokeai/backend/util/db_maintenance.py @@ -31,6 +31,9 @@ class ConfigMapper: YAML_FILENAME = "invokeai.yaml" DATABASE_FILENAME = "invokeai.db" + DEFAULT_OUTDIR = "outputs" + DEFAULT_DB_DIR = "databases" + database_path = None database_backup_dir = None outputs_path = None @@ -50,12 +53,18 @@ class ConfigMapper: def __load_from_root_config(self, invoke_root): """Validate a yaml path exists, confirm the user wants to use it and load config.""" yaml_path = os.path.join(invoke_root, self.YAML_FILENAME) + if not os.path.exists(yaml_path): + print(f"Unable to find invokeai.yaml at {yaml_path}!") + return False if os.path.exists(yaml_path): db_dir, outdir = self.__load_paths_from_yaml_file(yaml_path) - if db_dir is None or outdir is None: - print("The invokeai.yaml file was found but is missing the db_dir and/or outdir setting!") - return False + if db_dir is None: + db_dir = self.DEFAULT_DB_DIR + print(f"The invokeai.yaml file was found but is missing the db_dir setting! Defaulting to {db_dir}") + if outdir is None: + outdir = self.DEFAULT_OUTDIR + print(f"The invokeai.yaml file was found but is missing the outdir setting! Defaulting to {outdir}") if os.path.isabs(db_dir): self.database_path = os.path.join(db_dir, self.DATABASE_FILENAME)