From b54b9fcbd2707d74e39f9986b12cd139369d05ab Mon Sep 17 00:00:00 2001
From: Drake Panzer <64224601+Cyberes@users.noreply.github.com>
Date: Mon, 23 Jan 2023 00:54:54 -0700
Subject: [PATCH] fix filenames on windows
---
StableDiffusionUI_Voldemort_paperspace.ipynb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/StableDiffusionUI_Voldemort_paperspace.ipynb b/StableDiffusionUI_Voldemort_paperspace.ipynb
index aafa657..b064ee7 100644
--- a/StableDiffusionUI_Voldemort_paperspace.ipynb
+++ b/StableDiffusionUI_Voldemort_paperspace.ipynb
@@ -1155,7 +1155,7 @@
"\n",
"!if [ $(dpkg-query -W -f='${Status}' p7zip-full 2>/dev/null | grep -c \"ok installed\") = 0 ]; then sudo apt update && sudo apt install -y p7zip-full; fi # install 7z if it isn't already installed\n",
"from datetime import datetime\n",
- "datetime_str = datetime.now().strftime('%m-%d-%Y_%H:%M:%S')\n",
+ "datetime_str = datetime.now().strftime('%m-%d-%Y_%H-%M-%S')\n",
"%cd \"{export_storage_dir}\"\n",
"!mkdir -p \"{datetime_str}/log\"\n",
"!cd \"{repo_storage_dir / 'stable-diffusion-webui' / 'log'}\" && mv * \"{export_storage_dir / datetime_str / 'log'}\"\n",
@@ -1453,8 +1453,8 @@
" if content_disp:\n",
" filename = Path(re.match(r'attachment; filename=\"(.*?)\"', content_disp)[1]).stem\n",
" with open(Path(model_storage_dir, f'{filename}.md'), 'w') as file:\n",
- " file.write(f\"# {model_data['name']} \\n\")\n",
- " file.write(f'Original CivitAI URL: {model_uri} \\n\\n
\\nhttps://civitai.com/models/3950/art-and-eros-aeros-a-tribute-to-beauty\\n')\n",
+ " file.write(f\"# {model_data['name']}\\n\")\n",
+ " file.write(f'Original CivitAI URL: {model_uri}\\n\\n
\\n\\n')\n",
" file.write(desc)\n",
" else:\n",
" print('Failed to get filename of checkpoint for markdown file')\n",