diff --git a/invokeai/app/api/dependencies.py b/invokeai/app/api/dependencies.py index 5bda51730e..f67bc94412 100644 --- a/invokeai/app/api/dependencies.py +++ b/invokeai/app/api/dependencies.py @@ -56,7 +56,7 @@ class ApiDependencies: output_folder = config.output_path # TODO: build a file/path manager? - db_location = os.path.join(output_folder, "invokeai.db") + db_location = config.db_path graph_execution_manager = SqliteItemStorage[GraphExecutionState]( filename=db_location, table_name="graph_executions" diff --git a/invokeai/app/cli_app.py b/invokeai/app/cli_app.py index eb55ba45d2..71458a710b 100644 --- a/invokeai/app/cli_app.py +++ b/invokeai/app/cli_app.py @@ -218,7 +218,7 @@ def invoke_cli(): if config.use_memory_db: db_location = ":memory:" else: - db_location = os.path.join(output_folder, "invokeai.db") + db_location = config.db_path logger.info(f'InvokeAI database location is "{db_location}"') diff --git a/invokeai/app/invocations/latent.py b/invokeai/app/invocations/latent.py index 4dc1f6456c..1cc584a8a4 100644 --- a/invokeai/app/invocations/latent.py +++ b/invokeai/app/invocations/latent.py @@ -336,7 +336,6 @@ class TextToLatentsInvocation(BaseInvocation): model = self.get_model(context.services.model_manager) conditioning_data = self.get_conditioning_data(context, model) - print("type of control input: ", type(self.control)) control_data = self.prep_control_data(model=model, context=context, control_input=self.control, latents_shape=noise.shape, do_classifier_free_guidance=(self.cfg_scale >= 1.0)) diff --git a/invokeai/app/services/config.py b/invokeai/app/services/config.py index 9def959540..a4a537d6a2 100644 --- a/invokeai/app/services/config.py +++ b/invokeai/app/services/config.py @@ -152,6 +152,7 @@ from pydantic import BaseSettings, Field, parse_obj_as from typing import ClassVar, Dict, List, Literal, Type, Union, get_origin, get_type_hints, get_args INIT_FILE = Path('invokeai.yaml') +DB_FILE = Path('invokeai.db') LEGACY_INIT_FILE = Path('invokeai.init') # This global stores a singleton InvokeAIAppConfig configuration object @@ -361,6 +362,7 @@ setting environment variables INVOKEAI_. controlnet_dir : Path = Field(default="controlnets", description='Path to directory of ControlNet models.', category='Paths') legacy_conf_dir : Path = Field(default='configs/stable-diffusion', description='Path to directory of legacy checkpoint config files', category='Paths') lora_dir : Path = Field(default='loras', description='Path to InvokeAI LoRA model directory', category='Paths') + db_dir : Path = Field(default='databases', description='Path to InvokeAI databases directory', category='Paths') outdir : Path = Field(default='outputs', description='Default folder for output images', category='Paths') from_file : Path = Field(default=None, description='Take command input from the indicated file (command-line client only)', category='Paths') use_memory_db : bool = Field(default=False, description='Use in-memory database for storing image metadata', category='Paths') @@ -435,6 +437,13 @@ setting environment variables INVOKEAI_. ''' return self._resolve(self.outdir) + @property + def db_path(self)->Path: + ''' + Path to the invokeai.db file. + ''' + return self._resolve(self.db_dir) / DB_FILE + @property def model_conf_path(self)->Path: ''' diff --git a/invokeai/backend/install/invokeai_configure.py b/invokeai/backend/install/invokeai_configure.py index 6f964e9bc6..322fc527c8 100755 --- a/invokeai/backend/install/invokeai_configure.py +++ b/invokeai/backend/install/invokeai_configure.py @@ -655,11 +655,13 @@ def initialize_rootdir(root: str, yes_to_all: bool = False): print("** INITIALIZING INVOKEAI RUNTIME DIRECTORY **") for name in ( - "models", - "configs", - "embeddings", - "text-inversion-output", - "text-inversion-training-data", + "models", + "configs", + "embeddings", + "databases", + "controlnets", + "text-inversion-output", + "text-inversion-training-data", ): os.makedirs(os.path.join(root, name), exist_ok=True) diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index beb7d2753b..82d92d252b 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -779,7 +779,7 @@ class ModelManager(object): """ model_path: Path = None - thing = path_url_or_repo # to save typing + thing = str(path_url_or_repo) # to save typing self.logger.info(f"Probing {thing} for import") diff --git a/invokeai/backend/util/logging.py b/invokeai/backend/util/logging.py index e1a2a9acb7..970cfa9658 100644 --- a/invokeai/backend/util/logging.py +++ b/invokeai/backend/util/logging.py @@ -194,7 +194,6 @@ class InvokeAILogger(object): @classmethod def getLoggers(cls, config: InvokeAIAppConfig) -> list[logging.Handler]: handler_strs = config.log_handlers - print(f'handler_strs={handler_strs}') handlers = list() for handler in handler_strs: handler_name,*args = handler.split('=',2) diff --git a/invokeai/frontend/web/dist/index.html b/invokeai/frontend/web/dist/index.html index fe22477d1a..6e54dd4219 100644 --- a/invokeai/frontend/web/dist/index.html +++ b/invokeai/frontend/web/dist/index.html @@ -12,7 +12,7 @@ margin: 0; } - + diff --git a/invokeai/frontend/web/dist/locales/en.json b/invokeai/frontend/web/dist/locales/en.json index 94dff3934a..bf14dd5510 100644 --- a/invokeai/frontend/web/dist/locales/en.json +++ b/invokeai/frontend/web/dist/locales/en.json @@ -122,7 +122,9 @@ "noImagesInGallery": "No Images In Gallery", "deleteImage": "Delete Image", "deleteImageBin": "Deleted images will be sent to your operating system's Bin.", - "deleteImagePermanent": "Deleted images cannot be restored." + "deleteImagePermanent": "Deleted images cannot be restored.", + "images": "Images", + "assets": "Assets" }, "hotkeys": { "keyboardShortcuts": "Keyboard Shortcuts", @@ -452,6 +454,8 @@ "height": "Height", "scheduler": "Scheduler", "seed": "Seed", + "boundingBoxWidth": "Bounding Box Width", + "boundingBoxHeight": "Bounding Box Height", "imageToImage": "Image to Image", "randomizeSeed": "Randomize Seed", "shuffle": "Shuffle Seed", @@ -524,7 +528,7 @@ }, "settings": { "models": "Models", - "displayInProgress": "Display In-Progress Images", + "displayInProgress": "Display Progress Images", "saveSteps": "Save images every n steps", "confirmOnDelete": "Confirm On Delete", "displayHelpIcons": "Display Help Icons", @@ -564,6 +568,8 @@ "canvasMerged": "Canvas Merged", "sentToImageToImage": "Sent To Image To Image", "sentToUnifiedCanvas": "Sent to Unified Canvas", + "parameterSet": "Parameter set", + "parameterNotSet": "Parameter not set", "parametersSet": "Parameters Set", "parametersNotSet": "Parameters Not Set", "parametersNotSetDesc": "No metadata found for this image.", diff --git a/invokeai/frontend/web/stats.html b/invokeai/frontend/web/stats.html index c235d3f138..11c2ec3833 100644 --- a/invokeai/frontend/web/stats.html +++ b/invokeai/frontend/web/stats.html @@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {