Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#13253 from LeonZhao28/feature_skip_l…
Browse files Browse the repository at this point in the history
…oad_model_at_start

add --skip-load-model-at-start
  • Loading branch information
AUTOMATIC1111 authored Sep 30, 2023
2 parents 102b661 + ab3d352 commit 1b9ca01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/cmd_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@
parser.add_argument('--timeout-keep-alive', type=int, default=30, help='set timeout_keep_alive for uvicorn')
parser.add_argument("--disable-all-extensions", action='store_true', help="prevent all extensions from running regardless of any other settings", default=False)
parser.add_argument("--disable-extra-extensions", action='store_true', help="prevent all extensions except built-in from running regardless of any other settings", default=False)
parser.add_argument("--skip-load-model-at-start", action='store_true', help="if load a model at web start, only take effect when --nowebui", )
4 changes: 2 additions & 2 deletions modules/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def load_model():

from modules import devices
devices.first_time_calculation()

Thread(target=load_model).start()
if not shared.cmd_opts.skip_load_model_at_start:
Thread(target=load_model).start()

from modules import shared_items
shared_items.reload_hypernetworks()
Expand Down

0 comments on commit 1b9ca01

Please sign in to comment.