From d0ebc12b383ab50748f7ddf1b5598c348770282b Mon Sep 17 00:00:00 2001 From: Bugrahan Donmez Date: Thu, 19 Dec 2024 20:49:55 +0300 Subject: [PATCH 1/2] Add colab notebook --- OSEDiff_Notebook.ipynb | 910 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 910 insertions(+) create mode 100644 OSEDiff_Notebook.ipynb diff --git a/OSEDiff_Notebook.ipynb b/OSEDiff_Notebook.ipynb new file mode 100644 index 0000000..410a6be --- /dev/null +++ b/OSEDiff_Notebook.ipynb @@ -0,0 +1,910 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "T4" + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "accelerator": "GPU" + }, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "# Setup Environment\n", + "Clone the repository and install required Python packages. Then, download the dependent models." + ], + "metadata": { + "id": "c8IYsrE6xDMw" + } + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "d--G9Dtwvt-a", + "outputId": "53878795-85f9-4da2-9143-8872e5aa1ffd" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Cloning into 'OSEDiff'...\n", + "remote: Enumerating objects: 837, done.\u001b[K\n", + "remote: Counting objects: 100% (58/58), done.\u001b[K\n", + "remote: Compressing objects: 100% (44/44), done.\u001b[K\n", + "remote: Total 837 (delta 17), reused 50 (delta 12), pack-reused 779 (from 2)\u001b[K\n", + "Receiving objects: 100% (837/837), 186.93 MiB | 29.15 MiB/s, done.\n", + "Resolving deltas: 100% (72/72), done.\n", + "Updating files: 100% (653/653), done.\n" + ] + } + ], + "source": [ + "!git clone https://github.com/cswry/OSEDiff.git" + ] + }, + { + "cell_type": "code", + "source": [ + "%cd OSEDiff" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "w6m9S_09wFYT", + "outputId": "d1399319-c6e7-4a22-edaf-a38b695c76d1" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/content/OSEDiff\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "Install necessary libraries" + ], + "metadata": { + "id": "Ahoho1KGBE4O" + } + }, + { + "cell_type": "code", + "source": [ + "!pip install -r requirements.txt" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "olTTC9G5wHvt", + "outputId": "ac04d8dc-8680-44d7-f2ff-e3790c3768e8" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Collecting diffusers==0.25.0 (from -r requirements.txt (line 1))\n", + " Downloading diffusers-0.25.0-py3-none-any.whl.metadata (19 kB)\n", + "Collecting torch==2.0.1 (from -r requirements.txt (line 2))\n", + " Downloading torch-2.0.1-cp310-cp310-manylinux1_x86_64.whl.metadata (24 kB)\n", + "Collecting transformers==4.28.1 (from -r requirements.txt (line 3))\n", + " Downloading transformers-4.28.1-py3-none-any.whl.metadata (109 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.0/110.0 kB\u001b[0m \u001b[31m5.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting xformers==0.0.20 (from -r requirements.txt (line 4))\n", + " Downloading xformers-0.0.20-cp310-cp310-manylinux2014_x86_64.whl.metadata (1.1 kB)\n", + "Collecting einops==0.7.0 (from -r requirements.txt (line 5))\n", + " Downloading einops-0.7.0-py3-none-any.whl.metadata (13 kB)\n", + "Collecting open-clip-torch==2.20.0 (from -r requirements.txt (line 6))\n", + " Downloading open_clip_torch-2.20.0-py3-none-any.whl.metadata (46 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.8/46.8 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting peft==0.9.0 (from -r requirements.txt (line 7))\n", + " Downloading peft-0.9.0-py3-none-any.whl.metadata (13 kB)\n", + "Collecting Pillow==9.5.0 (from -r requirements.txt (line 8))\n", + " Downloading Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (9.5 kB)\n", + "Collecting PyYAML==6.0 (from -r requirements.txt (line 9))\n", + " Downloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.metadata (2.0 kB)\n", + "Collecting pyiqa==0.1.10 (from -r requirements.txt (line 10))\n", + " Downloading pyiqa-0.1.10-py3-none-any.whl.metadata (14 kB)\n", + "Collecting basicsr (from -r requirements.txt (line 11))\n", + " Downloading basicsr-1.4.2.tar.gz (172 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m172.5/172.5 kB\u001b[0m \u001b[31m11.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting loralib (from -r requirements.txt (line 12))\n", + " Downloading loralib-0.1.2-py3-none-any.whl.metadata (15 kB)\n", + "Collecting fairscale (from -r requirements.txt (line 13))\n", + " Downloading fairscale-0.4.13.tar.gz (266 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m266.3/266.3 kB\u001b[0m \u001b[31m22.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (8.5.0)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (3.16.1)\n", + "Requirement already satisfied: huggingface-hub>=0.19.4 in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (0.27.0)\n", + "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (1.26.4)\n", + "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (2024.11.6)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (2.32.3)\n", + "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from diffusers==0.25.0->-r requirements.txt (line 1)) (0.4.5)\n", + "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 2)) (4.12.2)\n", + "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 2)) (1.13.1)\n", + "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 2)) (3.4.2)\n", + "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 2)) (3.1.4)\n", + "Collecting nvidia-cuda-nvrtc-cu11==11.7.99 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cuda-runtime-cu11==11.7.99 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cuda-cupti-cu11==11.7.101 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cudnn-cu11==8.5.0.96 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cublas-cu11==11.10.3.66 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cufft-cu11==10.9.0.58 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-curand-cu11==10.2.10.91 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cusolver-cu11==11.4.0.1 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cusparse-cu11==11.7.4.91 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-nccl-cu11==2.14.3 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl.metadata (1.8 kB)\n", + "Collecting nvidia-nvtx-cu11==11.7.91 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl.metadata (1.7 kB)\n", + "Collecting triton==2.0.0 (from torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.0 kB)\n", + "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers==4.28.1->-r requirements.txt (line 3)) (24.2)\n", + "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers==4.28.1->-r requirements.txt (line 3))\n", + " Downloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)\n", + "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers==4.28.1->-r requirements.txt (line 3)) (4.67.1)\n", + "Collecting pyre-extensions==0.0.29 (from xformers==0.0.20->-r requirements.txt (line 4))\n", + " Downloading pyre_extensions-0.0.29-py3-none-any.whl.metadata (4.0 kB)\n", + "Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from open-clip-torch==2.20.0->-r requirements.txt (line 6)) (0.20.1+cu121)\n", + "Collecting ftfy (from open-clip-torch==2.20.0->-r requirements.txt (line 6))\n", + " Downloading ftfy-6.3.1-py3-none-any.whl.metadata (7.3 kB)\n", + "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (from open-clip-torch==2.20.0->-r requirements.txt (line 6)) (0.2.0)\n", + "Collecting protobuf<4 (from open-clip-torch==2.20.0->-r requirements.txt (line 6))\n", + " Downloading protobuf-3.20.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.metadata (679 bytes)\n", + "Requirement already satisfied: timm in /usr/local/lib/python3.10/dist-packages (from open-clip-torch==2.20.0->-r requirements.txt (line 6)) (1.0.12)\n", + "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from peft==0.9.0->-r requirements.txt (line 7)) (5.9.5)\n", + "Requirement already satisfied: accelerate>=0.21.0 in /usr/local/lib/python3.10/dist-packages (from peft==0.9.0->-r requirements.txt (line 7)) (1.2.1)\n", + "Collecting addict (from pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading addict-2.4.0-py3-none-any.whl.metadata (1.0 kB)\n", + "Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (1.0.0)\n", + "Collecting lmdb (from pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading lmdb-1.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.1 kB)\n", + "Requirement already satisfied: opencv-python in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (4.10.0.84)\n", + "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (2.2.2)\n", + "Requirement already satisfied: scikit-image in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (0.25.0)\n", + "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (1.13.1)\n", + "Requirement already satisfied: tensorboard in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (2.17.1)\n", + "Collecting yapf (from pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading yapf-0.43.0-py3-none-any.whl.metadata (46 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.8/46.8 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: imgaug in /usr/local/lib/python3.10/dist-packages (from pyiqa==0.1.10->-r requirements.txt (line 10)) (0.4.0)\n", + "Collecting openai-clip (from pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading openai-clip-1.0.1.tar.gz (1.4 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m56.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting facexlib (from pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading facexlib-0.3.0-py3-none-any.whl.metadata (4.6 kB)\n", + "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.1->-r requirements.txt (line 2)) (75.1.0)\n", + "Requirement already satisfied: wheel in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.1->-r requirements.txt (line 2)) (0.45.1)\n", + "Collecting typing-inspect (from pyre-extensions==0.0.29->xformers==0.0.20->-r requirements.txt (line 4))\n", + " Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)\n", + "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1->-r requirements.txt (line 2)) (3.31.2)\n", + "Collecting lit (from triton==2.0.0->torch==2.0.1->-r requirements.txt (line 2))\n", + " Downloading lit-18.1.8-py3-none-any.whl.metadata (2.5 kB)\n", + "Collecting tb-nightly (from basicsr->-r requirements.txt (line 11))\n", + " Downloading tb_nightly-2.19.0a20241219-py3-none-any.whl.metadata (1.6 kB)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->diffusers==0.25.0->-r requirements.txt (line 1)) (2024.10.0)\n", + "INFO: pip is looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.\n", + "Collecting torchvision (from open-clip-torch==2.20.0->-r requirements.txt (line 6))\n", + " Downloading torchvision-0.20.1-cp310-cp310-manylinux1_x86_64.whl.metadata (6.1 kB)\n", + " Downloading torchvision-0.20.0-cp310-cp310-manylinux1_x86_64.whl.metadata (6.1 kB)\n", + " Downloading torchvision-0.19.1-cp310-cp310-manylinux1_x86_64.whl.metadata (6.0 kB)\n", + " Downloading torchvision-0.19.0-cp310-cp310-manylinux1_x86_64.whl.metadata (6.0 kB)\n", + " Downloading torchvision-0.18.1-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + " Downloading torchvision-0.18.0-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + " Downloading torchvision-0.17.2-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + "INFO: pip is still looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.\n", + " Downloading torchvision-0.17.1-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + " Downloading torchvision-0.17.0-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + " Downloading torchvision-0.16.2-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + " Downloading torchvision-0.16.1-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + " Downloading torchvision-0.16.0-cp310-cp310-manylinux1_x86_64.whl.metadata (6.6 kB)\n", + "INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.\n", + " Downloading torchvision-0.15.2-cp310-cp310-manylinux1_x86_64.whl.metadata (11 kB)\n", + "Collecting filterpy (from facexlib->pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading filterpy-1.4.5.zip (177 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m178.0/178.0 kB\u001b[0m \u001b[31m17.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from facexlib->pyiqa==0.1.10->-r requirements.txt (line 10)) (0.60.0)\n", + "Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from ftfy->open-clip-torch==2.20.0->-r requirements.txt (line 6)) (0.2.13)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (1.17.0)\n", + "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (3.8.0)\n", + "Requirement already satisfied: imageio in /usr/local/lib/python3.10/dist-packages (from imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (2.36.1)\n", + "Requirement already satisfied: Shapely in /usr/local/lib/python3.10/dist-packages (from imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (2.0.6)\n", + "INFO: pip is looking at multiple versions of scikit-image to determine which version is compatible with other requirements. This could take a while.\n", + "Collecting scikit-image (from pyiqa==0.1.10->-r requirements.txt (line 10))\n", + " Downloading scikit_image-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (14 kB)\n", + "Requirement already satisfied: tifffile>=2022.8.12 in /usr/local/lib/python3.10/dist-packages (from scikit-image->pyiqa==0.1.10->-r requirements.txt (line 10)) (2024.12.12)\n", + "Requirement already satisfied: lazy-loader>=0.4 in /usr/local/lib/python3.10/dist-packages (from scikit-image->pyiqa==0.1.10->-r requirements.txt (line 10)) (0.4)\n", + "Requirement already satisfied: zipp>=3.20 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata->diffusers==0.25.0->-r requirements.txt (line 1)) (3.21.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.0.1->-r requirements.txt (line 2)) (3.0.2)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->pyiqa==0.1.10->-r requirements.txt (line 10)) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->pyiqa==0.1.10->-r requirements.txt (line 10)) (2024.2)\n", + "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas->pyiqa==0.1.10->-r requirements.txt (line 10)) (2024.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.25.0->-r requirements.txt (line 1)) (3.4.0)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.25.0->-r requirements.txt (line 1)) (3.10)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.25.0->-r requirements.txt (line 1)) (2.2.3)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->diffusers==0.25.0->-r requirements.txt (line 1)) (2024.12.14)\n", + "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.1->-r requirements.txt (line 2)) (1.3.0)\n", + "Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tb-nightly->basicsr->-r requirements.txt (line 11)) (1.4.0)\n", + "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tb-nightly->basicsr->-r requirements.txt (line 11)) (1.68.1)\n", + "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tb-nightly->basicsr->-r requirements.txt (line 11)) (3.7)\n", + "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tb-nightly->basicsr->-r requirements.txt (line 11)) (0.7.2)\n", + "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tb-nightly->basicsr->-r requirements.txt (line 11)) (3.1.3)\n", + "Requirement already satisfied: platformdirs>=3.5.1 in /usr/local/lib/python3.10/dist-packages (from yapf->pyiqa==0.1.10->-r requirements.txt (line 10)) (4.3.6)\n", + "Requirement already satisfied: tomli>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from yapf->pyiqa==0.1.10->-r requirements.txt (line 10)) (2.2.1)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (1.3.1)\n", + "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (4.55.3)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (1.4.7)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->imgaug->pyiqa==0.1.10->-r requirements.txt (line 10)) (3.2.0)\n", + "Requirement already satisfied: llvmlite<0.44,>=0.43.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->facexlib->pyiqa==0.1.10->-r requirements.txt (line 10)) (0.43.0)\n", + "Collecting mypy-extensions>=0.3.0 (from typing-inspect->pyre-extensions==0.0.29->xformers==0.0.20->-r requirements.txt (line 4))\n", + " Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)\n", + "Downloading diffusers-0.25.0-py3-none-any.whl (1.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m59.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading torch-2.0.1-cp310-cp310-manylinux1_x86_64.whl (619.9 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m619.9/619.9 MB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading transformers-4.28.1-py3-none-any.whl (7.0 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.0/7.0 MB\u001b[0m \u001b[31m97.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading xformers-0.0.20-cp310-cp310-manylinux2014_x86_64.whl (109.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m109.1/109.1 MB\u001b[0m \u001b[31m8.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading einops-0.7.0-py3-none-any.whl (44 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.6/44.6 kB\u001b[0m \u001b[31m4.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading open_clip_torch-2.20.0-py3-none-any.whl (1.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m73.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading peft-0.9.0-py3-none-any.whl (190 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m190.9/190.9 kB\u001b[0m \u001b[31m17.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m63.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m682.2/682.2 kB\u001b[0m \u001b[31m48.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading pyiqa-0.1.10-py3-none-any.whl (238 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m238.9/238.9 kB\u001b[0m \u001b[31m15.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m317.1/317.1 MB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl (11.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m11.8/11.8 MB\u001b[0m \u001b[31m113.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.0/21.0 MB\u001b[0m \u001b[31m83.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m849.3/849.3 kB\u001b[0m \u001b[31m51.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m557.1/557.1 MB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux2014_x86_64.whl (168.4 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m168.4/168.4 MB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl (54.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.6/54.6 MB\u001b[0m \u001b[31m13.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl (102.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m102.6/102.6 MB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl (173.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m173.2/173.2 MB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl (177.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m177.1/177.1 MB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl (98 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m98.6/98.6 kB\u001b[0m \u001b[31m7.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading pyre_extensions-0.0.29-py3-none-any.whl (12 kB)\n", + "Downloading triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m63.3/63.3 MB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading loralib-0.1.2-py3-none-any.whl (10 kB)\n", + "Downloading protobuf-3.20.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m49.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading tokenizers-0.13.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m83.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading torchvision-0.15.2-cp310-cp310-manylinux1_x86_64.whl (6.0 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.0/6.0 MB\u001b[0m \u001b[31m78.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading addict-2.4.0-py3-none-any.whl (3.8 kB)\n", + "Downloading facexlib-0.3.0-py3-none-any.whl (59 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.6/59.6 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading ftfy-6.3.1-py3-none-any.whl (44 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.8/44.8 kB\u001b[0m \u001b[31m4.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading scikit_image-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m14.9/14.9 MB\u001b[0m \u001b[31m67.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading lmdb-1.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (294 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m294.9/294.9 kB\u001b[0m \u001b[31m22.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading tb_nightly-2.19.0a20241219-py3-none-any.whl (5.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.5/5.5 MB\u001b[0m \u001b[31m58.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading yapf-0.43.0-py3-none-any.whl (256 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m256.2/256.2 kB\u001b[0m \u001b[31m20.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading lit-18.1.8-py3-none-any.whl (96 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m96.4/96.4 kB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n", + "Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n", + "Building wheels for collected packages: basicsr, fairscale, openai-clip, filterpy\n", + " Building wheel for basicsr (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for basicsr: filename=basicsr-1.4.2-py3-none-any.whl size=214818 sha256=b631b819dc40cf42e0fcdaec6d8733a732f87011219c588a6bfec510002f6f94\n", + " Stored in directory: /root/.cache/pip/wheels/38/83/99/2d8437cc652a01af27df5ff037a4075e95b52d67705c5f30ca\n", + " Building wheel for fairscale (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for fairscale: filename=fairscale-0.4.13-py3-none-any.whl size=332107 sha256=bff7cb59bbdefecc7f8caa84424aa1096fe1323e69ba7e3a46c1004889504019\n", + " Stored in directory: /root/.cache/pip/wheels/78/a4/c0/fb0a7ef03cff161611c3fa40c6cf898f76e58ec421b88e8cb3\n", + " Building wheel for openai-clip (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for openai-clip: filename=openai_clip-1.0.1-py3-none-any.whl size=1368605 sha256=5b50d007945fe450883ab6bc383900ddca14ef7a110f1c08c1a03ba6224ae3af\n", + " Stored in directory: /root/.cache/pip/wheels/08/77/8e/8d2f862df6bf7fb4e2007062d2cbaeae49862ec7b56d041229\n", + " Building wheel for filterpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for filterpy: filename=filterpy-1.4.5-py3-none-any.whl size=110458 sha256=c1f90f90a00328cfedd30b1d1ead4faae6fac84b0813cd41a8b4587a1ff576d8\n", + " Stored in directory: /root/.cache/pip/wheels/0f/0c/ea/218f266af4ad626897562199fbbcba521b8497303200186102\n", + "Successfully built basicsr fairscale openai-clip filterpy\n", + "Installing collected packages: tokenizers, lmdb, lit, addict, yapf, PyYAML, protobuf, Pillow, nvidia-nvtx-cu11, nvidia-nccl-cu11, nvidia-cusparse-cu11, nvidia-curand-cu11, nvidia-cufft-cu11, nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-cupti-cu11, nvidia-cublas-cu11, mypy-extensions, loralib, ftfy, einops, typing-inspect, tb-nightly, openai-clip, nvidia-cusolver-cu11, nvidia-cudnn-cu11, transformers, scikit-image, pyre-extensions, filterpy, diffusers, triton, torch, torchvision, facexlib, xformers, pyiqa, peft, open-clip-torch, fairscale, basicsr\n", + " Attempting uninstall: tokenizers\n", + " Found existing installation: tokenizers 0.21.0\n", + " Uninstalling tokenizers-0.21.0:\n", + " Successfully uninstalled tokenizers-0.21.0\n", + " Attempting uninstall: PyYAML\n", + " Found existing installation: PyYAML 6.0.2\n", + " Uninstalling PyYAML-6.0.2:\n", + " Successfully uninstalled PyYAML-6.0.2\n", + " Attempting uninstall: protobuf\n", + " Found existing installation: protobuf 4.25.5\n", + " Uninstalling protobuf-4.25.5:\n", + " Successfully uninstalled protobuf-4.25.5\n", + " Attempting uninstall: Pillow\n", + " Found existing installation: pillow 11.0.0\n", + " Uninstalling pillow-11.0.0:\n", + " Successfully uninstalled pillow-11.0.0\n", + " Attempting uninstall: einops\n", + " Found existing installation: einops 0.8.0\n", + " Uninstalling einops-0.8.0:\n", + " Successfully uninstalled einops-0.8.0\n", + " Attempting uninstall: transformers\n", + " Found existing installation: transformers 4.47.0\n", + " Uninstalling transformers-4.47.0:\n", + " Successfully uninstalled transformers-4.47.0\n", + " Attempting uninstall: scikit-image\n", + " Found existing installation: scikit-image 0.25.0\n", + " Uninstalling scikit-image-0.25.0:\n", + " Successfully uninstalled scikit-image-0.25.0\n", + " Attempting uninstall: diffusers\n", + " Found existing installation: diffusers 0.31.0\n", + " Uninstalling diffusers-0.31.0:\n", + " Successfully uninstalled diffusers-0.31.0\n", + " Attempting uninstall: torch\n", + " Found existing installation: torch 2.5.1+cu121\n", + " Uninstalling torch-2.5.1+cu121:\n", + " Successfully uninstalled torch-2.5.1+cu121\n", + " Attempting uninstall: torchvision\n", + " Found existing installation: torchvision 0.20.1+cu121\n", + " Uninstalling torchvision-0.20.1+cu121:\n", + " Successfully uninstalled torchvision-0.20.1+cu121\n", + " Attempting uninstall: peft\n", + " Found existing installation: peft 0.14.0\n", + " Uninstalling peft-0.14.0:\n", + " Successfully uninstalled peft-0.14.0\n", + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "google-genai 0.2.2 requires pillow<12.0.0,>=10.0.0, but you have pillow 9.5.0 which is incompatible.\n", + "grpcio-status 1.62.3 requires protobuf>=4.21.6, but you have protobuf 3.20.3 which is incompatible.\n", + "sentence-transformers 3.3.1 requires transformers<5.0.0,>=4.41.0, but you have transformers 4.28.1 which is incompatible.\n", + "torchaudio 2.5.1+cu121 requires torch==2.5.1, but you have torch 2.0.1 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed Pillow-9.5.0 PyYAML-6.0 addict-2.4.0 basicsr-1.4.2 diffusers-0.25.0 einops-0.7.0 facexlib-0.3.0 fairscale-0.4.13 filterpy-1.4.5 ftfy-6.3.1 lit-18.1.8 lmdb-1.5.1 loralib-0.1.2 mypy-extensions-1.0.0 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-curand-cu11-10.2.10.91 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 open-clip-torch-2.20.0 openai-clip-1.0.1 peft-0.9.0 protobuf-3.20.3 pyiqa-0.1.10 pyre-extensions-0.0.29 scikit-image-0.24.0 tb-nightly-2.19.0a20241219 tokenizers-0.13.3 torch-2.0.1 torchvision-0.15.2 transformers-4.28.1 triton-2.0.0 typing-inspect-0.9.0 xformers-0.0.20 yapf-0.43.0\n" + ] + }, + { + "output_type": "display_data", + "data": { + "application/vnd.colab-display-data+json": { + "pip_warning": { + "packages": [ + "PIL", + "google" + ] + }, + "id": "f7a9e3f338164aea9bd27720bce349c2" + } + }, + "metadata": {} + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "The library below can give an error. So, we are loading the running version." + ], + "metadata": { + "id": "asZYh-ESBHas" + } + }, + { + "cell_type": "code", + "source": [ + "!pip uninstall huggingface_hub -y\n", + "!pip install huggingface_hub==0.25.0" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "kkhWz2g_1BC6", + "outputId": "f342ffb3-110b-417a-c299-553bf34d5340" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Found existing installation: huggingface-hub 0.27.0\n", + "Uninstalling huggingface-hub-0.27.0:\n", + " Successfully uninstalled huggingface-hub-0.27.0\n", + "Collecting huggingface_hub==0.25.0\n", + " Downloading huggingface_hub-0.25.0-py3-none-any.whl.metadata (13 kB)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (3.16.1)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (2024.10.0)\n", + "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (24.2)\n", + "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (6.0)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (2.32.3)\n", + "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (4.67.1)\n", + "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.25.0) (4.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.25.0) (3.4.0)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.25.0) (3.10)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.25.0) (2.2.3)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub==0.25.0) (2024.12.14)\n", + "Downloading huggingface_hub-0.25.0-py3-none-any.whl (436 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m436.4/436.4 kB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hInstalling collected packages: huggingface_hub\n", + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "sentence-transformers 3.3.1 requires transformers<5.0.0,>=4.41.0, but you have transformers 4.28.1 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed huggingface_hub-0.25.0\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "Download models and the previous script for RAM utils.py." + ], + "metadata": { + "id": "d3Ci6pMzBP2G" + } + }, + { + "cell_type": "code", + "source": [ + "%cd OSEDiff/\n", + "!wget \"https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt\" --content-disposition\n", + "!wget \"https://huggingface.co/spaces/xinyu1205/recognize-anything/resolve/main/ram_swin_large_14m.pth\" --content-disposition\n", + "!gdown 1KIV6VewwO2eDC9g4Gcvgm-a0LDI7Lmwm\n", + "\n", + "%rm ram/models/utils.py\n", + "!wget \"https://github.com/cswry/SeeSR/blob/main/ram/models/utils.py\" --content-disposition --directory-prefix ram/models/utils.py" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "bkEMSc7BxBve", + "outputId": "ced87609-5fb0-4666-fed0-3940d2b12ae7" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/content/OSEDiff\n", + "--2024-12-19 11:58:53-- https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt\n", + "Resolving huggingface.co (huggingface.co)... 18.164.174.17, 18.164.174.23, 18.164.174.55, ...\n", + "Connecting to huggingface.co (huggingface.co)|18.164.174.17|:443... connected.\n", + "HTTP request sent, awaiting response... 302 Found\n", + "Location: https://cdn-lfs.hf.co/repos/24/cb/24cbc2f7542236eb613b4f16b6802d7c2bef443e86cf9d076719733866e66c3a/88ecb782561455673c4b78d05093494b9c539fc6bfc08f3a9a4a0dd7b0b10f36?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27v2-1_512-ema-pruned.ckpt%3B+filename%3D%22v2-1_512-ema-pruned.ckpt%22%3B&Expires=1734868733&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTczNDg2ODczM319LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5oZi5jby9yZXBvcy8yNC9jYi8yNGNiYzJmNzU0MjIzNmViNjEzYjRmMTZiNjgwMmQ3YzJiZWY0NDNlODZjZjlkMDc2NzE5NzMzODY2ZTY2YzNhLzg4ZWNiNzgyNTYxNDU1NjczYzRiNzhkMDUwOTM0OTRiOWM1MzlmYzZiZmMwOGYzYTlhNGEwZGQ3YjBiMTBmMzY%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qIn1dfQ__&Signature=TAd3mAqRsr9MnjjjsNaoyIKgJ8Gl7-FD4HJdsVZNMZ548qYp6BpC99%7E5JVjyThWZVxnVcUVSgON-k4a-eRcYCfAL6E0485gtVzM9ZC53b%7EYpISIi4FzLPEDAtoq6Dv58m0ozskzLXTrUAGoA4eJ%7ElMbr3mLaQvgzX12eGpZuA%7EJ-39nrdOrrfkCyuLRIIRo98cU6Ooz4JwXqvr8x0s2xg2NfZ6VR7UH%7E92XGWjl%7ErFRRzakooL4O23KJh0Y-%7E-tbSMrnyxVxVie6MK8hnbfo5isrrWpgIi-bbpcyXbPLDEA22WApwlE7LztzJ%7E%7EjKurpuWkUgnU2XsEQSMCXTCUaLw__&Key-Pair-Id=K3RPWS32NSSJCE [following]\n", + "--2024-12-19 11:58:53-- https://cdn-lfs.hf.co/repos/24/cb/24cbc2f7542236eb613b4f16b6802d7c2bef443e86cf9d076719733866e66c3a/88ecb782561455673c4b78d05093494b9c539fc6bfc08f3a9a4a0dd7b0b10f36?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27v2-1_512-ema-pruned.ckpt%3B+filename%3D%22v2-1_512-ema-pruned.ckpt%22%3B&Expires=1734868733&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTczNDg2ODczM319LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5oZi5jby9yZXBvcy8yNC9jYi8yNGNiYzJmNzU0MjIzNmViNjEzYjRmMTZiNjgwMmQ3YzJiZWY0NDNlODZjZjlkMDc2NzE5NzMzODY2ZTY2YzNhLzg4ZWNiNzgyNTYxNDU1NjczYzRiNzhkMDUwOTM0OTRiOWM1MzlmYzZiZmMwOGYzYTlhNGEwZGQ3YjBiMTBmMzY%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qIn1dfQ__&Signature=TAd3mAqRsr9MnjjjsNaoyIKgJ8Gl7-FD4HJdsVZNMZ548qYp6BpC99%7E5JVjyThWZVxnVcUVSgON-k4a-eRcYCfAL6E0485gtVzM9ZC53b%7EYpISIi4FzLPEDAtoq6Dv58m0ozskzLXTrUAGoA4eJ%7ElMbr3mLaQvgzX12eGpZuA%7EJ-39nrdOrrfkCyuLRIIRo98cU6Ooz4JwXqvr8x0s2xg2NfZ6VR7UH%7E92XGWjl%7ErFRRzakooL4O23KJh0Y-%7E-tbSMrnyxVxVie6MK8hnbfo5isrrWpgIi-bbpcyXbPLDEA22WApwlE7LztzJ%7E%7EjKurpuWkUgnU2XsEQSMCXTCUaLw__&Key-Pair-Id=K3RPWS32NSSJCE\n", + "Resolving cdn-lfs.hf.co (cdn-lfs.hf.co)... 3.168.132.51, 3.168.132.48, 3.168.132.25, ...\n", + "Connecting to cdn-lfs.hf.co (cdn-lfs.hf.co)|3.168.132.51|:443... connected.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: 5214865159 (4.9G) [binary/octet-stream]\n", + "Saving to: ‘v2-1_512-ema-pruned.ckpt’\n", + "\n", + "v2-1_512-ema-pruned 100%[===================>] 4.86G 140MB/s in 41s \n", + "\n", + "2024-12-19 11:59:34 (122 MB/s) - ‘v2-1_512-ema-pruned.ckpt’ saved [5214865159/5214865159]\n", + "\n", + "--2024-12-19 11:59:34-- https://huggingface.co/spaces/xinyu1205/recognize-anything/resolve/main/ram_swin_large_14m.pth\n", + "Resolving huggingface.co (huggingface.co)... 18.164.174.17, 18.164.174.55, 18.164.174.118, ...\n", + "Connecting to huggingface.co (huggingface.co)|18.164.174.17|:443... connected.\n", + "HTTP request sent, awaiting response... 302 Found\n", + "Location: https://cdn-lfs.hf.co/repos/e6/78/e678f8565485a3f321b1180e4c7e1e18a89a9295028358eedffb98981b37e11a/15c729c793af28b9d107c69f85836a1356d76ea830d4714699fb62e55fcc08ed?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27ram_swin_large_14m.pth%3B+filename%3D%22ram_swin_large_14m.pth%22%3B&Expires=1734868774&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTczNDg2ODc3NH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5oZi5jby9yZXBvcy9lNi83OC9lNjc4Zjg1NjU0ODVhM2YzMjFiMTE4MGU0YzdlMWUxOGE4OWE5Mjk1MDI4MzU4ZWVkZmZiOTg5ODFiMzdlMTFhLzE1YzcyOWM3OTNhZjI4YjlkMTA3YzY5Zjg1ODM2YTEzNTZkNzZlYTgzMGQ0NzE0Njk5ZmI2MmU1NWZjYzA4ZWQ%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qIn1dfQ__&Signature=F5GZMiWda30c-UdqdWh5NhY18q3hD2PQcOQlN7Hpv5Bl4drFfdRF3vB3o4yjBBjaqX7q9EGevPD%7EI6dkGVBMRXzmtvRbAcRc3xw1UTytVA7nTqWCezY6vVJwxDRGNGex8gFfyAd-RTJv2bIR41f3MOzknSRfTc0bIAn7qlK6YAenFvGTkU0cR7jFWg8S0bxZEaNVKvL3xvEqrmfXQF1TXIepcgUSeKANqs-63dOqoPhTkcmCi-7IlAVT9aeFUFHCLqlpVEtrvDLOLfhLDRyrg%7E0d9HPF-eh%7EAj1l0dXn%7EfiJOLa2eKecsN8ccQeL9bHG8k-DRYJqL3-gsH0kOet6DA__&Key-Pair-Id=K3RPWS32NSSJCE [following]\n", + "--2024-12-19 11:59:34-- https://cdn-lfs.hf.co/repos/e6/78/e678f8565485a3f321b1180e4c7e1e18a89a9295028358eedffb98981b37e11a/15c729c793af28b9d107c69f85836a1356d76ea830d4714699fb62e55fcc08ed?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27ram_swin_large_14m.pth%3B+filename%3D%22ram_swin_large_14m.pth%22%3B&Expires=1734868774&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTczNDg2ODc3NH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5oZi5jby9yZXBvcy9lNi83OC9lNjc4Zjg1NjU0ODVhM2YzMjFiMTE4MGU0YzdlMWUxOGE4OWE5Mjk1MDI4MzU4ZWVkZmZiOTg5ODFiMzdlMTFhLzE1YzcyOWM3OTNhZjI4YjlkMTA3YzY5Zjg1ODM2YTEzNTZkNzZlYTgzMGQ0NzE0Njk5ZmI2MmU1NWZjYzA4ZWQ%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qIn1dfQ__&Signature=F5GZMiWda30c-UdqdWh5NhY18q3hD2PQcOQlN7Hpv5Bl4drFfdRF3vB3o4yjBBjaqX7q9EGevPD%7EI6dkGVBMRXzmtvRbAcRc3xw1UTytVA7nTqWCezY6vVJwxDRGNGex8gFfyAd-RTJv2bIR41f3MOzknSRfTc0bIAn7qlK6YAenFvGTkU0cR7jFWg8S0bxZEaNVKvL3xvEqrmfXQF1TXIepcgUSeKANqs-63dOqoPhTkcmCi-7IlAVT9aeFUFHCLqlpVEtrvDLOLfhLDRyrg%7E0d9HPF-eh%7EAj1l0dXn%7EfiJOLa2eKecsN8ccQeL9bHG8k-DRYJqL3-gsH0kOet6DA__&Key-Pair-Id=K3RPWS32NSSJCE\n", + "Resolving cdn-lfs.hf.co (cdn-lfs.hf.co)... 3.168.132.25, 3.168.132.48, 3.168.132.99, ...\n", + "Connecting to cdn-lfs.hf.co (cdn-lfs.hf.co)|3.168.132.25|:443... connected.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: 5625634877 (5.2G) [binary/octet-stream]\n", + "Saving to: ‘ram_swin_large_14m.pth’\n", + "\n", + "ram_swin_large_14m. 100%[===================>] 5.24G 232MB/s in 29s \n", + "\n", + "2024-12-19 12:00:04 (184 MB/s) - ‘ram_swin_large_14m.pth’ saved [5625634877/5625634877]\n", + "\n", + "Downloading...\n", + "From: https://drive.google.com/uc?id=1KIV6VewwO2eDC9g4Gcvgm-a0LDI7Lmwm\n", + "To: /content/OSEDiff/DAPE.pth\n", + "100% 7.19M/7.19M [00:00<00:00, 47.2MB/s]\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "# Upload Your Images\n", + "Upload your image files." + ], + "metadata": { + "id": "fVrWblpGy0aT" + } + }, + { + "cell_type": "code", + "source": [ + "import os\n", + "from google.colab import files\n", + "\n", + "# Pick a name for the image folder\n", + "local_dir = \"./preset/datasets/test_dataset/output\"\n", + "os.makedirs(local_dir)\n", + "local_dir = \"./preset/datasets/test_dataset/input\"\n", + "os.chdir(local_dir)\n", + "\n", + "# Choose and upload local images into the newly created directory\n", + "uploaded_images = files.upload()\n", + "os.chdir(\"/content/OSEDiff\") # back to parent directory" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 76 + }, + "id": "3NT03iH5y8p6", + "outputId": "7bdbfbd0-a3da-4e57-8e58-ee5992cb5220" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "\n", + " \n", + " \n", + " Upload widget is only available when the cell has been executed in the\n", + " current browser session. Please rerun this cell to enable.\n", + " \n", + " " + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Saving current.png to current.png\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "# Inference\n", + "After uploading your images, it will run OSEDiff enhancing over them. It will be executed with the scale factor 2. You can change it if you want." + ], + "metadata": { + "id": "8MfNZfHv0zu3" + } + }, + { + "cell_type": "code", + "source": [ + "UPSCALE_FACTOR = 2 #@param" + ], + "metadata": { + "id": "7EBFx90sxswV" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "SD21BASE_PATH = 'stabilityai/stable-diffusion-2-1-base'\n", + "DAPE_PATH = './DAPE.pth'\n", + "RAM_PATH = './ram_swin_large_14m.pth'" + ], + "metadata": { + "id": "XRAt7Det0nAz" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!python test_osediff.py \\\n", + "-i preset/datasets/test_dataset/input \\\n", + "-o preset/datasets/test_dataset/output \\\n", + "--osediff_path preset/models/osediff.pkl \\\n", + "--pretrained_model_name_or_path $SD21BASE_PATH \\\n", + "--ram_ft_path $DAPE_PATH \\\n", + "--ram_path $RAM_PATH \\\n", + "--upscale 2" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "H4a7mW3dy9wh", + "outputId": "57a0d2ec-3616-40d8-a10f-02e925ae5ce7" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/usr/local/lib/python3.10/dist-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers\n", + " warnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.layers\", FutureWarning)\n", + "/usr/local/lib/python3.10/dist-packages/timm/models/hub.py:4: FutureWarning: Importing from timm.models.hub is deprecated, please import via timm.models\n", + " warnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.models\", FutureWarning)\n", + "/usr/local/lib/python3.10/dist-packages/timm/models/registry.py:4: FutureWarning: Importing from timm.models.registry is deprecated, please import via timm.models\n", + " warnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.models\", FutureWarning)\n", + "/usr/local/lib/python3.10/dist-packages/timm/models/helpers.py:7: FutureWarning: Importing from timm.models.helpers is deprecated, please import via timm.models\n", + " warnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.models\", FutureWarning)\n", + "/encoder/layer/0/crossattention/self/query is tied\n", + "/encoder/layer/0/crossattention/self/key is tied\n", + "/encoder/layer/0/crossattention/self/value is tied\n", + "/encoder/layer/0/crossattention/output/dense is tied\n", + "/encoder/layer/0/crossattention/output/LayerNorm is tied\n", + "/encoder/layer/0/intermediate/dense is tied\n", + "/encoder/layer/0/output/dense is tied\n", + "/encoder/layer/0/output/LayerNorm is tied\n", + "/encoder/layer/1/crossattention/self/query is tied\n", + "/encoder/layer/1/crossattention/self/key is tied\n", + "/encoder/layer/1/crossattention/self/value is tied\n", + "/encoder/layer/1/crossattention/output/dense is tied\n", + "/encoder/layer/1/crossattention/output/LayerNorm is tied\n", + "/encoder/layer/1/intermediate/dense is tied\n", + "/encoder/layer/1/output/dense is tied\n", + "/encoder/layer/1/output/LayerNorm is tied\n", + "Loading default thretholds from .txt....\n", + "--------------\n", + "./ram_swin_large_14m.pth\n", + "--------------\n", + "load checkpoint from ./ram_swin_large_14m.pth\n", + "vit: swin_l\n", + "load lora from ./DAPE.pth\n", + "There are 2 images.\n", + "b'process preset/datasets/test_dataset/input/0801_pch_00001.png, tag: stone, stand, ,'\n", + "[Tiled VAE]: the input size is tiny and unnecessary to tile.\n", + "[Tiled Latent]: the input size is tiny and unnecessary to tile.\n", + "[Tiled VAE]: the input size is tiny and unnecessary to tile.\n", + "b'process preset/datasets/test_dataset/input/current.png, tag: boot, dress, garment, pose, print, stand, wear, woman, ,'\n", + "[Tiled VAE]: input_size: torch.Size([1, 3, 4000, 2672]), tile_size: 1024, padding: 32\n", + "[Tiled VAE]: split to 4x3 = 12 tiles. Optimal tile size 896x992, original tile size 1024x1024\n", + "[Tiled VAE]: Executing Encoder Task Queue: 100% 1092/1092 [00:48<00:00, 22.41it/s] \n", + "[Tiled Latent]: the input size is 4000x2672, need to tiled\n", + "[Tiled VAE]: input_size: torch.Size([1, 4, 500, 334]), tile_size: 224, padding: 11\n", + "[Tiled VAE]: split to 3x2 = 6 tiles. Optimal tile size 160x160, original tile size 224x224\n", + "[Tiled VAE]: Executing Decoder Task Queue: 77% 570/738 [01:15<02:51, 1.02s/it]^C\n" + ] + } + ] + } + ] +} \ No newline at end of file From 3f4f10f64dd9051ce3e6e6e33dcb8f56a60e7fa8 Mon Sep 17 00:00:00 2001 From: Bugrahan Donmez Date: Thu, 19 Dec 2024 20:53:15 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8acc69a..4804af9 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,10 @@ python test_osediff.py \ --align_method nofix ``` +For running the inference using Colab, please visit the link below. + +Open In Colab + ## 🚀 Calculate Inference Time For easy comparison, we provide the inference time testing script for osediff. ```