Skip to content

Commit 3fc8058

Browse files
committed
pytti-tools = source of truth
1 parent fe19517 commit 3fc8058

File tree

1 file changed

+76
-76
lines changed

1 file changed

+76
-76
lines changed

pytti_5_beta.ipynb

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
{
2-
"nbformat": 4,
3-
"nbformat_minor": 0,
4-
"metadata": {
5-
"accelerator": "GPU",
6-
"colab": {
7-
"name": "pytti 5 beta.ipynb",
8-
"private_outputs": true,
9-
"provenance": [],
10-
"collapsed_sections": [],
11-
"toc_visible": true
12-
},
13-
"kernelspec": {
14-
"display_name": "Python 3",
15-
"name": "python3"
16-
},
17-
"language_info": {
18-
"name": "python"
19-
}
20-
},
212
"cells": [
223
{
234
"cell_type": "markdown",
@@ -38,10 +19,12 @@
3819
},
3920
{
4021
"cell_type": "code",
22+
"execution_count": null,
4123
"metadata": {
42-
"id": "Z0hRb20yxxsc",
43-
"cellView": "form"
24+
"cellView": "form",
25+
"id": "Z0hRb20yxxsc"
4426
},
27+
"outputs": [],
4528
"source": [
4629
"# @title Licensed under the MIT License\n",
4730
"# Copyleft (c) 2021 Henry Rachootin\n",
@@ -63,9 +46,7 @@
6346
"# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n",
6447
"# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n",
6548
"# THE SOFTWARE."
66-
],
67-
"execution_count": null,
68-
"outputs": []
49+
]
6950
},
7051
{
7152
"cell_type": "markdown",
@@ -292,9 +273,11 @@
292273
},
293274
{
294275
"cell_type": "code",
276+
"execution_count": null,
295277
"metadata": {
296278
"id": "a9C9tARLzyzq"
297279
},
280+
"outputs": [],
298281
"source": [
299282
"#@title 1.1 Mount google drive (optional)\n",
300283
"#@markdown Mounting your drive is optional but recommended. You can even restore from google randomly\n",
@@ -303,16 +286,16 @@
303286
"drive.mount('/content/drive', force_remount = True)\n",
304287
"!mkdir -p /content/drive/MyDrive/pytti_test\n",
305288
"%cd /content/drive/MyDrive/pytti_test"
306-
],
307-
"execution_count": null,
308-
"outputs": []
289+
]
309290
},
310291
{
311292
"cell_type": "code",
293+
"execution_count": null,
312294
"metadata": {
313-
"id": "RosI5DYxtjh0",
314-
"cellView": "form"
295+
"cellView": "form",
296+
"id": "RosI5DYxtjh0"
315297
},
298+
"outputs": [],
316299
"source": [
317300
"#@title 1.2 NVIDIA-SMI (optional)\n",
318301
"#@markdown View information about your runtime GPU.\n",
@@ -326,16 +309,16 @@
326309
"else:\n",
327310
" !nvidia-smi\n",
328311
" !nvidia-smi -i 0 -e 0"
329-
],
330-
"execution_count": null,
331-
"outputs": []
312+
]
332313
},
333314
{
334315
"cell_type": "code",
316+
"execution_count": null,
335317
"metadata": {
336-
"id": "CAGyDOe2o9AE",
337-
"cellView": "form"
318+
"cellView": "form",
319+
"id": "CAGyDOe2o9AE"
338320
},
321+
"outputs": [],
339322
"source": [
340323
"#@title 1.3 Install everything else\n",
341324
"#@markdown Run this cell on a fresh runtime to install the libraries and modules.\n",
@@ -362,10 +345,10 @@
362345
" !git clone https://github.com/openai/CLIP.git &> /dev/null\n",
363346
" !git clone https://github.com/CompVis/taming-transformers.git &> /dev/null\n",
364347
" if not path_exists('./pytti'):\n",
365-
" !git clone --branch p5 https://github.com/sportsracer48/pytti.git &> /dev/null\n",
348+
" !git clone --branch p5 https://github.com/pytti-tools/pytti-core.git &> /dev/null\n",
366349
" else:\n",
367350
" !rm -r pytti\n",
368-
" !git clone --branch p5 https://github.com/sportsracer48/pytti.git\n",
351+
" !git clone --branch p5 https://github.com/pytti-tools/pytti-core.git\n",
369352
" !git clone https://github.com/shariqfarooq123/AdaBins.git &> /dev/null\n",
370353
" !git clone https://github.com/zacjiang/GMA.git &> /dev/null\n",
371354
" !mkdir -p AdaBins/pretrained\n",
@@ -386,9 +369,7 @@
386369
"elif everything_installed:\n",
387370
" from pytti.Notebook import change_tqdm_color\n",
388371
" change_tqdm_color()"
389-
],
390-
"execution_count": null,
391-
"outputs": []
372+
]
392373
},
393374
{
394375
"cell_type": "markdown",
@@ -402,10 +383,12 @@
402383
},
403384
{
404385
"cell_type": "code",
386+
"execution_count": null,
405387
"metadata": {
406-
"id": "TiKD7os1pyXW",
407-
"cellView": "form"
388+
"cellView": "form",
389+
"id": "TiKD7os1pyXW"
408390
},
391+
"outputs": [],
409392
"source": [
410393
"#@title #2.1 Parameters:\n",
411394
"#@markdown ---\n",
@@ -610,16 +593,16 @@
610593
"params = Bunch(define_parameters())\n",
611594
"print(\"SETTINGS:\")\n",
612595
"print(json.dumps(params))"
613-
],
614-
"execution_count": null,
615-
"outputs": []
596+
]
616597
},
617598
{
618599
"cell_type": "code",
600+
"execution_count": null,
619601
"metadata": {
620-
"id": "lWlZ2Gocb2fF",
621-
"cellView": "form"
602+
"cellView": "form",
603+
"id": "lWlZ2Gocb2fF"
622604
},
605+
"outputs": [],
623606
"source": [
624607
"#@title 2.2 Load settings (optional)\n",
625608
"#@markdown copy the `SETTINGS:` output from the **Parameters** cell (tripple click to select the whole\n",
@@ -664,16 +647,16 @@
664647
"\n",
665648
"if settings != '':\n",
666649
" params = load_settings(settings, random_seed)"
667-
],
668-
"execution_count": null,
669-
"outputs": []
650+
]
670651
},
671652
{
672653
"cell_type": "code",
654+
"execution_count": null,
673655
"metadata": {
674-
"id": "hqJ6vY2z3rR8",
675-
"cellView": "form"
656+
"cellView": "form",
657+
"id": "hqJ6vY2z3rR8"
676658
},
659+
"outputs": [],
677660
"source": [
678661
"#@title 2.3 Run it!\n",
679662
"#@markdown pytti is 1000% percent better code than VQLIPSE, so have a look at the code. \n",
@@ -1135,9 +1118,7 @@
11351118
" raise\n",
11361119
" \n",
11371120
"#print(prof.key_averages().table(sort_by=\"cuda_time_total\", row_limit=10))"
1138-
],
1139-
"execution_count": null,
1140-
"outputs": []
1121+
]
11411122
},
11421123
{
11431124
"cell_type": "markdown",
@@ -1151,10 +1132,12 @@
11511132
},
11521133
{
11531134
"cell_type": "code",
1135+
"execution_count": null,
11541136
"metadata": {
1155-
"id": "RZH-r4yyShnX",
1156-
"cellView": "form"
1137+
"cellView": "form",
1138+
"id": "RZH-r4yyShnX"
11571139
},
1140+
"outputs": [],
11581141
"source": [
11591142
"#@title 3.1 Render video\n",
11601143
"from os.path import exists as path_exists\n",
@@ -1242,16 +1225,16 @@
12421225
"print(\"Encoding video...\")\n",
12431226
"p.wait()\n",
12441227
"print(\"Video complete.\")"
1245-
],
1246-
"execution_count": null,
1247-
"outputs": []
1228+
]
12481229
},
12491230
{
12501231
"cell_type": "code",
1232+
"execution_count": null,
12511233
"metadata": {
1252-
"id": "t3EgqHKrSjZx",
1253-
"cellView": "form"
1234+
"cellView": "form",
1235+
"id": "t3EgqHKrSjZx"
12541236
},
1237+
"outputs": [],
12551238
"source": [
12561239
"#@title 3.1 Render video (concatenate all runs)\n",
12571240
"from os.path import exists as path_exists\n",
@@ -1336,16 +1319,16 @@
13361319
"print(\"Encoding video...\")\n",
13371320
"p.wait()\n",
13381321
"print(\"Video complete.\")"
1339-
],
1340-
"execution_count": null,
1341-
"outputs": []
1322+
]
13421323
},
13431324
{
13441325
"cell_type": "code",
1326+
"execution_count": null,
13451327
"metadata": {
1346-
"id": "-qZ8c_-iZ0QM",
1347-
"cellView": "form"
1328+
"cellView": "form",
1329+
"id": "-qZ8c_-iZ0QM"
13481330
},
1331+
"outputs": [],
13491332
"source": [
13501333
"#@title 3.2 Download the last exported video\n",
13511334
"from os.path import exists as path_exists\n",
@@ -1390,9 +1373,7 @@
13901373
" #THIS IS NOT AN ERROR. This is the code that would\n",
13911374
" #make an error if something were wrong.\n",
13921375
" raise RuntimeError(f\"WARNING: Drive is not mounted.\\nERROR: video videos/{filename} does not exist.\")"
1393-
],
1394-
"execution_count": null,
1395-
"outputs": []
1376+
]
13961377
},
13971378
{
13981379
"cell_type": "markdown",
@@ -1406,10 +1387,12 @@
14061387
},
14071388
{
14081389
"cell_type": "code",
1390+
"execution_count": null,
14091391
"metadata": {
1410-
"id": "vHHfWWqoSz35",
1411-
"cellView": "form"
1392+
"cellView": "form",
1393+
"id": "vHHfWWqoSz35"
14121394
},
1395+
"outputs": [],
14131396
"source": [
14141397
"#@title batch settings\n",
14151398
"from os.path import exists as path_exists\n",
@@ -1530,9 +1513,26 @@
15301513
"namespace = batch_list[0]['file_namespace']\n",
15311514
"if glob.glob(f'images_out/{namespace}/*.png'):\n",
15321515
" print(f\"WARNING: images_out/{namespace} contains images. Batch indicies may not match filenames unless restoring.\")"
1533-
],
1534-
"execution_count": null,
1535-
"outputs": []
1516+
]
1517+
}
1518+
],
1519+
"metadata": {
1520+
"accelerator": "GPU",
1521+
"colab": {
1522+
"collapsed_sections": [],
1523+
"name": "pytti 5 beta.ipynb",
1524+
"private_outputs": true,
1525+
"provenance": [],
1526+
"toc_visible": true
1527+
},
1528+
"kernelspec": {
1529+
"display_name": "Python 3",
1530+
"name": "python3"
1531+
},
1532+
"language_info": {
1533+
"name": "python"
15361534
}
1537-
]
1538-
}
1535+
},
1536+
"nbformat": 4,
1537+
"nbformat_minor": 0
1538+
}

0 commit comments

Comments
 (0)