move start timer

This commit is contained in:
wfjsw 2023-07-18 19:00:16 +08:00
parent 420cc8f68e
commit 3c570421d3
3 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
from modules import launch_utils
from modules import launch_utils, timer
args = launch_utils.args
@ -25,6 +25,8 @@ start = launch_utils.start
def main():
timer.startup_timer.record("start")
if not args.skip_prepare_environment:
prepare_environment()

View File

@ -213,7 +213,7 @@ for key, metadata in opts.data_labels.items():
value = None
optType = opts.typemap.get(type(metadata.default), type(value))
if optType == types.NoneType:
if isinstance(optType, types.NoneType):
pass
elif metadata is not None:
fields.update({key: (Optional[optType], Field(default=metadata.default, description=metadata.label))})

View File

@ -10,9 +10,6 @@ from functools import lru_cache
from modules import cmd_args, errors
from modules.paths_internal import script_path, extensions_dir
from modules import timer
timer.startup_timer.record("start")
args, _ = cmd_args.parser.parse_known_args()