compress output for exporting
This commit is contained in:
parent
0f8cbda3a1
commit
73309c0ad1
|
@ -115,7 +115,6 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "F0EINk5M0s-w",
|
||||
"jp-MarkdownHeadingCollapsed": true,
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
|
@ -253,7 +252,7 @@
|
|||
"source": [
|
||||
"**Half-size Model**\n",
|
||||
"\n",
|
||||
"If you're on free tier try this first."
|
||||
"If you're on free tier try this first, it's 3.5GB."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -374,7 +373,62 @@
|
|||
" print('You forgot to fill out the variable model_file above.')\n",
|
||||
" sys.exit(1)\n",
|
||||
"\n",
|
||||
"!python /notebooks/stable-diffusion-webui/webui.py --share --ckpt $model_file --show-negative-prompt"
|
||||
"!python /notebooks/stable-diffusion-webui/webui.py --share --ckpt $model_file --show-negative-prompt --no-progressbar-hiding"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true,
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
"# Export Generations"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This block will compress the outputs with 7zip max compression then delete the originals. It expects you to have `log/` and `outputs/` in `/notebooks/`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!apt install -y p7zip-full\n",
|
||||
"from datetime import datetime\n",
|
||||
"import os\n",
|
||||
"datetime_str = datetime.now().strftime('%m-%d-%Y_%H:%M:%S')\n",
|
||||
"%cd /notebooks/\n",
|
||||
"!mkdir $datetime_str\n",
|
||||
"!mv log $datetime_str\n",
|
||||
"!mv outputs $datetime_str\n",
|
||||
"os.system(f'7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on {datetime_str}.7z {datetime_str}/')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
"### Delete old output folder\n",
|
||||
"\n",
|
||||
"This block will delete the folder you just compressed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!rm -rf /notebooks/$datetime_str/\n",
|
||||
"!echo Deleted /notebooks/$datetime_str/"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue