add free/paid tier options back in
This commit is contained in:
parent
72ca5a7523
commit
7345688b4c
|
@ -69,10 +69,21 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"model_storage_dir = '/storage/models' # Where to store your model checkpoints.\n",
|
"# Choose where to store your model checkpoints.\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"# Free Tier\n",
|
||||||
|
"# model_storage_dir = '/tmp/stable-diffusion-models'\n",
|
||||||
|
"\n",
|
||||||
|
"# Paid Tier\n",
|
||||||
|
"# model_storage_dir = '/storage/models'\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"# Optional path settings\n",
|
||||||
"repo_storage_dir = '/storage/stable-diffusion' # Where to store your Stable Diffusion-related files.\n",
|
"repo_storage_dir = '/storage/stable-diffusion' # Where to store your Stable Diffusion-related files.\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"export_storage_dir = '/notebooks/exports' # Where the generated images will be exported to.\n",
|
||||||
|
"\n",
|
||||||
"pip_cache_dir = None # The installer can cache pip wheels so you don't have to re-download them\n",
|
"pip_cache_dir = None # The installer can cache pip wheels so you don't have to re-download them\n",
|
||||||
" # every 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",
|
||||||
|
@ -111,8 +122,6 @@
|
||||||
" # If you don't set a password anyone can install and run arbitrary code on your machine!\n",
|
" # If you don't set a password anyone can install and run arbitrary code on your machine!\n",
|
||||||
" # Instead, use gradio_auth which will automatically enable extensions when set.\n",
|
" # Instead, use gradio_auth which will automatically enable extensions when set.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"export_storage_dir = '/notebooks/exports' # Where the generated images will be exported to.\n",
|
|
||||||
"\n",
|
|
||||||
"gradio_queue = False # Uses gradio queue; experimental option; breaks restart UI button.\n",
|
"gradio_queue = False # Uses gradio queue; experimental option; breaks restart UI button.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# ===================================================================================================\n",
|
"# ===================================================================================================\n",
|
||||||
|
@ -1377,7 +1386,7 @@
|
||||||
" dl_web_file(model_uri)\n",
|
" dl_web_file(model_uri)\n",
|
||||||
" # clean exit here\n",
|
" # clean exit here\n",
|
||||||
" else:\n",
|
" else:\n",
|
||||||
" print('Required HTTP headers are incorrect:', end='\\n\\n')\n",
|
" print('Required HTTP headers are incorrect. One of these needs to be correct:', end='\\n\\n')\n",
|
||||||
" print('Content-Type:', response.headers['content-type'].split(\";\")[0] if response.headers.get('content-type') else 'None')\n",
|
" print('Content-Type:', response.headers['content-type'].split(\";\")[0] if response.headers.get('content-type') else 'None')\n",
|
||||||
" print('Must be \"application/octet-stream\"', end='\\n\\n')\n",
|
" print('Must be \"application/octet-stream\"', end='\\n\\n')\n",
|
||||||
" print('Content-Disposition:', response.headers['content-disposition'] if response.headers.get('content-disposition') else 'None')\n",
|
" print('Content-Disposition:', response.headers['content-disposition'] if response.headers.get('content-disposition') else 'None')\n",
|
||||||
|
@ -1431,13 +1440,12 @@
|
||||||
"\n",
|
"\n",
|
||||||
"import shutil\n",
|
"import shutil\n",
|
||||||
"import requests\n",
|
"import requests\n",
|
||||||
|
"from pathlib import Path\n",
|
||||||
"!pip install moviepy==1.0.3\n",
|
"!pip install moviepy==1.0.3\n",
|
||||||
"!apt update\n",
|
"!apt update\n",
|
||||||
"!apt install -y potrace python3-tk\n",
|
"!apt install -y potrace python3-tk\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def update_repo_if_not_exists(path, repo_clone_url, pre=None):\n",
|
"def update_repo_if_not_exists(path, repo_clone_url):\n",
|
||||||
" if pre is not None:\n",
|
|
||||||
" pre() \n",
|
|
||||||
" if not os.path.exists(path):\n",
|
" if not os.path.exists(path):\n",
|
||||||
" !git clone \"{repo_clone_url}\" \"{path}\"\n",
|
" !git clone \"{repo_clone_url}\" \"{path}\"\n",
|
||||||
" else:\n",
|
" else:\n",
|
||||||
|
|
Loading…
Reference in New Issue