Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ddPn08 committed Jan 5, 2023
1 parent c1f93b6 commit 9a8d6a5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions automatic1111.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@
"os.makedirs(models_path, exist_ok=True)\n",
"os.makedirs(output_path, exist_ok=True)\n",
"os.makedirs(config_path, exist_ok=True)\n",
"os.makedirs(scripts_path, exist_ok=True)\n",
"os.makedirs(f\"{models_path}/Stable-diffusion\", exist_ok=True)\n",
"\n",
"if os.path.exists(scripts_path):\n",
" for script in os.listdir(scripts_path):\n",
" ! rm -Rf stable-diffusion-webui/scripts/{script} && ln -s {scripts_path}/{script} stable-diffusion-webui/scripts/{script}\n",
"for script in os.listdir(scripts_path):\n",
" ! rm -Rf stable-diffusion-webui/scripts/{script} && ln -s {scripts_path}/{script} stable-diffusion-webui/scripts/{script}\n",
"\n",
"for dir in os.listdir(models_path):\n",
" if dir == \"embeddings\":\n",
Expand All @@ -166,8 +166,13 @@
"\n",
"for filename in [\"config.json\", \"ui-config.json\", \"styles.csv\", \"artists.csv\"]:\n",
" ! rm -f stable-diffusion-webui/{filename}\n",
" if not os.path.exists(f\"{config_path}/{filename}\"):\n",
" ! touch {config_path}/{filename}\n",
" filepath = f\"{config_path}/{filename}\"\n",
" if not os.path.exists(filepath):\n",
" if filename.endswith(\".json\"):\n",
" with open(filepath, mode='w') as f:\n",
" f.write(\"{}\")\n",
" else:\n",
" ! touch {config_path}/{filename}\n",
" ! ln -s {config_path}/{filename} stable-diffusion-webui/{filename}\n",
"\n",
"if download_if_missing:\n",
Expand Down Expand Up @@ -393,8 +398,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Y4ebYsPqTrGb",
"cellView": "form"
"cellView": "form",
"id": "Y4ebYsPqTrGb"
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -447,7 +452,7 @@
},
"language_info": {
"name": "python",
"version": "3.10.6 | packaged by conda-forge | (main, Oct 7 2022, 20:14:50) [MSC v.1916 64 bit (AMD64)]"
"version": "3.10.8 | packaged by conda-forge | (main, Nov 24 2022, 14:07:00) [MSC v.1916 64 bit (AMD64)]"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 9a8d6a5

Please sign in to comment.