Fix old code

This commit is contained in:
Cyberes 2022-12-05 23:44:44 -07:00 committed by GitHub
parent 64d20d6185
commit 8514fb9f48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 5 deletions

View File

@ -1178,8 +1178,14 @@
"outputs": [],
"source": [
"%store -r model_storage_dir repo_storage_dir\n",
"YOU_DIDNT_RUN_THE_FIRST_BLOCK_WHERE_YOU_DEFINE_YOUR_SETTINGS()\n",
"\n",
"try:\n",
" test = [model_storage_dir, repo_storage_dir]\n",
"except NameError as e:\n",
" print(\"There is an issue with your variables.\")\n",
" print(\"Please go back to the first block and make sure your settings are correct, then run the cell.\")\n",
" print('Error:', e)\n",
" import sys\n",
" sys.exit(1)\n",
"!apt update\n",
"!apt install -y p7zip-full\n",
"from datetime import datetime\n",
@ -1283,8 +1289,14 @@
"outputs": [],
"source": [
"%store -r repo_storage_dir\n",
"YOU_DIDNT_RUN_THE_FIRST_BLOCK_WHERE_YOU_DEFINE_YOUR_SETTINGS()\n",
"\n",
"try:\n",
" test = [model_storage_dir, repo_storage_dir]\n",
"except NameError as e:\n",
" print(\"There is an issue with your variables.\")\n",
" print(\"Please go back to the first block and make sure your settings are correct, then run the cell.\")\n",
" print('Error:', e)\n",
" import sys\n",
" sys.exit(1)\n",
"%cd \"{repo_storage_dir}/stable-diffusion-webui\"\n",
"!git reset --hard <commit>"
]
@ -1380,7 +1392,14 @@
"outputs": [],
"source": [
"%store -r model_storage_dir repo_storage_dir\n",
"YOU_DIDNT_RUN_THE_FIRST_BLOCK_WHERE_YOU_DEFINE_YOUR_SETTINGS()\n",
"try:\n",
" test = [model_storage_dir, repo_storage_dir]\n",
"except NameError as e:\n",
" print(\"There is an issue with your variables.\")\n",
" print(\"Please go back to the first block and make sure your settings are correct, then run the cell.\")\n",
" print('Error:', e)\n",
" import sys\n",
" sys.exit(1)\n",
"\n",
"model_uri = input('URI of model to download: ')\n",
"import re\n",