Delay importing of cv2 until it is installed/updated

This commit is contained in:
rsl8 2024-01-27 23:57:12 +00:00
parent 22c839868b
commit d11ad2852d

View File

@ -21,7 +21,6 @@ import fooocus_version
from build_launcher import build_launcher
from modules.launch_util import is_installed, run, python, run_pip, requirements_met
from modules.model_loader import load_file_from_url
from modules import config
REINSTALL_ALL = False
@ -89,6 +88,7 @@ if args.gpu_device_id is not None:
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.gpu_device_id)
print("Set device to:", args.gpu_device_id)
from modules import config
def download_models():
for file_name, url in vae_approx_filenames: