diff --git a/StableDiffusionUI_Voldemort_paperspace.ipynb b/StableDiffusionUI_Voldemort_paperspace.ipynb index 97c046b..3acc2bb 100644 --- a/StableDiffusionUI_Voldemort_paperspace.ipynb +++ b/StableDiffusionUI_Voldemort_paperspace.ipynb @@ -176,9 +176,16 @@ "repo_storage_dir = Path(repo_storage_dir)\n", "stable_diffusion_webui_path = repo_storage_dir / 'stable-diffusion-webui'\n", "\n", - "if not (stable_diffusion_webui_path / '.git').exists():\n", + "if not (stable_diffusion_webui_path / '.git').exists(): \n", + " # It's possible that the stable_diffusion_webui_path already exists but the repo has not been downloaded.\n", + " # We will init the repo manually.\n", " !mkdir -p \"{stable_diffusion_webui_path}\"\n", - " !git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui \"{stable_diffusion_webui_path}\"\n", + " %cd \"{stable_diffusion_webui_path}\"\n", + " !git init\n", + " !git remote add origin https://github.com/AUTOMATIC1111/stable-diffusion-webui\n", + " !git fetch\n", + " !git checkout -t origin/master -f\n", + " # !git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui \"{stable_diffusion_webui_path}\"\n", "else:\n", " print('stable-diffusion-webui already downloaded, updating...')\n", " !cd \"{stable_diffusion_webui_path}\" && git pull # no % so we don't interfere with the main process\n",