Pull before checking out a commit for SD

This commit is contained in:
cmdr2 2022-10-04 14:31:40 +05:30
parent 55bd8a34d7
commit ecda0d5b05

View File

@ -23,8 +23,8 @@ def fetch_repo():
if not is_developer_mode:
helpers.run("git reset --hard", run_in_folder=app.stable_diffusion_repo_dir_path)
helpers.run(f'git -c advice.detachedHead=false checkout "{commit_id}"', run_in_folder=app.stable_diffusion_repo_dir_path)
helpers.run("git pull", run_in_folder=app.stable_diffusion_repo_dir_path)
helpers.run(f'git -c advice.detachedHead=false checkout "{commit_id}"', run_in_folder=app.stable_diffusion_repo_dir_path)
else:
helpers.log("\nDownloading Stable Diffusion..\n")
helpers.log(f"Using commit: {commit_id}\n")