mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
upgrade only on demand
This commit is contained in:
@@ -40,6 +40,7 @@ Tech that can be integrated as part of the core workflow...
|
||||
- [QuickEmbedding](https://github.com/ethansmith2000/QuickEmbedding)
|
||||
- [DataComp CLiP](https://github.com/mlfoundations/open_clip/blob/main/docs/datacomp_models.md)
|
||||
- [ClipSeg](https://github.com/timojl/clipseg)
|
||||
- [DragGAN](https://github.com/XingangPan/DragGAN)
|
||||
- `TensorRT`
|
||||
|
||||
## Random
|
||||
|
||||
+3
-6
@@ -9,7 +9,6 @@ import subprocess
|
||||
import io
|
||||
import pstats
|
||||
import cProfile
|
||||
import argparse
|
||||
import pkg_resources
|
||||
|
||||
|
||||
@@ -28,7 +27,6 @@ args = Dot({
|
||||
'debug': False,
|
||||
'reset': False,
|
||||
'upgrade': False,
|
||||
'skip_update': False,
|
||||
'skip_extensions': False,
|
||||
'skip_requirements': False,
|
||||
'skip_git': False,
|
||||
@@ -503,7 +501,7 @@ def install_extensions():
|
||||
extensions_duplicates.append(ext)
|
||||
continue
|
||||
extensions_enabled.append(ext)
|
||||
if not args.skip_update:
|
||||
if args.upgrade:
|
||||
try:
|
||||
update(os.path.join(folder, ext))
|
||||
except Exception:
|
||||
@@ -542,7 +540,7 @@ def install_submodules():
|
||||
txt = git('submodule')
|
||||
log.info('Continuing setup')
|
||||
git('submodule --quiet update --init --recursive')
|
||||
if not args.skip_update:
|
||||
if args.upgrade:
|
||||
log.info('Updating submodules')
|
||||
submodules = txt.splitlines()
|
||||
for submodule in submodules:
|
||||
@@ -673,7 +671,7 @@ def check_version(offline=False, reset=True): # pylint: disable=unused-argument
|
||||
|
||||
|
||||
def update_wiki():
|
||||
if not args.skip_update:
|
||||
if args.upgrade:
|
||||
log.info('Updating Wiki')
|
||||
try:
|
||||
update(os.path.join(os.path.dirname(__file__), "wiki"))
|
||||
@@ -729,7 +727,6 @@ def add_args(parser):
|
||||
group.add_argument('--use-directml', default = False, action='store_true', help = "Use DirectML if no compatible GPU is detected, default: %(default)s")
|
||||
group.add_argument("--use-cuda", default=False, action='store_true', help="Force use nVidia CUDA backend, default: %(default)s")
|
||||
group.add_argument("--use-rocm", default=False, action='store_true', help="Force use AMD ROCm backend, default: %(default)s")
|
||||
group.add_argument('--skip-update', default = False, action='store_true', help = "Skip update of extensions and submodules, default: %(default)s")
|
||||
group.add_argument('--skip-requirements', default = False, action='store_true', help = "Skips checking and installing requirements, default: %(default)s")
|
||||
group.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s")
|
||||
group.add_argument('--skip-git', default = False, action='store_true', help = "Skips running all GIT operations, default: %(default)s")
|
||||
|
||||
+1
-1
Submodule modules/lycoris updated: 57d71913bf...0b7f34c16b
@@ -164,14 +164,17 @@ def initialize():
|
||||
|
||||
|
||||
def load_model():
|
||||
shared.state.begin()
|
||||
shared.state.job = 'load model'
|
||||
thread = Thread(target=lambda: shared.sd_model)
|
||||
thread.start()
|
||||
if opts.sd_checkpoint_autoload:
|
||||
shared.state.begin()
|
||||
shared.state.job = 'load model'
|
||||
thread = Thread(target=lambda: shared.sd_model)
|
||||
thread.start()
|
||||
shared.state.end()
|
||||
thread.join()
|
||||
else:
|
||||
log.debug('Model auto load disabled')
|
||||
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
|
||||
shared.opts.onchange("sd_model_dict", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False)
|
||||
shared.state.end()
|
||||
thread.join()
|
||||
startup_timer.record("checkpoint")
|
||||
|
||||
|
||||
@@ -301,11 +304,7 @@ def webui(restart=False):
|
||||
start_common()
|
||||
start_ui()
|
||||
modules.sd_models.write_metadata()
|
||||
if opts.sd_checkpoint_autoload:
|
||||
load_model()
|
||||
else:
|
||||
log.debug('Model auto load disabled')
|
||||
|
||||
load_model()
|
||||
log.info(f"Startup time: {startup_timer.summary()}")
|
||||
|
||||
if not restart:
|
||||
|
||||
Reference in New Issue
Block a user