Last active
May 16, 2023 15:46
-
-
Save takuma104/6afb6f694b2ef05e79f2d72df8e8b273 to your computer and use it in GitHub Desktop.
scratchpad_mod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/takuma104/6afb6f694b2ef05e79f2d72df8e8b273/scratchpad.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "lIYdn1woOS1n", | |
"outputId": "35b76d37-5ab5-4238-aedd-d25671a9c181" | |
}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m934.9/934.9 kB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.1/7.1 MB\u001b[0m \u001b[31m50.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m219.1/219.1 kB\u001b[0m \u001b[31m11.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m224.5/224.5 kB\u001b[0m \u001b[31m13.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m25.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[?25h" | |
] | |
} | |
], | |
"source": [ | |
"!pip install diffusers transformers accelerate -q" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"from diffusers.utils import TEXT_ENCODER_TARGET_MODULES\n", | |
"from transformers import CLIPTextModel" | |
], | |
"metadata": { | |
"id": "oM-NVFVUBoUl" | |
}, | |
"execution_count": 2, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"text_encoder = CLIPTextModel.from_pretrained(\n", | |
" \"runwayml/stable-diffusion-v1-5\", subfolder=\"text_encoder\"\n", | |
")" | |
], | |
"metadata": { | |
"id": "z09CDISlBs_M", | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 81, | |
"referenced_widgets": [ | |
"102b75c9c1534896833114cfb8158774", | |
"28afa7cadfcd4b0ba362ea71bc499ba2", | |
"7ae6bddde7f74d558a110281deb8e787", | |
"0266f70e467b42fb8bb47a04c910f702", | |
"8a12339a55e84209a60b55bc4e6802e1", | |
"e419fcf6b0c043bfadcb2ba633c5b5db", | |
"4db4a888820049f4812a0b17d84b3d11", | |
"b689cd05757c4c6591110ade168b9aa4", | |
"e233e81c641249cd8ee6ac763b16994e", | |
"8e7b68d53e1b470a94e572e37ca570f4", | |
"5f99181b1c2d40a99cbfe4cc92698e93", | |
"a9264917ab7540df945a25449fab46bb", | |
"d599dd15a2514a949f8bb5079d5449fa", | |
"9fa619206f5a4fe99ac12801157d133e", | |
"51961b36827744aba987f8a299148788", | |
"c2834d6683d2482aaba1263625150323", | |
"e0854bc0222d46719667b8d648685c8c", | |
"0b609ae8291348a7a70e383b65f3d8e6", | |
"ff5df8fe225d47838682d5edac7ae85f", | |
"273399cb8eb34376ac2328b9bd3975bf", | |
"6f2320c0de8146e7b5ec33d17736d7a4", | |
"756c66704c5e4694bc8d9812c08bdb16" | |
] | |
}, | |
"outputId": "f1f2fd41-6830-4e4f-b680-82e55c89fa84" | |
}, | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Downloading (…)_encoder/config.json: 0%| | 0.00/617 [00:00<?, ?B/s]" | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "102b75c9c1534896833114cfb8158774" | |
} | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Downloading pytorch_model.bin: 0%| | 0.00/492M [00:00<?, ?B/s]" | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "a9264917ab7540df945a25449fab46bb" | |
} | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"TEXT_ENCODER_TARGET_MODULES\n" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "UU7JcZ6zMhbg", | |
"outputId": "3cd97616-6ef5-4701-fd87-e1994cec7d03" | |
}, | |
"execution_count": 14, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"['q_proj', 'v_proj', 'k_proj', 'out_proj']" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 14 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"from diffusers.models.attention_processor import LoRAAttnProcessor\n", | |
"from diffusers.loaders import AttnProcsLayers, LoraLoaderMixin\n", | |
"\n", | |
"# From https://github.com/huggingface/diffusers/blob/29b1325a5ae28fa8d7f459b372582287ffc571e5/examples/dreambooth/train_dreambooth_lora.py#L843-L849\n", | |
"text_lora_attn_procs = {}\n", | |
"for name, module in text_encoder.named_modules():\n", | |
" # if any(x in name for x in TEXT_ENCODER_TARGET_MODULES):\n", | |
" if name.endswith('self_attn'):\n", | |
" print(name)\n", | |
" text_lora_attn_procs[name] = LoRAAttnProcessor(\n", | |
" hidden_size=module.out_proj.out_features, cross_attention_dim=None\n", | |
" )\n", | |
"text_encoder_lora_layers = AttnProcsLayers(text_lora_attn_procs)" | |
], | |
"metadata": { | |
"id": "WIJQVDPdAUIL", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "b7ff3e27-12a9-44af-dcef-0e849619c785" | |
}, | |
"execution_count": 22, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"text_model.encoder.layers.0.self_attn\n", | |
"text_model.encoder.layers.1.self_attn\n", | |
"text_model.encoder.layers.2.self_attn\n", | |
"text_model.encoder.layers.3.self_attn\n", | |
"text_model.encoder.layers.4.self_attn\n", | |
"text_model.encoder.layers.5.self_attn\n", | |
"text_model.encoder.layers.6.self_attn\n", | |
"text_model.encoder.layers.7.self_attn\n", | |
"text_model.encoder.layers.8.self_attn\n", | |
"text_model.encoder.layers.9.self_attn\n", | |
"text_model.encoder.layers.10.self_attn\n", | |
"text_model.encoder.layers.11.self_attn\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"len(text_encoder_lora_layers.state_dict())" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "pMETaPwPCR8Y", | |
"outputId": "8d9af223-5e87-401d-decd-0769f1603b87" | |
}, | |
"execution_count": 23, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"96" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 23 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# From https://github.com/huggingface/diffusers/blob/9b14ce397e53fc5f5b909b07b6e992a2afe8e3af/src/diffusers/loaders.py#LL1095C13-L1098C14\n", | |
"text_encoder_name = \"text_encoder\"\n", | |
"\n", | |
"text_encoder_lora_state_dict = {\n", | |
" f\"{text_encoder_name}.{module_name}\": param\n", | |
" for module_name, param in text_encoder_lora_layers.state_dict().items()\n", | |
"}" | |
], | |
"metadata": { | |
"id": "vwDpCVpKCnqJ" | |
}, | |
"execution_count": 24, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"loaded_text_encoder_lora_state_dict = {\n", | |
" k: v for k, v in text_encoder_lora_state_dict.items() if k.startswith(\"text_encoder\")\n", | |
"}\n", | |
"assert len(loaded_text_encoder_lora_state_dict) == len(text_encoder_lora_layers.state_dict())" | |
], | |
"metadata": { | |
"id": "eMAQxAzDDm61" | |
}, | |
"execution_count": 25, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"text_lora_attn_procs.keys()" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "pjQ1BrdWxKBS", | |
"outputId": "9ae8f43c-da1a-483b-faa8-de5b46069ee5" | |
}, | |
"execution_count": 26, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"dict_keys(['text_model.encoder.layers.0.self_attn', 'text_model.encoder.layers.1.self_attn', 'text_model.encoder.layers.2.self_attn', 'text_model.encoder.layers.3.self_attn', 'text_model.encoder.layers.4.self_attn', 'text_model.encoder.layers.5.self_attn', 'text_model.encoder.layers.6.self_attn', 'text_model.encoder.layers.7.self_attn', 'text_model.encoder.layers.8.self_attn', 'text_model.encoder.layers.9.self_attn', 'text_model.encoder.layers.10.self_attn', 'text_model.encoder.layers.11.self_attn'])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 26 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"text_encoder_lora_layers.state_dict().keys()" | |
], | |
"metadata": { | |
"id": "exguUXx1Fp6x", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "2e2a0ed9-f288-4815-acae-463a33a88512" | |
}, | |
"execution_count": 27, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"dict_keys(['text_model.encoder.layers.0.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.0.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.0.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.0.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.0.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.0.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.0.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.0.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.1.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.1.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.1.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.1.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.1.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.1.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.1.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.1.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.2.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.2.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.2.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.2.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.2.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.2.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.2.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.2.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.3.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.3.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.3.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.3.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.3.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.3.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.3.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.3.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.4.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.4.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.4.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.4.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.4.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.4.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.4.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.4.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.5.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.5.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.5.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.5.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.5.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.5.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.5.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.5.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.6.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.6.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.6.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.6.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.6.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.6.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.6.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.6.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.7.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.7.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.7.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.7.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.7.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.7.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.7.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.7.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.8.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.8.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.8.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.8.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.8.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.8.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.8.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.8.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.9.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.9.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.9.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.9.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.9.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.9.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.9.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.9.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.10.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.10.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.10.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.10.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.10.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.10.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.10.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.10.self_attn.to_out_lora.up.weight', 'text_model.encoder.layers.11.self_attn.to_q_lora.down.weight', 'text_model.encoder.layers.11.self_attn.to_q_lora.up.weight', 'text_model.encoder.layers.11.self_attn.to_k_lora.down.weight', 'text_model.encoder.layers.11.self_attn.to_k_lora.up.weight', 'text_model.encoder.layers.11.self_attn.to_v_lora.down.weight', 'text_model.encoder.layers.11.self_attn.to_v_lora.up.weight', 'text_model.encoder.layers.11.self_attn.to_out_lora.down.weight', 'text_model.encoder.layers.11.self_attn.to_out_lora.up.weight'])" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 27 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [], | |
"metadata": { | |
"id": "HgTLi0hnwmDD" | |
}, | |
"execution_count": 9, | |
"outputs": [] | |
} | |
], | |
"metadata": { | |
"colab": { | |
"name": "scratchpad_mod", | |
"provenance": [], | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"display_name": "Python 3", | |
"name": "python3" | |
}, | |
"widgets": { | |
"application/vnd.jupyter.widget-state+json": { | |
"102b75c9c1534896833114cfb8158774": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HBoxModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HBoxModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HBoxView", | |
"box_style": "", | |
"children": [ | |
"IPY_MODEL_28afa7cadfcd4b0ba362ea71bc499ba2", | |
"IPY_MODEL_7ae6bddde7f74d558a110281deb8e787", | |
"IPY_MODEL_0266f70e467b42fb8bb47a04c910f702" | |
], | |
"layout": "IPY_MODEL_8a12339a55e84209a60b55bc4e6802e1" | |
} | |
}, | |
"28afa7cadfcd4b0ba362ea71bc499ba2": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_e419fcf6b0c043bfadcb2ba633c5b5db", | |
"placeholder": "", | |
"style": "IPY_MODEL_4db4a888820049f4812a0b17d84b3d11", | |
"value": "Downloading (…)_encoder/config.json: 100%" | |
} | |
}, | |
"7ae6bddde7f74d558a110281deb8e787": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "FloatProgressModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "FloatProgressModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "ProgressView", | |
"bar_style": "success", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_b689cd05757c4c6591110ade168b9aa4", | |
"max": 617, | |
"min": 0, | |
"orientation": "horizontal", | |
"style": "IPY_MODEL_e233e81c641249cd8ee6ac763b16994e", | |
"value": 617 | |
} | |
}, | |
"0266f70e467b42fb8bb47a04c910f702": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_8e7b68d53e1b470a94e572e37ca570f4", | |
"placeholder": "", | |
"style": "IPY_MODEL_5f99181b1c2d40a99cbfe4cc92698e93", | |
"value": " 617/617 [00:00<00:00, 39.7kB/s]" | |
} | |
}, | |
"8a12339a55e84209a60b55bc4e6802e1": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"e419fcf6b0c043bfadcb2ba633c5b5db": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"4db4a888820049f4812a0b17d84b3d11": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
}, | |
"b689cd05757c4c6591110ade168b9aa4": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"e233e81c641249cd8ee6ac763b16994e": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "ProgressStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "ProgressStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"bar_color": null, | |
"description_width": "" | |
} | |
}, | |
"8e7b68d53e1b470a94e572e37ca570f4": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"5f99181b1c2d40a99cbfe4cc92698e93": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
}, | |
"a9264917ab7540df945a25449fab46bb": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HBoxModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HBoxModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HBoxView", | |
"box_style": "", | |
"children": [ | |
"IPY_MODEL_d599dd15a2514a949f8bb5079d5449fa", | |
"IPY_MODEL_9fa619206f5a4fe99ac12801157d133e", | |
"IPY_MODEL_51961b36827744aba987f8a299148788" | |
], | |
"layout": "IPY_MODEL_c2834d6683d2482aaba1263625150323" | |
} | |
}, | |
"d599dd15a2514a949f8bb5079d5449fa": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_e0854bc0222d46719667b8d648685c8c", | |
"placeholder": "", | |
"style": "IPY_MODEL_0b609ae8291348a7a70e383b65f3d8e6", | |
"value": "Downloading pytorch_model.bin: 100%" | |
} | |
}, | |
"9fa619206f5a4fe99ac12801157d133e": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "FloatProgressModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "FloatProgressModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "ProgressView", | |
"bar_style": "success", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_ff5df8fe225d47838682d5edac7ae85f", | |
"max": 492305335, | |
"min": 0, | |
"orientation": "horizontal", | |
"style": "IPY_MODEL_273399cb8eb34376ac2328b9bd3975bf", | |
"value": 492305335 | |
} | |
}, | |
"51961b36827744aba987f8a299148788": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "HTMLModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "HTMLModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "HTMLView", | |
"description": "", | |
"description_tooltip": null, | |
"layout": "IPY_MODEL_6f2320c0de8146e7b5ec33d17736d7a4", | |
"placeholder": "", | |
"style": "IPY_MODEL_756c66704c5e4694bc8d9812c08bdb16", | |
"value": " 492M/492M [00:04<00:00, 109MB/s]" | |
} | |
}, | |
"c2834d6683d2482aaba1263625150323": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"e0854bc0222d46719667b8d648685c8c": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"0b609ae8291348a7a70e383b65f3d8e6": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
}, | |
"ff5df8fe225d47838682d5edac7ae85f": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"273399cb8eb34376ac2328b9bd3975bf": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "ProgressStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "ProgressStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"bar_color": null, | |
"description_width": "" | |
} | |
}, | |
"6f2320c0de8146e7b5ec33d17736d7a4": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"756c66704c5e4694bc8d9812c08bdb16": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "DescriptionStyleModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "DescriptionStyleModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "StyleView", | |
"description_width": "" | |
} | |
} | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment