mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
move invokeai.db to ~/invokeai/databases
- The invokeai.db database file has now been moved into `INVOKEAIROOT/databases`. Using plural here for possible future with more than one database file. - Removed a few dangling debug messages that appeared during testing. - Rebuilt frontend to test web.
This commit is contained in:
parent
0b49995659
commit
31e97ead2a
@ -56,7 +56,7 @@ class ApiDependencies:
|
|||||||
output_folder = config.output_path
|
output_folder = config.output_path
|
||||||
|
|
||||||
# TODO: build a file/path manager?
|
# 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](
|
graph_execution_manager = SqliteItemStorage[GraphExecutionState](
|
||||||
filename=db_location, table_name="graph_executions"
|
filename=db_location, table_name="graph_executions"
|
||||||
|
@ -218,7 +218,7 @@ def invoke_cli():
|
|||||||
if config.use_memory_db:
|
if config.use_memory_db:
|
||||||
db_location = ":memory:"
|
db_location = ":memory:"
|
||||||
else:
|
else:
|
||||||
db_location = os.path.join(output_folder, "invokeai.db")
|
db_location = config.db_path
|
||||||
|
|
||||||
logger.info(f'InvokeAI database location is "{db_location}"')
|
logger.info(f'InvokeAI database location is "{db_location}"')
|
||||||
|
|
||||||
|
@ -336,7 +336,6 @@ class TextToLatentsInvocation(BaseInvocation):
|
|||||||
model = self.get_model(context.services.model_manager)
|
model = self.get_model(context.services.model_manager)
|
||||||
conditioning_data = self.get_conditioning_data(context, model)
|
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,
|
control_data = self.prep_control_data(model=model, context=context, control_input=self.control,
|
||||||
latents_shape=noise.shape,
|
latents_shape=noise.shape,
|
||||||
do_classifier_free_guidance=(self.cfg_scale >= 1.0))
|
do_classifier_free_guidance=(self.cfg_scale >= 1.0))
|
||||||
|
@ -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
|
from typing import ClassVar, Dict, List, Literal, Type, Union, get_origin, get_type_hints, get_args
|
||||||
|
|
||||||
INIT_FILE = Path('invokeai.yaml')
|
INIT_FILE = Path('invokeai.yaml')
|
||||||
|
DB_FILE = Path('invokeai.db')
|
||||||
LEGACY_INIT_FILE = Path('invokeai.init')
|
LEGACY_INIT_FILE = Path('invokeai.init')
|
||||||
|
|
||||||
# This global stores a singleton InvokeAIAppConfig configuration object
|
# This global stores a singleton InvokeAIAppConfig configuration object
|
||||||
@ -361,6 +362,7 @@ setting environment variables INVOKEAI_<setting>.
|
|||||||
controlnet_dir : Path = Field(default="controlnets", description='Path to directory of ControlNet models.', category='Paths')
|
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')
|
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')
|
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')
|
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')
|
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')
|
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_<setting>.
|
|||||||
'''
|
'''
|
||||||
return self._resolve(self.outdir)
|
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
|
@property
|
||||||
def model_conf_path(self)->Path:
|
def model_conf_path(self)->Path:
|
||||||
'''
|
'''
|
||||||
|
@ -655,11 +655,13 @@ def initialize_rootdir(root: str, yes_to_all: bool = False):
|
|||||||
print("** INITIALIZING INVOKEAI RUNTIME DIRECTORY **")
|
print("** INITIALIZING INVOKEAI RUNTIME DIRECTORY **")
|
||||||
|
|
||||||
for name in (
|
for name in (
|
||||||
"models",
|
"models",
|
||||||
"configs",
|
"configs",
|
||||||
"embeddings",
|
"embeddings",
|
||||||
"text-inversion-output",
|
"databases",
|
||||||
"text-inversion-training-data",
|
"controlnets",
|
||||||
|
"text-inversion-output",
|
||||||
|
"text-inversion-training-data",
|
||||||
):
|
):
|
||||||
os.makedirs(os.path.join(root, name), exist_ok=True)
|
os.makedirs(os.path.join(root, name), exist_ok=True)
|
||||||
|
|
||||||
|
@ -779,7 +779,7 @@ class ModelManager(object):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
model_path: Path = None
|
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")
|
self.logger.info(f"Probing {thing} for import")
|
||||||
|
|
||||||
|
@ -194,7 +194,6 @@ class InvokeAILogger(object):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def getLoggers(cls, config: InvokeAIAppConfig) -> list[logging.Handler]:
|
def getLoggers(cls, config: InvokeAIAppConfig) -> list[logging.Handler]:
|
||||||
handler_strs = config.log_handlers
|
handler_strs = config.log_handlers
|
||||||
print(f'handler_strs={handler_strs}')
|
|
||||||
handlers = list()
|
handlers = list()
|
||||||
for handler in handler_strs:
|
for handler in handler_strs:
|
||||||
handler_name,*args = handler.split('=',2)
|
handler_name,*args = handler.split('=',2)
|
||||||
|
2
invokeai/frontend/web/dist/index.html
vendored
2
invokeai/frontend/web/dist/index.html
vendored
@ -12,7 +12,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="module" crossorigin src="./assets/index-6bec0420.js"></script>
|
<script type="module" crossorigin src="./assets/index-b060dbab.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body dir="ltr">
|
<body dir="ltr">
|
||||||
|
10
invokeai/frontend/web/dist/locales/en.json
vendored
10
invokeai/frontend/web/dist/locales/en.json
vendored
@ -122,7 +122,9 @@
|
|||||||
"noImagesInGallery": "No Images In Gallery",
|
"noImagesInGallery": "No Images In Gallery",
|
||||||
"deleteImage": "Delete Image",
|
"deleteImage": "Delete Image",
|
||||||
"deleteImageBin": "Deleted images will be sent to your operating system's Bin.",
|
"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": {
|
"hotkeys": {
|
||||||
"keyboardShortcuts": "Keyboard Shortcuts",
|
"keyboardShortcuts": "Keyboard Shortcuts",
|
||||||
@ -452,6 +454,8 @@
|
|||||||
"height": "Height",
|
"height": "Height",
|
||||||
"scheduler": "Scheduler",
|
"scheduler": "Scheduler",
|
||||||
"seed": "Seed",
|
"seed": "Seed",
|
||||||
|
"boundingBoxWidth": "Bounding Box Width",
|
||||||
|
"boundingBoxHeight": "Bounding Box Height",
|
||||||
"imageToImage": "Image to Image",
|
"imageToImage": "Image to Image",
|
||||||
"randomizeSeed": "Randomize Seed",
|
"randomizeSeed": "Randomize Seed",
|
||||||
"shuffle": "Shuffle Seed",
|
"shuffle": "Shuffle Seed",
|
||||||
@ -524,7 +528,7 @@
|
|||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"models": "Models",
|
"models": "Models",
|
||||||
"displayInProgress": "Display In-Progress Images",
|
"displayInProgress": "Display Progress Images",
|
||||||
"saveSteps": "Save images every n steps",
|
"saveSteps": "Save images every n steps",
|
||||||
"confirmOnDelete": "Confirm On Delete",
|
"confirmOnDelete": "Confirm On Delete",
|
||||||
"displayHelpIcons": "Display Help Icons",
|
"displayHelpIcons": "Display Help Icons",
|
||||||
@ -564,6 +568,8 @@
|
|||||||
"canvasMerged": "Canvas Merged",
|
"canvasMerged": "Canvas Merged",
|
||||||
"sentToImageToImage": "Sent To Image To Image",
|
"sentToImageToImage": "Sent To Image To Image",
|
||||||
"sentToUnifiedCanvas": "Sent to Unified Canvas",
|
"sentToUnifiedCanvas": "Sent to Unified Canvas",
|
||||||
|
"parameterSet": "Parameter set",
|
||||||
|
"parameterNotSet": "Parameter not set",
|
||||||
"parametersSet": "Parameters Set",
|
"parametersSet": "Parameters Set",
|
||||||
"parametersNotSet": "Parameters Not Set",
|
"parametersNotSet": "Parameters Not Set",
|
||||||
"parametersNotSetDesc": "No metadata found for this image.",
|
"parametersNotSetDesc": "No metadata found for this image.",
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user