Add files via upload

This commit is contained in:
Cyberes 2022-09-16 13:07:57 -06:00 committed by GitHub
parent 9801e3fa80
commit 6f9fee815e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 59 deletions

View File

@ -132,21 +132,18 @@
"else:\n",
" print('GFPGANv1.3.pth already downloaded')\n",
" \n",
"!mkdir -p $model_storage_dir\n",
"\n",
"# Get some storage back\n",
"!pip cache purge\n",
"!sudo apt-get clean"
"!mkdir -p $model_storage_dir"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "F0EINk5M0s-w",
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
"### Download the model"
"### Download the Model"
]
},
{
@ -174,7 +171,6 @@
{
"cell_type": "markdown",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
@ -198,7 +194,7 @@
"!apt update\n",
"!apt install -y aria2\n",
"%cd $model_storage_dir\n",
"!aria2c --seed-time=0 --max-overall-upload-limit=1K \"magnet:?xt=urn:btih:3A4A612D75ED088EA542ACAC52F9F45987488D1C&tr=udp://tracker.opentrackr.org:1337\""
"!aria2c --seed-time=0 --max-overall-upload-limit=1K \"magnet:?xt=urn:btih:3A4A612D75ED088EA542ACAC52F9F45987488D1C&tr=udp://tracker.opentrackr.org:1337/announce\""
]
},
{
@ -234,69 +230,18 @@
{
"cell_type": "markdown",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
"#### Waifu Diffusion"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Torrent**"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!apt update\n",
"!apt install -y aria2\n",
"%cd $model_storage_dir\n",
"!aria2c --seed-time=0 --max-overall-upload-limit=1K \"magnet:?xt=urn:btih:F45CECF4E9DE86DA83A78DD2CCCD7F27D5557A52&tr=udp://nyquist.localghost.org:6969\""
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"**Web Download**\n",
"\n",
"Very slow"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%store -r model_storage_dir\n",
"!wget https://thisanimedoesnotexist.ai/downloads/wd-v1-2-full-ema.ckpt -O $model_storage_dir/wd-v1-2-full-ema.ckpt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Half-Size Model**\n",
"\n",
"If you're on free tier try this first, it's 3.5GB."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%store -r model_storage_dir\n",
"!apt update\n",
"!apt install -y aria2\n",
"%cd $model_storage_dir\n",
@ -408,8 +353,14 @@
"outputs": [],
"source": [
"%store -r model_storage_dir\n",
"\n",
"# Get some storage back\n",
"!pip cache purge\n",
"!sudo apt-get clean\n",
"!rm $model_storage_dir/*.aria2\n",
"!apt autoremove --purge -y aria2\n",
"\n",
"# Restart the kernel\n",
"import os\n",
"os.kill(os.getpid(), 9)"
]