init repo in empty dir
This commit is contained in:
parent
8ced0c411f
commit
ae57c5b137
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue