{ "cells": [ { "cell_type": "markdown", "source": [ "# Encrypt images before editing" ], "metadata": { "id": "-CUcwUSG3nfO" } }, { "cell_type": "code", "source": [ "from google.colab import drive\n", "import os\n", "import shutil\n", "import zipfile\n", "import glob\n", "from PIL import Image\n", "import io\n", "import hashlib\n", "\n", "!pip install -q pynacl\n", "\n", "from nacl.secret import SecretBox\n", "from nacl.utils import random\n", "\n", "# Mount Drive\n", "drive.mount('/content/drive', force_remount=True)\n", "\n", "# =============================================================================\n", "#@markdown ### πŸ”§ Settings\n", "# =============================================================================\n", "foreground_images_zip_path = '/content/drive/MyDrive/foregrounds.zip' #@param {type:\"string\"}\n", "\n", "background_images_zip_path = '/content/drive/MyDrive/backgrounds.zip' #@param {type:\"string\"}\n", "\n", "encryption_password = \"banana\" #@param {type:\"string\"}\n", "\n", "output_drive_base_path = \"/content/drive/MyDrive/\" #@param {type:\"string\"}\n", "\n", "output_folder_name = \"my_flux_dataset\" #@param {type:\"string\"}\n", "\n", "# Additional config values\n", "MODEL_ID = \"codeShare/FLUX.2-klein-9b-SDNQ-4bit\" #@param {type:\"string\"}\n", "edit_prompt = \"remove the text and put the characters in the real photo\" #@param {type:\"string\"}\n", "resolution = \"1024 x 1024 (Square)\" #@param {type:\"string\"}\n", "\n", "# =============================================================================\n", "# ===== KEY DERIVATION =====\n", "# =============================================================================\n", "def derive_key(password):\n", " return hashlib.sha256(password.encode()).digest()\n", "\n", "SECRET_KEY = derive_key(encryption_password)\n", "box = SecretBox(SECRET_KEY)\n", "\n", "# =============================================================================\n", "# ===== IMAGE β†’ BYTES =====\n", "# =============================================================================\n", "def pil_to_bytes(img):\n", " buf = io.BytesIO()\n", " img.save(buf, format=\"JPEG\", quality=95)\n", " return buf.getvalue()\n", "\n", "# =============================================================================\n", "# ===== ENCRYPT =====\n", "# =============================================================================\n", "def encrypt_bytes(data):\n", " nonce = random(SecretBox.NONCE_SIZE)\n", " return box.encrypt(data, nonce)\n", "\n", "# =============================================================================\n", "# ====================== PROCESS AND ENCRYPT ZIP ======================\n", "# =============================================================================\n", "def process_and_encrypt_zip(input_zip_filepath, output_encrypted_zip_name, output_base_path, secret_box_instance):\n", " print(f\"\\nπŸ“¦ Extracting images from {os.path.basename(input_zip_filepath)}...\")\n", " temp_extract_dir = f'/content/temp_extract_{os.path.basename(input_zip_filepath).replace(\".zip\", \"\")}'\n", "\n", " if os.path.exists(temp_extract_dir):\n", " shutil.rmtree(temp_extract_dir)\n", " os.makedirs(temp_extract_dir, exist_ok=True)\n", "\n", " try:\n", " with zipfile.ZipFile(input_zip_filepath, 'r') as z:\n", " z.extractall(temp_extract_dir)\n", " except FileNotFoundError:\n", " print(f\"⚠️ Warning: Input zip file not found: {input_zip_filepath}. Skipping this zip.\")\n", " return\n", " except Exception as e:\n", " print(f\"❌ Error extracting {input_zip_filepath}: {e}. Skipping this zip.\")\n", " return\n", "\n", " image_files = sorted(glob.glob(os.path.join(temp_extract_dir, '*.*')))\n", " image_files = [f for f in image_files if f.lower().endswith(('.png','.jpg','.jpeg','.webp','.gif'))]\n", "\n", " print(f\"βœ… Found {len(image_files)} images to encrypt in {os.path.basename(input_zip_filepath)}.\")\n", "\n", " encrypted_image_data_for_zip = []\n", " for img_path in image_files:\n", " try:\n", " img = Image.open(img_path).convert(\"RGB\")\n", " img_bytes = pil_to_bytes(img)\n", " enc_msg = encrypt_bytes(img_bytes)\n", " encrypted_image_data_for_zip.append((os.path.basename(img_path), enc_msg))\n", " except Exception as e:\n", " print(f\"❌ Error processing image {os.path.basename(img_path)}: {e}\")\n", "\n", " print(f\"πŸ” Encrypted {len(encrypted_image_data_for_zip)} images from {os.path.basename(input_zip_filepath)}.\")\n", "\n", " # Create encrypted zip\n", " temp_encrypted_zip_path = os.path.join('/content', f'temp_{output_encrypted_zip_name}')\n", "\n", " with zipfile.ZipFile(temp_encrypted_zip_path, 'w') as ez:\n", " for original_fname, enc_msg in encrypted_image_data_for_zip:\n", " encrypted_filename = f\"{os.path.splitext(original_fname)[0]}_encrypted.bin\"\n", " combined_bytes = enc_msg.nonce + enc_msg.ciphertext\n", " ez.writestr(encrypted_filename, combined_bytes)\n", "\n", " final_zip_path = os.path.join(output_base_path, output_encrypted_zip_name)\n", " shutil.move(temp_encrypted_zip_path, final_zip_path)\n", "\n", " print(f\"βœ… Saved: {final_zip_path}\")\n", "\n", " # Clean up temporary extraction directory\n", " if os.path.exists(temp_extract_dir):\n", " shutil.rmtree(temp_extract_dir)\n", "\n", "\n", "# =============================================================================\n", "# ====================== CREATE OUTPUT FOLDER ======================-\n", "# =============================================================================\n", "output_drive_full_path = os.path.join(output_drive_base_path, output_folder_name)\n", "os.makedirs(output_drive_full_path, exist_ok=True)\n", "\n", "print(f\"πŸ“ Output folder created: {output_drive_full_path}\")\n", "\n", "# =============================================================================\n", "# ====================== PROCESS BOTH ZIPS ======================-\n", "# =============================================================================\n", "process_and_encrypt_zip(foreground_images_zip_path, \"foregrounds.zip\", output_drive_full_path, box)\n", "process_and_encrypt_zip(background_images_zip_path, \"backgrounds.zip\", output_drive_full_path, box)\n", "\n", "\n", "# =============================================================================\n", "# ====================== SAVE CONFIG FILES ======================-\n", "# =============================================================================\n", "print(\"\\nπŸ“ Saving config files...\")\n", "\n", "password_txt_path = os.path.join(output_drive_full_path, \"password.txt\")\n", "model_id_path = os.path.join(output_drive_full_path, \"model_id.txt\")\n", "resolution_path = os.path.join(output_drive_full_path, \"resolution.txt\")\n", "edit_prompt_path = os.path.join(output_drive_full_path, \"edit_prompt.txt\")\n", "\n", "# Write files\n", "with open(password_txt_path, 'w', encoding='utf-8') as f:\n", " f.write(encryption_password)\n", "\n", "with open(model_id_path, 'w', encoding='utf-8') as f:\n", " f.write(MODEL_ID)\n", "\n", "with open(resolution_path, 'w', encoding='utf-8') as f:\n", " f.write(resolution)\n", "\n", "with open(edit_prompt_path, 'w', encoding='utf-8') as f:\n", " f.write(edit_prompt)\n", "\n", "print(f\"πŸ”‘ Saved: {password_txt_path}\")\n", "print(f\"🧠 Saved: {model_id_path}\")\n", "print(f\"πŸ“ Saved: {resolution_path}\")\n", "print(f\" Saved: {edit_prompt}\")\n", "\n", "# =============================================================================\n", "# ====================== DONE ======================-\n", "# =============================================================================\n", "print(\"\\nπŸŽ‰ DONE! Files saved to Google Drive:\")\n", "print(f\" πŸ“‚ {output_drive_full_path}/\")\n", "print(f\" β€’ foregrounds.zip\")\n", "print(f\" β€’ backgrounds.zip\")\n", "print(f\" β€’ password.txt\")\n", "print(f\" β€’ model_id.txt\")\n", "print(f\" β€’ edit_prompt.txt\")\n", "print(f\" β€’ resolution.txt\")\n" ], "metadata": { "id": "9XzM6NLc6BWo" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "source": [ "# Run Klein 9B on T4" ], "metadata": { "id": "RuoZGdZGyAll" } }, { "cell_type": "markdown", "metadata": { "id": "313e3f19" }, "source": [ "### Load SDNQ model from Hugging Face Hub\n", "\n", "Now, let's load the model from the Hugging Face repository we just created and ensure SDNQ is properly applied." ] }, { "cell_type": "code", "metadata": { "id": "367e4a6f" }, "source": [ "#@markdown =============================================================================\n", "#@markdown CELL 1: Google Colab Setup + Dependencies\n", "#@markdown =============================================================================\n", "\n", "# --- Mount Google Drive ---\n", "from google.colab import drive\n", "drive.mount('/content/drive')\n", "\n", "# --- HF Login ---\n", "from google.colab import userdata\n", "from huggingface_hub import login\n", "\n", "try:\n", " hf_token = userdata.get('HF_TOKEN')\n", " login(token=hf_token)\n", " print(\"βœ… HF login successful\")\n", "except Exception as e:\n", " print(f\"⚠️ HF login failed: {e}\")\n", "\n", "# --- Cleanup old diffusers ---\n", "import os\n", "import gc\n", "import shutil\n", "import torch\n", "\n", "print(\"🧹 Removing old diffusers...\")\n", "!pip uninstall -y diffusers > /dev/null 2>&1\n", "!rm -rf /usr/local/lib/python3.11/dist-packages/diffusers*\n", "!rm -rf ~/.cache/pip/*diffusers*\n", "\n", "print(\"πŸ”„ Installing latest diffusers...\")\n", "!pip install -q git+https://github.com/huggingface/diffusers.git --force-reinstall --no-deps\n", "\n", "print(\"πŸ” Installing dependencies...\")\n", "!pip install -q pynacl datasets accelerate transformers sentencepiece safetensors sdnq\n", "\n", "print(\"🧹 Purging pip cache...\")\n", "!python -m pip cache purge\n", "\n", "gc.collect()\n", "torch.cuda.empty_cache()\n", "\n", "print(\"βœ… Cell 1 complete!\")" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "#@markdown =============================================================================\n", "#@markdown CELL 2: User Settings + Google Drive Dataset Paths\n", "#@markdown =============================================================================\n", "\n", "import os , torch\n", "from pathlib import Path\n", "\n", "# =============================================================================\n", "# GOOGLE DRIVE DATASET ROOT\n", "# =============================================================================\n", "\n", "# Example:\n", "# /content/drive/MyDrive/my_flux_dataset/\n", "#\n", "# β”œβ”€β”€ password.txt\n", "# β”œβ”€β”€ model_id.txt\n", "# β”œβ”€β”€ edit_prompt.txt\n", "# β”œβ”€β”€ resolution.txt\n", "# β”œβ”€β”€ foregrounds/\n", "# └── backgrounds/\n", "\n", "google_drive_dataset_path = \"/content/drive/MyDrive/my_flux_dataset\"\n", "\n", "# =============================================================================\n", "# CONFIG FILES\n", "# =============================================================================\n", "\n", "password_txt_file = \"password.txt\"\n", "\n", "# Defaults\n", "edit_prompt = \"improve this illustration\"\n", "resolution = \"1024 x 1024 (Square)\"\n", "\n", "# Hardcoded dimensions\n", "target_height = 1024\n", "target_width = 1024\n", "\n", "print(\"πŸ”‘ Reading config files from Google Drive...\")\n", "\n", "dataset_path = Path(google_drive_dataset_path)\n", "\n", "encryption_password = (dataset_path / \"password.txt\").read_text(encoding=\"utf-8\").strip()\n", "\n", "MODEL_ID = \"codeShare/FLUX.2-klein-9b-SDNQ-2bit\" # Hardcoded\n", "#(dataset_path / \"model_id.txt\").read_text(encoding=\"utf-8\").strip()\n", "\n", "edit_prompt = (dataset_path / \"edit_prompt.txt\").read_text(encoding=\"utf-8\").strip()\n", "resolution = (dataset_path / \"resolution.txt\").read_text(encoding=\"utf-8\").strip()\n", "\n", "print(\"βœ… Config loaded successfully\")\n", "print(f\" Model : {MODEL_ID}\")\n", "print(f\" Resolution : {resolution}\")\n", "\n", "# =============================================================================\n", "# DATASET PATHS\n", "# =============================================================================\n", "\n", "encrypted_input_dataset_path = os.path.join(\n", " google_drive_dataset_path,\n", " \"foregrounds.zip\"\n", ")\n", "\n", "backgrounds_input_dataset_path = os.path.join(\n", " google_drive_dataset_path,\n", " \"backgrounds.zip\"\n", ")\n", "\n", "print(f\" Foregrounds : {encrypted_input_dataset_path}\")\n", "print(f\" Backgrounds : {backgrounds_input_dataset_path}\")\n", "\n", "# =============================================================================\n", "# SETTINGS\n", "# =============================================================================\n", "\n", "debug = True\n", "save_checkpoint_every_n = False\n", "\n", "# =============================================================================\n", "# MULTI GPU SUPPORT\n", "# =============================================================================\n", "\n", "NUM_GPUS = torch.cuda.device_count()\n", "\n", "if NUM_GPUS == 0:\n", " raise RuntimeError(\"❌ No CUDA GPU detected\")\n", "\n", "print(f\"\\nπŸš€ Detected {NUM_GPUS} GPU(s)\")\n", "\n", "for i in range(NUM_GPUS):\n", " print(f\" GPU {i}: {torch.cuda.get_device_name(i)}\")\n", "\n", "# Pipes per GPU\n", "PIPES_PER_GPU = 1\n", "\n", "TOTAL_PIPES = NUM_GPUS * PIPES_PER_GPU\n", "\n", "print(f\"\\n🧠 Total Pipes Configured: {TOTAL_PIPES}\")" ], "metadata": { "id": "BFn9u0Gcu9f3" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "#@markdown =============================================================================\n", "#@markdown CELL 3: Load Flux Klein Pipes\n", "#@markdown =============================================================================\n", "\n", "import gc , torch\n", "from functools import partial\n", "\n", "from diffusers import Flux2KleinPipeline\n", "from sdnq.loader import apply_sdnq_options_to_model\n", "\n", "gc.collect()\n", "torch.cuda.empty_cache()\n", "\n", "# Re-declare NUM_GPUS and PIPES_PER_GPU for robustness in case kernel state is lost\n", "# These values are expected to be set in CELL 2.\n", "NUM_GPUS = torch.cuda.device_count()\n", "\n", "# =============================================================================\n", "# PATCH PROMPT ENCODING\n", "# =============================================================================\n", "\n", "def patch_encode_prompt(\n", " pipe,\n", " cached_prompt_embeds,\n", " cached_text_ids,\n", " gpu_id\n", "):\n", "\n", " def patched(\n", " self,\n", " prompt=None,\n", " device=None,\n", " num_images_per_prompt=1,\n", " prompt_embeds=None,\n", " **kwargs\n", " ):\n", " device = device or torch.device(f\"cuda:{gpu_id}\")\n", "\n", " if prompt_embeds is None:\n", " emb = cached_prompt_embeds.to(device)\n", "\n", " emb = emb.repeat(1, num_images_per_prompt, 1)\n", "\n", " emb = emb.view(\n", " emb.shape[0] * num_images_per_prompt,\n", " emb.shape[1],\n", " -1\n", " )\n", "\n", " tids = cached_text_ids.to(device)\n", "\n", " return emb, tids\n", "\n", " return self._original_encode_prompt(\n", " prompt,\n", " device,\n", " num_images_per_prompt,\n", " prompt_embeds,\n", " **kwargs\n", " )\n", "\n", " if not hasattr(pipe, \"_original_encode_prompt\"):\n", " pipe._original_encode_prompt = pipe.encode_prompt\n", "\n", " pipe.encode_prompt = partial(patched, pipe)\n", "\n", " return pipe\n", "\n", "# =============================================================================\n", "# LOAD PIPE\n", "# =============================================================================\n", "\n", "#def load_klein_pipe(gpu_id: int, pipe_id: int):\n", "\n", "\n", "\n", "gpu_id = 0\n", "pipe_id = 0\n", "torch.cuda.set_device(gpu_id)\n", "\n", "print(f\"\\nπŸš€ Loading Pipe {pipe_id} on GPU {gpu_id}\")\n", "\n", "pipe = Flux2KleinPipeline.from_pretrained(\n", " MODEL_ID,\n", " torch_dtype=torch.float16,\n", " low_cpu_mem_usage=True,\n", " device_map=\"cpu\",\n", ")\n", "\n", "print(f\"πŸ”§ Applying SDNQ to Pipe {pipe_id}\")\n", "\n", "pipe.transformer = apply_sdnq_options_to_model(\n", " pipe.transformer,\n", " use_quantized_matmul=False\n", ")\n", "\n", "# Apply SDNQ to text_encoder and vae as well\n", "pipe.text_encoder = apply_sdnq_options_to_model(\n", " pipe.text_encoder,\n", " use_quantized_matmul=False\n", ")\n", "pipe.vae = apply_sdnq_options_to_model(\n", " pipe.vae,\n", " use_quantized_matmul=False\n", ")\n", "\n", "# -------------------------------------------------------------------------\n", "# Prompt Embeddings\n", "# -------------------------------------------------------------------------\n", "\n", "print(f\"🧠 Computing prompt embeddings for Pipe {pipe_id}\")\n", "\n", "pipe.text_encoder = pipe.text_encoder.to(f\"cuda:{gpu_id}\")\n", "\n", "with torch.inference_mode():\n", "\n", " prompt_embeds, text_ids = pipe.encode_prompt(\n", " prompt=edit_prompt,\n", " device=torch.device(f\"cuda:{gpu_id}\"),\n", " num_images_per_prompt=1,\n", " )\n", "\n", "pipe.edit_prompt_embeds = prompt_embeds.cpu()\n", "pipe.edit_text_ids = text_ids.cpu()\n", "\n", "pipe = patch_encode_prompt(\n", " pipe,\n", " pipe.edit_prompt_embeds,\n", " pipe.edit_text_ids,\n", " gpu_id\n", ")\n", "\n", "# -------------------------------------------------------------------------\n", "# Remove text encoder after caching embeddings\n", "# -------------------------------------------------------------------------\n" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 214, "referenced_widgets": [ "e8a8bfe13850486bab5bfec8b155084a", "0fbf9518d5e84ae8b8a154e0fb764872", "fe683381dd1b48dcbddfa07956ecc151", "4f9f0e20c3bd4cbba138c9db083b2f1e", "eafc1f1f7bb5428c97bd997873185ecf", "6bab56ca55914425b95b081ad562d45a", "f648677fd403452787a32014f7019c68", "c23d6b4ac8bf4ce197594e36d120d5f9", "42db2270ea7b4c6ea9fa238c1377bd5c", "8e35bfd2e1064cc69e1e16b61bf4d34f", "d1d0da8e00e646aeb95713281089488f", "847277f6f3cb4ead8a054c9b182c546a", "54c9d7593c9440daaa61da48c843bd93", "810894c5c01b4817a715b598cd658f5f", "fe4e7d3aa56c4abf9be7ea7fdcc2ef7a", "f31b0873de0e4942b3390a4720a3dd3d", "ac70d5e51f264f7f9b834ab0628783d9", "a1f5d8893e8f4f39acb977cfe28d0d87", "56a184e29cd444238f7bcdcc3c47c705", "cebea850711947cfb41207c6223f8033", "a7c60c5e086b4bcdb9c7a550dd79087a", "c9a0d6141cc147df8822fbd79af99bd2", "7708a24ca7f040f68d792053ff74b759", "21cfb136f2aa419bb5bd82e668423966", "6934f5f59a8b4ff18b7c35398d92318a", "64a13ba5bdef4373ac437154e275290b", "fd0656c3addf4878b9c4c9f23aa0a3db", "987754c86fb14e6e87ae1017e13e3d8c", "477f5b05547243409b7c73005a75a41e", "d028529b0fcd421f8323f906e8b28bc5", "4eb04d4c87354c9a9f80d99ed49bbde4", "b5eac70b5b6b40daa2219987ad9fb7de", "4fe80cd925784c5b8eda4ceb3a020b2f", "713810f4d11c4162abc172de9312a6ad", "eace9d8b96964caabe9680ce88732493", "af16cd7031354dbe988561c36fd48fcd", "280275147def49ff92a0e2aee1550a53", "02f09d3aa9ca4b1982b06a1e3a6f43d4", "b6499e76139042b29e4e8bfc14c334c2", "0becaceb56804276bc1182d252478647", "72fa9ff87a7645eb8a3fbfda7991b36d", "eb2cefd2387e43fe82e8aedf70ca2468", "4cf48b613fb94ce59570ac4f69d286ba", "3c0ea4c424ae4811860d6a0f4aa03beb" ] }, "id": "_Sk8M-gRvI47", "outputId": "efbab1c1-57d5-456a-b666-f59e7bb79860" }, "execution_count": 7, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\n", "πŸš€ Loading Pipe 0 on GPU 0\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "Downloading (incomplete total...): 0.00B [00:00, ?B/s]" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, "model_id": "e8a8bfe13850486bab5bfec8b155084a" } }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "Fetching 11 files: 0%| | 0/11 [00:00= len(input_files):\n", " break\n", "\n", " try:\n", "\n", " gc.collect()\n", " torch.cuda.empty_cache()\n", "\n", " # -------------------------------------------------------------\n", " # Load encrypted foreground from ZIP\n", " # -------------------------------------------------------------\n", "\n", " fg_name = input_files[global_idx]\n", "\n", " with local_foreground_zip.open(fg_name) as f:\n", " input_enc = f.read()\n", "\n", " input_image = bytes_to_pil(\n", " decrypt(input_enc)\n", " )\n", "\n", " # -------------------------------------------------------------\n", " # Load random encrypted background from ZIP\n", " # -------------------------------------------------------------\n", "\n", " bg_name = pyrandom.choice(bg_files)\n", "\n", " with local_background_zip.open(bg_name) as f:\n", " bg_enc = f.read()\n", "\n", " bg_image = bytes_to_pil(\n", " decrypt(bg_enc)\n", " )\n", "\n", " # -------------------------------------------------------------\n", " # Inference\n", " # -------------------------------------------------------------\n", "\n", " with torch.inference_mode(), torch.no_grad():\n", "\n", " result = pipe_instance(\n", " prompt=edit_prompt,\n", " image=[input_image, bg_image],\n", " height=target_height,\n", " width=target_width,\n", " guidance_scale=1.0,\n", " num_inference_steps=4,\n", " generator=torch.Generator(\n", " f\"cuda:{thread_gpu_id}\"\n", " ).manual_seed(42),\n", " output_type=\"pil\",\n", " ).images[0]\n", "\n", " # -------------------------------------------------------------\n", " # Encrypt result\n", " # -------------------------------------------------------------\n", "\n", " encrypted_result = encrypt(\n", " pil_to_bytes(result)\n", " )\n", "\n", " out_path = os.path.join(\n", " output_folders[thread_worker_id],\n", " f\"edited_{global_idx:06d}.enc\"\n", " )\n", "\n", " with open(out_path, \"wb\") as f:\n", " f.write(encrypted_result)\n", "\n", " print(\n", " f\"βœ… Worker {thread_worker_id} \"\n", " f\"(GPU {thread_gpu_id}) \"\n", " f\"β†’ {global_idx+1}/{len(input_files)}\"\n", " )\n", "\n", " del result\n", " del input_image\n", " del bg_image\n", "\n", " except Exception:\n", "\n", " print(\n", " f\"❌ Worker {thread_worker_id} \"\n", " f\"failed at index {global_idx}\"\n", " )\n", "\n", " print(traceback.format_exc())\n", "\n", " # -------------------------------------------------------------------------\n", " # Cleanup ZIP handles\n", " # -------------------------------------------------------------------------\n", "\n", " local_foreground_zip.close()\n", " local_background_zip.close()\n", "\n", " return True\n", "\n", "# =============================================================================\n", "# RUN WORKER (SINGLE PIPE VERSION)\n", "# =============================================================================\n", "\n", "print(\"\\nπŸš€ Starting single worker...\")\n", "\n", "# Direct call to worker_thread for a single pipe\n", "# Pass the globally available `pipe`, `gpu_id`, `0` (start_idx), `len(input_files)` (num_images), `0` (worker_id)\n", "worker_thread(\n", " pipe,\n", " gpu_id,\n", " 0,\n", " len(input_files),\n", " 0\n", ")\n", "\n", "# =============================================================================\n", "# CLOSE MAIN ZIPS\n", "# =============================================================================\n", "\n", "foreground_zip.close()\n", "background_zip.close()\n", "\n", "print(\"\\nπŸŽ‰ All workers complete!\")" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 237, "referenced_widgets": [ "8d7e444391584c0299c4f732e90dcddf", "f272862a96274a5dac5e706076827e00", "0095187f4f9b411b8bf87136f31277de", "c15792c4b8754d00801c1047be0eb92e", "fcd94d17b095407b9a415e7b8d2599ff", "badf0f4e6ce7445ba897d8d34102e3b0", "6a7867fc78a94d9f8e1e9ecb8a0f9be9", "2ae0c1610e5048b088e325c430a48283", "93979a32b99d437cb09a52c97d009c04", "29882e3dce79431a9700d7e6b553866a", "826593794d2d48a8be1abe236062b402", "c2bd91ae13e54fde808909adc3ba3bad", "f034124e8709493eb4928a4eac80ac1e", "8fe94f0caf7f448c8fd86ad8ea3fe1e7", "2b2308e4c05844ae8e36b75fafba829e", "8d304de0596240529e163e62e719005a", "e128a079052f4909beafb89dc83d36c4", "bba89375435e4e40a5ced555db5ac9e3", "314a0acb209c4e038c819ca14e9b2387", "d762b4ca3b254e99809637aa07eb3dc7", "5ab98272ee75419cb79d6ec7f012ca84", "13c3dae3b101407592b6c00b6af1d70e" ] }, "id": "3iHN3iICvPxh", "outputId": "c901fc6f-107d-4df2-910b-2a0c1ca07d8b" }, "execution_count": 10, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "πŸ“¦ Opening ZIP datasets...\n", "πŸ“Š Found 2 foreground images\n", "πŸŒ„ Found 2 background images\n", "\n", "πŸš€ Starting single worker...\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ " 0%| | 0/4 [00:00 bytes:\n", " try:\n", " return box.decrypt(encrypted_data)\n", " except Exception as e:\n", " raise ValueError(f\"Decryption failed (wrong password?): {e})\")\n", "\n", "# ------------------- MAIN DECRYPTION -------------------\n", "\n", "if not password:\n", " raise ValueError(\"❌ Password cannot be empty!\")\n", "\n", "# Derive the same key as in the encryption code\n", "key = hashlib.sha256(password.encode('utf-8')).digest()\n", "box = SecretBox(key)\n", "\n", "# Create output folder\n", "output_dir = \"/content/decrypted_images\"\n", "os.makedirs(output_dir, exist_ok=True)\n", "\n", "print(f\"\\nπŸ“‚ Extracting and decrypting to: {output_dir}\")\n", "\n", "# Extract zip\n", "with zipfile.ZipFile(zip_filename, 'r') as zip_ref:\n", " zip_ref.extractall(\"/content/temp_extracted\")\n", "\n", "# Find all .enc files\n", "enc_files = list(Path(\"/content/temp_extracted\").rglob(\"*.enc\"))\n", "\n", "print(f\"πŸ” Found {len(enc_files)} encrypted files\")\n", "\n", "success_count = 0\n", "\n", "for enc_path in enc_files:\n", " try:\n", " with open(enc_path, \"rb\") as f:\n", " encrypted_bytes = f.read()\n", "\n", " # Decrypt\n", " decrypted_bytes = decrypt_data(encrypted_bytes, box)\n", "\n", " # Convert to PIL Image and save as JPG\n", " img = Image.open(io.BytesIO(decrypted_bytes)).convert(\"RGB\")\n", "\n", " output_path = os.path.join(output_dir, enc_path.stem + \".jpg\")\n", " img.save(output_path, format=\"JPEG\", quality=95)\n", "\n", " success_count += 1\n", " print(f\"βœ… Decrypted: {enc_path.name} β†’ {Path(output_path).name}\")\n", "\n", " except Exception as e:\n", " print(f\"❌ Failed {enc_path.name}: {e}\")\n", "\n", "# Cleanup temp folder\n", "shutil.rmtree(\"/content/temp_extracted\", ignore_errors=True)\n", "\n", "print(f\"\\nπŸŽ‰ Decryption complete! {success_count}/{len(enc_files)} files decrypted successfully.\")\n", "print(f\"πŸ“ Decrypted images saved to: {output_dir}\")\n", "\n", "# Optional: Download all decrypted images as a new zip\n", "download_zip = True #input(\"\\nDo you want to download all decrypted images as a zip? (y/n): \").lower().strip() == 'y'\n", "\n", "if download_zip:\n", " download_zip_path = \"/content/decrypted_images.zip\"\n", " shutil.make_archive(\"/content/decrypted_images\", 'zip', output_dir)\n", " files.download(download_zip_path)\n", " print(\"πŸ“₯ Download started...\")" ] } ], "metadata": { "colab": { "provenance": [], "gpuType": "T4", "collapsed_sections": [ "-CUcwUSG3nfO", "yoSGdP68321C" ] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "e8a8bfe13850486bab5bfec8b155084a": { "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_0fbf9518d5e84ae8b8a154e0fb764872", "IPY_MODEL_fe683381dd1b48dcbddfa07956ecc151", "IPY_MODEL_4f9f0e20c3bd4cbba138c9db083b2f1e" ], "layout": "IPY_MODEL_eafc1f1f7bb5428c97bd997873185ecf" } }, "0fbf9518d5e84ae8b8a154e0fb764872": { "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_6bab56ca55914425b95b081ad562d45a", "placeholder": "​", "style": "IPY_MODEL_f648677fd403452787a32014f7019c68", "value": "Download complete: " } }, "fe683381dd1b48dcbddfa07956ecc151": { "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_c23d6b4ac8bf4ce197594e36d120d5f9", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_42db2270ea7b4c6ea9fa238c1377bd5c", "value": 0 } }, "4f9f0e20c3bd4cbba138c9db083b2f1e": { "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_8e35bfd2e1064cc69e1e16b61bf4d34f", "placeholder": "​", "style": "IPY_MODEL_d1d0da8e00e646aeb95713281089488f", "value": " 0.00/0.00 [00:00<?, ?B/s]" } }, "eafc1f1f7bb5428c97bd997873185ecf": { "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 } }, "6bab56ca55914425b95b081ad562d45a": { "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 } }, "f648677fd403452787a32014f7019c68": { "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": "" } }, "c23d6b4ac8bf4ce197594e36d120d5f9": { "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": "20px" } }, "42db2270ea7b4c6ea9fa238c1377bd5c": { "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": "" } }, "8e35bfd2e1064cc69e1e16b61bf4d34f": { "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 } }, "d1d0da8e00e646aeb95713281089488f": { "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": "" } }, "847277f6f3cb4ead8a054c9b182c546a": { "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_54c9d7593c9440daaa61da48c843bd93", "IPY_MODEL_810894c5c01b4817a715b598cd658f5f", "IPY_MODEL_fe4e7d3aa56c4abf9be7ea7fdcc2ef7a" ], "layout": "IPY_MODEL_f31b0873de0e4942b3390a4720a3dd3d" } }, "54c9d7593c9440daaa61da48c843bd93": { "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_ac70d5e51f264f7f9b834ab0628783d9", "placeholder": "​", "style": "IPY_MODEL_a1f5d8893e8f4f39acb977cfe28d0d87", "value": "Fetching 11 files: 100%" } }, "810894c5c01b4817a715b598cd658f5f": { "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_56a184e29cd444238f7bcdcc3c47c705", "max": 11, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_cebea850711947cfb41207c6223f8033", "value": 11 } }, "fe4e7d3aa56c4abf9be7ea7fdcc2ef7a": { "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_a7c60c5e086b4bcdb9c7a550dd79087a", "placeholder": "​", "style": "IPY_MODEL_c9a0d6141cc147df8822fbd79af99bd2", "value": " 11/11 [00:00<00:00, 13.45it/s]" } }, "f31b0873de0e4942b3390a4720a3dd3d": { "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 } }, "ac70d5e51f264f7f9b834ab0628783d9": { "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 } }, "a1f5d8893e8f4f39acb977cfe28d0d87": { "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": "" } }, "56a184e29cd444238f7bcdcc3c47c705": { "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 } }, "cebea850711947cfb41207c6223f8033": { "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": "" } }, "a7c60c5e086b4bcdb9c7a550dd79087a": { "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 } }, "c9a0d6141cc147df8822fbd79af99bd2": { "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": "" } }, "7708a24ca7f040f68d792053ff74b759": { "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_21cfb136f2aa419bb5bd82e668423966", "IPY_MODEL_6934f5f59a8b4ff18b7c35398d92318a", "IPY_MODEL_64a13ba5bdef4373ac437154e275290b" ], "layout": "IPY_MODEL_fd0656c3addf4878b9c4c9f23aa0a3db" } }, "21cfb136f2aa419bb5bd82e668423966": { "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_987754c86fb14e6e87ae1017e13e3d8c", "placeholder": "​", "style": "IPY_MODEL_477f5b05547243409b7c73005a75a41e", "value": "Loading pipeline components...: 100%" } }, "6934f5f59a8b4ff18b7c35398d92318a": { "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_d028529b0fcd421f8323f906e8b28bc5", "max": 5, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_4eb04d4c87354c9a9f80d99ed49bbde4", "value": 5 } }, "64a13ba5bdef4373ac437154e275290b": { "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_b5eac70b5b6b40daa2219987ad9fb7de", "placeholder": "​", "style": "IPY_MODEL_4fe80cd925784c5b8eda4ceb3a020b2f", "value": " 5/5 [00:51<00:00, 10.19s/it]" } }, "fd0656c3addf4878b9c4c9f23aa0a3db": { "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 } }, "987754c86fb14e6e87ae1017e13e3d8c": { "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 } }, "477f5b05547243409b7c73005a75a41e": { "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": "" } }, "d028529b0fcd421f8323f906e8b28bc5": { "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 } }, "4eb04d4c87354c9a9f80d99ed49bbde4": { "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": "" } }, "b5eac70b5b6b40daa2219987ad9fb7de": { "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 } }, "4fe80cd925784c5b8eda4ceb3a020b2f": { "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": "" } }, "713810f4d11c4162abc172de9312a6ad": { "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_eace9d8b96964caabe9680ce88732493", "IPY_MODEL_af16cd7031354dbe988561c36fd48fcd", "IPY_MODEL_280275147def49ff92a0e2aee1550a53" ], "layout": "IPY_MODEL_02f09d3aa9ca4b1982b06a1e3a6f43d4" } }, "eace9d8b96964caabe9680ce88732493": { "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_b6499e76139042b29e4e8bfc14c334c2", "placeholder": "​", "style": "IPY_MODEL_0becaceb56804276bc1182d252478647", "value": "Loading weights: 100%" } }, "af16cd7031354dbe988561c36fd48fcd": { "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_72fa9ff87a7645eb8a3fbfda7991b36d", "max": 899, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_eb2cefd2387e43fe82e8aedf70ca2468", "value": 899 } }, "280275147def49ff92a0e2aee1550a53": { "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_4cf48b613fb94ce59570ac4f69d286ba", "placeholder": "​", "style": "IPY_MODEL_3c0ea4c424ae4811860d6a0f4aa03beb", "value": " 899/899 [00:17<00:00, 426.15it/s, Materializing param=model.norm.weight]" } }, "02f09d3aa9ca4b1982b06a1e3a6f43d4": { "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 } }, "b6499e76139042b29e4e8bfc14c334c2": { "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 } }, "0becaceb56804276bc1182d252478647": { "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": "" } }, "72fa9ff87a7645eb8a3fbfda7991b36d": { "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 } }, "eb2cefd2387e43fe82e8aedf70ca2468": { "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": "" } }, "4cf48b613fb94ce59570ac4f69d286ba": { "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 } }, "3c0ea4c424ae4811860d6a0f4aa03beb": { "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": "" } }, "8d7e444391584c0299c4f732e90dcddf": { "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_f272862a96274a5dac5e706076827e00", "IPY_MODEL_0095187f4f9b411b8bf87136f31277de", "IPY_MODEL_c15792c4b8754d00801c1047be0eb92e" ], "layout": "IPY_MODEL_fcd94d17b095407b9a415e7b8d2599ff" } }, "f272862a96274a5dac5e706076827e00": { "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_badf0f4e6ce7445ba897d8d34102e3b0", "placeholder": "​", "style": "IPY_MODEL_6a7867fc78a94d9f8e1e9ecb8a0f9be9", "value": "100%" } }, "0095187f4f9b411b8bf87136f31277de": { "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_2ae0c1610e5048b088e325c430a48283", "max": 4, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_93979a32b99d437cb09a52c97d009c04", "value": 4 } }, "c15792c4b8754d00801c1047be0eb92e": { "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_29882e3dce79431a9700d7e6b553866a", "placeholder": "​", "style": "IPY_MODEL_826593794d2d48a8be1abe236062b402", "value": " 4/4 [01:22<00:00, 21.93s/it]" } }, "fcd94d17b095407b9a415e7b8d2599ff": { "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 } }, "badf0f4e6ce7445ba897d8d34102e3b0": { "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 } }, "6a7867fc78a94d9f8e1e9ecb8a0f9be9": { "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": "" } }, "2ae0c1610e5048b088e325c430a48283": { "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 } }, "93979a32b99d437cb09a52c97d009c04": { "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": "" } }, "29882e3dce79431a9700d7e6b553866a": { "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 } }, "826593794d2d48a8be1abe236062b402": { "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": "" } }, "c2bd91ae13e54fde808909adc3ba3bad": { "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_f034124e8709493eb4928a4eac80ac1e", "IPY_MODEL_8fe94f0caf7f448c8fd86ad8ea3fe1e7", "IPY_MODEL_2b2308e4c05844ae8e36b75fafba829e" ], "layout": "IPY_MODEL_8d304de0596240529e163e62e719005a" } }, "f034124e8709493eb4928a4eac80ac1e": { "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_e128a079052f4909beafb89dc83d36c4", "placeholder": "​", "style": "IPY_MODEL_bba89375435e4e40a5ced555db5ac9e3", "value": "100%" } }, "8fe94f0caf7f448c8fd86ad8ea3fe1e7": { "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_314a0acb209c4e038c819ca14e9b2387", "max": 4, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_d762b4ca3b254e99809637aa07eb3dc7", "value": 4 } }, "2b2308e4c05844ae8e36b75fafba829e": { "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_5ab98272ee75419cb79d6ec7f012ca84", "placeholder": "​", "style": "IPY_MODEL_13c3dae3b101407592b6c00b6af1d70e", "value": " 4/4 [01:22<00:00, 21.91s/it]" } }, "8d304de0596240529e163e62e719005a": { "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 } }, "e128a079052f4909beafb89dc83d36c4": { "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 } }, "bba89375435e4e40a5ced555db5ac9e3": { "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": "" } }, "314a0acb209c4e038c819ca14e9b2387": { "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 } }, "d762b4ca3b254e99809637aa07eb3dc7": { "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": "" } }, "5ab98272ee75419cb79d6ec7f012ca84": { "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 } }, "13c3dae3b101407592b6c00b6af1d70e": { "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": "" } } } }, "accelerator": "GPU" }, "nbformat": 4, "nbformat_minor": 0 }