mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
make invokeai-model-install use the --root argument correctly
This commit is contained in:
parent
e76cc71e81
commit
8cd65755ef
@ -11,6 +11,7 @@ It is currently named model_install2.py, but will ultimately replace model_insta
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import curses
|
import curses
|
||||||
|
import pathlib
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
import warnings
|
import warnings
|
||||||
@ -594,18 +595,19 @@ def main() -> None:
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--root_dir",
|
"--root_dir",
|
||||||
dest="root",
|
dest="root",
|
||||||
type=str,
|
type=pathlib.Path,
|
||||||
default=None,
|
default=None,
|
||||||
help="path to root of install directory",
|
help="path to root of install directory",
|
||||||
)
|
)
|
||||||
opt = parser.parse_args()
|
opt = parser.parse_args()
|
||||||
|
|
||||||
invoke_args: dict[str, Any] = {}
|
invoke_args: dict[str, Any] = {}
|
||||||
if opt.root:
|
|
||||||
invoke_args["root"] = opt.root
|
|
||||||
if opt.full_precision:
|
if opt.full_precision:
|
||||||
invoke_args["precision"] = "float32"
|
invoke_args["precision"] = "float32"
|
||||||
config.update_config(invoke_args)
|
config.update_config(invoke_args)
|
||||||
|
if opt.root:
|
||||||
|
config.set_root(opt.root)
|
||||||
|
|
||||||
logger = InvokeAILogger().get_logger(config=config)
|
logger = InvokeAILogger().get_logger(config=config)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user