check if model file already exists when symlinking
This commit is contained in:
parent
5903d6e885
commit
3faccc5afd
|
@ -11,7 +11,9 @@
|
|||
"\n",
|
||||
"Adapted from: https://colab.research.google.com/drive/1Iy-xW9t1-OQWhb0hNxueGij8phCyluOh\n",
|
||||
"\n",
|
||||
"In the Tools section at the bottom of the notebook there is a block to download the latest version of this notebook from Github.\n",
|
||||
"**Updating the Notebook**\n",
|
||||
"\n",
|
||||
"In the Tools section at the bottom of the notebook there is a block to download the latest version from Github.\n",
|
||||
"\n",
|
||||
"**Guides**\n",
|
||||
"- [Getting started on Paperspace](https://github.com/Engineer-of-Stuff/stable-diffusion-paperspace/blob/main/Docs/Paperspace%20Guide%20for%20Retards.md)\n",
|
||||
|
@ -353,7 +355,7 @@
|
|||
"source": [
|
||||
"### Link the models directory\n",
|
||||
"\n",
|
||||
"If it says `failed to create symbolic link: File exists` that's fine. It means you've already ran this block."
|
||||
"Create symlinks. The file will be stored in the models storage directory and linked to where the WebUI expects the files to be."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -366,6 +368,7 @@
|
|||
"import os\n",
|
||||
"for file in os.listdir(model_storage_dir):\n",
|
||||
" if file.endswith(\"ckpt\"):\n",
|
||||
" if not os.path.exists(f'/notebooks/stable-diffusion-webui/models/{file}'):\n",
|
||||
" !ln -s $model_storage_dir/$file /notebooks/stable-diffusion-webui/models/$file\n",
|
||||
" !ls -la --block-size=GB /notebooks/stable-diffusion-webui/models/$file"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue