run(f'"{git}" -C {dir} fetch',f"Fetching updates for {name}...",f"Couldn't fetch {name}")
defrun_pip(args,desc=None):
run(f'"{git}" -C {dir} checkout {commithash}',f"Checking out commint for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}")
run(f'"{git}" -C {dir} fetch',f"Fetching updates for {name}...",f"Couldn't fetch {name}")
print(f"Commit hash: {commit}")
run(f'"{git}" -C {dir} checkout {commithash}',f"Checking out commint for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}")
return
run(f'"{git}" clone "{url}" "{dir}"',f"Cloning {name} into {dir}...",f"Couldn't clone {name}")
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
run(f'"{python}" -m {torch_command}',"Installing torch and torchvision","Couldn't install torch")
ifnotis_installed("gfpgan"):
ifnotskip_torch_cuda_test:
run_pip(f"install {gfpgan_package}","gfpgan")
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")