Merge pull request #13253 from LeonZhao28/feature_skip_load_model_at_start
add --skip-load-model-at-start
This commit is contained in:
commit
1b9ca01e4f
|
@ -117,3 +117,4 @@ parser.add_argument('--api-server-stop', action='store_true', help='enable serve
|
||||||
parser.add_argument('--timeout-keep-alive', type=int, default=30, help='set timeout_keep_alive for uvicorn')
|
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-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("--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", )
|
||||||
|
|
|
@ -151,8 +151,8 @@ def initialize_rest(*, reload_script_modules=False):
|
||||||
|
|
||||||
from modules import devices
|
from modules import devices
|
||||||
devices.first_time_calculation()
|
devices.first_time_calculation()
|
||||||
|
if not shared.cmd_opts.skip_load_model_at_start:
|
||||||
Thread(target=load_model).start()
|
Thread(target=load_model).start()
|
||||||
|
|
||||||
from modules import shared_items
|
from modules import shared_items
|
||||||
shared_items.reload_hypernetworks()
|
shared_items.reload_hypernetworks()
|
||||||
|
|
Loading…
Reference in New Issue