Fix symlinking reversal and wrong folder name
This commit is contained in:
parent
df1b68baf8
commit
417227fdf6
|
@ -70,11 +70,11 @@
|
|||
"repo_storage_dir = '/storage/stable-diffusion' # Where to store your Stable Diffusion-related files.\n",
|
||||
"\n",
|
||||
"pip_cache_dir = None # The installer can cache pip wheels so you don't have to re-download them\n",
|
||||
" # next time you start the machine. I recommed setting it to '/storage/pip/cache'.\n",
|
||||
" # every time you start the machine. I recommed setting it to '/storage/pip/cache'\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# Other optional settings\n",
|
||||
"# You don't have to change these if you don't want to\n",
|
||||
"# You don't have to change these if you don't want to.\n",
|
||||
"\n",
|
||||
"symlink_to_notebooks = True # Enables the creation of symlinks back to /notebooks/\n",
|
||||
"\n",
|
||||
|
@ -167,12 +167,12 @@
|
|||
" !cd \"{stable_diffusion_webui_path}\" && git pull # no % so we don't interfere with the main process\n",
|
||||
"\n",
|
||||
"!mkdir -p \"{repo_storage_dir / 'stable-diffusion-webui' / 'outputs'}\"\n",
|
||||
"!mkdir -p \"{repo_storage_dir / 'stable-diffusion-webui' / 'logs'}\"\n",
|
||||
"!mkdir -p \"{repo_storage_dir / 'stable-diffusion-webui' / 'log'}\"\n",
|
||||
"\n",
|
||||
"symlinks = [\n",
|
||||
" (repo_storage_dir / 'stable-diffusion-webui', Path('/notebooks/stable-diffusion-webui')),\n",
|
||||
" (repo_storage_dir / 'stable-diffusion-webui' / 'outputs', Path('/notebooks/outputs')),\n",
|
||||
" (repo_storage_dir / 'stable-diffusion-webui' / 'logs', repo_storage_dir / 'stable-diffusion-webui' / 'outputs' / 'logs'),\n",
|
||||
" (repo_storage_dir / 'stable-diffusion-webui' / 'log', repo_storage_dir / 'stable-diffusion-webui' / 'outputs' / 'log'),\n",
|
||||
" (Path('/storage'), Path('/notebooks/storage')),\n",
|
||||
" ]\n",
|
||||
"\n",
|
||||
|
@ -186,7 +186,7 @@
|
|||
" dest.unlink()\n",
|
||||
" if not dest.exists():\n",
|
||||
" os.symlink(src, dest)\n",
|
||||
" print(src, '->', os.path.realpath(dest))"
|
||||
" print(os.path.realpath(dest), '->', dest)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1157,8 +1157,8 @@
|
|||
"from datetime import datetime\n",
|
||||
"datetime_str = datetime.now().strftime('%m-%d-%Y_%H:%M:%S')\n",
|
||||
"%cd \"{export_storage_dir}\"\n",
|
||||
"!mkdir -p \"{datetime_str}/logs\"\n",
|
||||
"!cd \"{repo_storage_dir / 'stable-diffusion-webui' / 'logs'}\" && mv * \"{export_storage_dir / datetime_str / 'logs'}\"\n",
|
||||
"!mkdir -p \"{datetime_str}/log\"\n",
|
||||
"!cd \"{repo_storage_dir / 'stable-diffusion-webui' / 'log'}\" && mv * \"{export_storage_dir / datetime_str / 'log'}\"\n",
|
||||
"!cd \"{repo_storage_dir / 'stable-diffusion-webui' / 'outputs'}\" && mv * \"{export_storage_dir / datetime_str}\"\n",
|
||||
"s = subprocess.run(f'find \"{Path(export_storage_dir, datetime_str)}\" -type d -name .ipynb_checkpoints -exec rm -rv {{}} +', shell=True)\n",
|
||||
"!7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on \"{datetime_str}.7z\" \"{export_storage_dir / datetime_str}\""
|
||||
|
|
Loading…
Reference in New Issue