prevent model install crash "torch needs to be restarted with spawn"

This commit is contained in:
Lincoln Stein
2023-07-05 15:38:07 -04:00
parent 5fe722900d
commit ad5d90aca8
2 changed files with 3 additions and 5 deletions

View File

@ -691,9 +691,8 @@ def select_and_download_models(opt: Namespace):
# this is where the TUI is called
else:
# needed because the torch library is loaded, even though we don't use it
# currently commented out because it has started generating errors (?)
# torch.multiprocessing.set_start_method("spawn")
# needed to support the probe() method running under a subprocess
torch.multiprocessing.set_start_method("spawn")
# the third argument is needed in the Windows 11 environment in
# order to launch and resize a console window running this program