├── README.md ├── LICENSE ├── Hotshot_XL_Google_Colab.ipynb └── hotshot-xl-kaggle.ipynb /README.md: -------------------------------------------------------------------------------- 1 | # Hotshot_XL_Notebooks 2 | Jupyter notebooks to run Hotshot XL video generator on Colab and Kaggle 3 | 4 | Colab notebook 5 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1lShjBqJdRxSm9wVu-BgCKepYQb9V2fTy?usp=sharing) 6 | 7 | Kaggle notebook 8 | [![Open In Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://www.kaggle.com/pogscafe/hotshot-xl) 9 | 10 | Colab notebook for the original Hotshot XL repo 11 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/186a-KiVP-PoxC6-nc7qHFoT8G7UOej9l) 12 | 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 wandaweb 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Hotshot_XL_Google_Colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "source": [ 6 | "#@markdown # Options\n", 7 | "\n", 8 | "using_drive = \"Do not use Google Drive\" # @param [\"Do not use Google Drive\", \"Save videos to Drive\", \"Save project folder to Drive\"]\n", 9 | "\n", 10 | "#@markdown If you selected \"Save videos to Drive\" or \"Save project folder to Drive\", please enter the\n", 11 | "#@markdown full path to a Drive folder. The folder will be created if it doesn't exist.\n", 12 | "\n", 13 | "# Select drive directory\n", 14 | "drive_directory = '/content/drive/MyDrive/HotshotFolder' #@param {type:\"string\"}\n", 15 | "\n", 16 | "\n", 17 | "import os\n", 18 | "from google.colab import drive\n", 19 | "\n", 20 | "BASEPATH = '/content'\n", 21 | "\n", 22 | "if not using_drive == 'Do not use Google Drive':\n", 23 | " drive.mount('/content/drive')\n", 24 | " # Create the directory if it does not exist\n", 25 | " if not os.path.exists(drive_directory):\n", 26 | " os.makedirs(drive_directory, exist_ok=True)\n", 27 | "\n", 28 | "if (using_drive == 'Save project folder to Drive'):\n", 29 | " BASEPATH = drive_directory\n" 30 | ], 31 | "metadata": { 32 | "id": "OI1SUlaWZTVZ" 33 | }, 34 | "execution_count": null, 35 | "outputs": [] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": null, 40 | "metadata": { 41 | "id": "VjYy0F2gZIPR" 42 | }, 43 | "outputs": [], 44 | "source": [ 45 | "#@markdown # Installation\n", 46 | "#@markdown You can ignore the message about restarting the runtime.\n", 47 | "\n", 48 | "%cd $BASEPATH\n", 49 | "!git clone https://github.com/wandaweb/Hotshot-XL\n", 50 | "HOTSHOT_PATH = BASEPATH + '/Hotshot-XL'\n", 51 | "%cd $HOTSHOT_PATH\n", 52 | "!pip install -r requirements.txt\n", 53 | "\n", 54 | "import os\n", 55 | "os.makedirs('lora', exist_ok=True)\n", 56 | "os.makedirs('input', exist_ok=True)\n", 57 | "os.makedirs('output', exist_ok=True)\n", 58 | "\n", 59 | "!apt install imagemagick" 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "source": [ 65 | "#@title Parameters\n", 66 | "\n", 67 | "#@markdown # Make a Video\n", 68 | "\n", 69 | "%cd $HOTSHOT_PATH\n", 70 | "\n", 71 | "batch_size = 2 # @param {type:\"slider\", min:1, max:50, step:1}\n", 72 | "positive_prompt = 'cute teddy bear dancing in a cyberpunk city square, pixar style, isometric lighting, cinematic, dark, slow motion, wonderfully colored, neon lights' #@param {type:\"string\"}\n", 73 | "negative_prompt = 'blurry, fog' #@param {type:\"string\"}\n", 74 | "seed = -1 #@param {type:\"integer\"}\n", 75 | "width = 512 #@param {type:\"integer\"}\n", 76 | "height = 512 #@param {type:\"integer\"}\n", 77 | "upscale = \"2\" #@param [0, 2, 4]\n", 78 | "video_frames = 8 #@param {type:\"integer\"}\n", 79 | "video_duration = 1000 #@param {type:\"integer\"}\n", 80 | "steps = \"40\" #@param {type:\"string\"}\n", 81 | "lora_file_name = '' #@param {type:\"string\"}\n", 82 | "file_prefix = 'out_' #@param {type:\"string\"}\n", 83 | "file_type = '.mp4' #@param [\".mp4\", \".gif\"]\n", 84 | "scheduler='EulerDiscreteScheduler' #@param [\"EulerAncestralDiscreteScheduler\", \"EulerDiscreteScheduler\"]\n", 85 | "#@markdown ---\n", 86 | "#@markdown Gif to video\n", 87 | "gif_name = '' #@param {type:\"string\"}\n", 88 | "control_type = 'depth' #@param [\"depth\", \"canny\"]\n", 89 | "controlnet_conditioning_scale = 0.8 #@param {type:\"number\"}\n", 90 | "control_guidance_start = 0.0 #@param {type:\"number\"}\n", 91 | "control_guidance_end = 1.0 #@param {type:\"number\"}\n", 92 | "#@markdown ---\n", 93 | "#@markdown Resolutions quick reference\n", 94 | "\n", 95 | "#@markdown | Width x Height | Ratio| Orientation |\n", 96 | "#@markdown | --- | --- | --- |\n", 97 | "#@markdown | 512 x 512 | 1 : 1 | Square |\n", 98 | "#@markdown | 608 x 416 | 19 : 13 | Horizontal\n", 99 | "#@markdown | 416 x 608 | 13 : 19 | Vertical\n", 100 | "#@markdown | 672 x 384 | 7 : 4 | Horizontal\n", 101 | "#@markdown | 384 x 672 | 4 : 7 | Vertical\n", 102 | "#@markdown | 768 x 320 | 12 : 5 | Horizontal\n", 103 | "#@markdown | 320 x 768 | 5 : 12 | Vertical\n", 104 | "\n", 105 | "import datetime, random, os\n", 106 | "from IPython.display import display, Image, HTML\n", 107 | "from base64 import b64encode\n", 108 | "\n", 109 | "videos = []\n", 110 | "\n", 111 | "if seed == None or seed == -1:\n", 112 | " seed = random.randint(0, 18446744073709519871)\n", 113 | "\n", 114 | "for i in range(batch_size):\n", 115 | " file_name=f'{file_prefix}{datetime.datetime.now().strftime(\"%Y%m%d-%H%M%S\")}{file_type}'\n", 116 | " data_name=f'{file_prefix}{datetime.datetime.now().strftime(\"%Y%m%d-%H%M%S\")}.txt'\n", 117 | " # Create the command\n", 118 | " cmd = f'''python inference.py \\\n", 119 | " --prompt=\"{positive_prompt}\" \\\n", 120 | " --negative_prompt=\"{negative_prompt}\" \\\n", 121 | " --steps={steps} \\\n", 122 | " --seed={seed} \\\n", 123 | " --width={width} \\\n", 124 | " --height={height} \\\n", 125 | " --video_length={video_frames} \\\n", 126 | " --video_duration={video_duration} \\\n", 127 | " --scheduler=\"{scheduler}\" \\\n", 128 | " '''\n", 129 | " if upscale == '2' or upscale == '4':\n", 130 | " cmd += f'--upscale={upscale} \\\\'\n", 131 | " if not lora_file_name == '':\n", 132 | " print('using lora')\n", 133 | " cmd += f'--lora=\"lora/{lora_file_name}\" \\\\'\n", 134 | " if not gif_name == '':\n", 135 | " cmd += f'''--gif=input/{gif_name} \\\n", 136 | " --control_type={control_type} \\\n", 137 | " --controlnet_conditioning_scale={controlnet_conditioning_scale} \\\n", 138 | " --control_guidance_start={control_guidance_start} \\\n", 139 | " --control_guidance_end={control_guidance_end} \\\n", 140 | " '''\n", 141 | "\n", 142 | " cmd += f'--output=\"output/{file_name}\"'\n", 143 | "\n", 144 | " # Execute command\n", 145 | " print(cmd)\n", 146 | " get_ipython().system(cmd);\n", 147 | "\n", 148 | " # Write command to file\n", 149 | " f = open('output/'+data_name, 'w')\n", 150 | " f.write(cmd)\n", 151 | " f.close()\n", 152 | "\n", 153 | " # Save the video and command to Drive\n", 154 | " if using_drive == 'Save videos to Drive':\n", 155 | " get_ipython().system(f'cp output/{file_name} {drive_directory}')\n", 156 | " get_ipython().system(f'cp output/{data_name} {drive_directory}')\n", 157 | "\n", 158 | " seed = random.randint(0, 18446744073709519871)\n", 159 | " videos.append('output/' + file_name)\n", 160 | "\n", 161 | "# Show the results\n", 162 | "print(str(videos))\n", 163 | "result = ''\n", 164 | "if file_type == '.gif':\n", 165 | " for v in videos:\n", 166 | " display(Image(filename=v, retina=True))\n", 167 | "else:\n", 168 | " for v in videos:\n", 169 | " mp4 = open(v,'rb').read()\n", 170 | " data_url = 'data:video/mp4;base64,' + b64encode(mp4).decode()\n", 171 | " result += ('''\n", 172 | " \n", 175 | " ''' % data_url)\n", 176 | "HTML(result)\n" 177 | ], 178 | "metadata": { 179 | "id": "p2RfRp7SeEKx" 180 | }, 181 | "execution_count": null, 182 | "outputs": [] 183 | }, 184 | { 185 | "cell_type": "code", 186 | "source": [ 187 | "#@title Download a LoRA\n", 188 | "\n", 189 | "%cd $HOTSHOT_PATH\n", 190 | "%cd lora\n", 191 | "\n", 192 | "import requests\n", 193 | "\n", 194 | "url = 'https://civitai.com/api/download/models/163063' #@param {type:\"string\"}\n", 195 | "lora_file_name = 'woolify.safetensors' #@param {type:\"string\"}\n", 196 | "\n", 197 | "r = requests.get(url, allow_redirects=True)\n", 198 | "with open(lora_file_name, 'wb') as f:\n", 199 | " f.write(r.content)\n", 200 | "\n", 201 | "print('Downloaded ' + lora_file_name)" 202 | ], 203 | "metadata": { 204 | "id": "3a9rkwFW8IXE" 205 | }, 206 | "execution_count": null, 207 | "outputs": [] 208 | }, 209 | { 210 | "cell_type": "code", 211 | "source": [ 212 | "#@title Download gif\n", 213 | "\n", 214 | "%cd $HOTSHOT_PATH\n", 215 | "%cd input\n", 216 | "\n", 217 | "import requests\n", 218 | "from PIL import Image\n", 219 | "from io import BytesIO\n", 220 | "\n", 221 | "url='https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExZGFiY2M1bnl0bjVrNjdxYWViZTZsZHZwOXNncmNjbGhuam9lM3F0ZSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/0VKbVY3N0VW0ZegLbe/giphy.gif' #@param {type:\"string\"}\n", 222 | "gif_name = 'bunny.gif' #@param {type:\"string\"}\n", 223 | "\n", 224 | "r = requests.get(url, allow_redirects=True)\n", 225 | "with open(gif_name, 'wb') as f:\n", 226 | " f.write(r.content)\n", 227 | "\n", 228 | "# Show the frame count\n", 229 | "im = Image.open(gif_name)\n", 230 | "print(f'{gif_name} has {im.n_frames} frames')\n" 231 | ], 232 | "metadata": { 233 | "id": "sDsWEwxWwodE" 234 | }, 235 | "execution_count": null, 236 | "outputs": [] 237 | }, 238 | { 239 | "cell_type": "code", 240 | "source": [ 241 | "#@title Download webp and convert to gif\n", 242 | "\n", 243 | "%cd $HOTSHOT_PATH\n", 244 | "%cd input\n", 245 | "\n", 246 | "import requests\n", 247 | "from PIL import Image\n", 248 | "from io import BytesIO\n", 249 | "\n", 250 | "url='' #@param {type:\"string\"}\n", 251 | "gif_name = '' #@param {type:\"string\"}\n", 252 | "\n", 253 | "r = requests.get(url, allow_redirects=True)\n", 254 | "with open('temp.webp', 'wb') as f:\n", 255 | " f.write(r.content)\n", 256 | "\n", 257 | "cmd = f'convert temp.webp {gif_name}'\n", 258 | "get_ipython().system(cmd)\n", 259 | "\n", 260 | "# Show the frame count\n", 261 | "im = Image.open(gif_name)\n", 262 | "print(f'{gif_name} has {im.n_frames} frames')\n" 263 | ], 264 | "metadata": { 265 | "id": "vl5DN_ogJwdw" 266 | }, 267 | "execution_count": null, 268 | "outputs": [] 269 | } 270 | ], 271 | "metadata": { 272 | "accelerator": "GPU", 273 | "colab": { 274 | "gpuType": "T4", 275 | "provenance": [] 276 | }, 277 | "kernelspec": { 278 | "display_name": "Python 3", 279 | "name": "python3" 280 | }, 281 | "language_info": { 282 | "name": "python" 283 | } 284 | }, 285 | "nbformat": 4, 286 | "nbformat_minor": 0 287 | } 288 | -------------------------------------------------------------------------------- /hotshot-xl-kaggle.ipynb: -------------------------------------------------------------------------------- 1 | {"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"source":"\"Kaggle\"","metadata":{},"cell_type":"markdown"},{"cell_type":"code","source":"BASEPATH = '/kaggle/working'\n\n%cd $BASEPATH\n!git clone https://github.com/wandaweb/Hotshot-XL\nHOTSHOT_PATH = BASEPATH + '/Hotshot-XL'\n%cd $HOTSHOT_PATH\n!pip install -r requirements.txt\n\nimport os\nos.makedirs('lora', exist_ok=True)\nos.makedirs('input', exist_ok=True)\nos.makedirs('output', exist_ok=True)\n\n!apt install -y imagemagick","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-10-11T02:44:00.359985Z","iopub.execute_input":"2023-10-11T02:44:00.360902Z","iopub.status.idle":"2023-10-11T02:47:40.969517Z","shell.execute_reply.started":"2023-10-11T02:44:00.360853Z","shell.execute_reply":"2023-10-11T02:47:40.968313Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":1,"outputs":[{"name":"stdout","text":"/kaggle/working\nfatal: destination path 'Hotshot-XL' already exists and is not an empty directory.\n/kaggle/working/Hotshot-XL\nCollecting git+https://github.com/sberbank-ai/Real-ESRGAN.git (from -r requirements.txt (line 63))\n Cloning https://github.com/sberbank-ai/Real-ESRGAN.git to /tmp/pip-req-build-vpfz1af7\n Running command git clone --filter=blob:none --quiet https://github.com/sberbank-ai/Real-ESRGAN.git /tmp/pip-req-build-vpfz1af7\n Resolved https://github.com/sberbank-ai/Real-ESRGAN.git to commit 362a0316878f41dbdfbb23657b450c3353de5acf\n Preparing metadata (setup.py) ... \u001b[?25ldone\n\u001b[?25hCollecting accelerate==0.23.0 (from -r requirements.txt (line 1))\n Downloading accelerate-0.23.0-py3-none-any.whl (258 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m258.1/258.1 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m\n\u001b[?25hRequirement already satisfied: appdirs==1.4.4 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (1.4.4)\nRequirement already satisfied: certifi==2023.7.22 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (2023.7.22)\nCollecting charset-normalizer==3.3.0 (from -r requirements.txt (line 4))\n Downloading charset_normalizer-3.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: click==8.1.7 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (8.1.7)\nCollecting cmake==3.27.6 (from -r requirements.txt (line 6))\n Downloading cmake-3.27.6-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (26.0 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m26.0/26.0 MB\u001b[0m \u001b[31m39.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting decorator==4.4.2 (from -r requirements.txt (line 7))\n Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)\nCollecting diffusers==0.21.4 (from -r requirements.txt (line 8))\n Downloading diffusers-0.21.4-py3-none-any.whl (1.5 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m64.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: docker-pycreds==0.4.0 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 9)) (0.4.0)\nCollecting einops==0.7.0 (from -r requirements.txt (line 10))\n Downloading 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[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting filelock==3.12.4 (from -r requirements.txt (line 11))\n Downloading filelock-3.12.4-py3-none-any.whl (11 kB)\nCollecting fsspec==2023.9.2 (from -r requirements.txt (line 12))\n Downloading fsspec-2023.9.2-py3-none-any.whl (173 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m173.4/173.4 kB\u001b[0m \u001b[31m14.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: gitdb==4.0.10 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 13)) (4.0.10)\nCollecting GitPython==3.1.37 (from -r requirements.txt (line 14))\n Downloading GitPython-3.1.37-py3-none-any.whl (190 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m190.0/190.0 kB\u001b[0m \u001b[31m17.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: huggingface-hub==0.16.4 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 15)) (0.16.4)\nRequirement already satisfied: idna==3.4 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 16)) (3.4)\nCollecting imageio==2.31.5 (from -r requirements.txt (line 17))\n Downloading imageio-2.31.5-py3-none-any.whl (313 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m313.2/313.2 kB\u001b[0m \u001b[31m23.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting imageio-ffmpeg==0.4.9 (from -r requirements.txt (line 18))\n Downloading imageio_ffmpeg-0.4.9-py3-none-manylinux2010_x86_64.whl (26.9 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m26.9/26.9 MB\u001b[0m \u001b[31m37.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting importlib-metadata==6.8.0 (from -r requirements.txt (line 19))\n Downloading importlib_metadata-6.8.0-py3-none-any.whl (22 kB)\nRequirement already satisfied: Jinja2==3.1.2 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 20)) (3.1.2)\nCollecting lit==17.0.2 (from -r requirements.txt (line 21))\n Downloading lit-17.0.2.tar.gz (154 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m154.6/154.6 kB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25h Installing build dependencies ... \u001b[?25ldone\n\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n\u001b[?25h Installing backend dependencies ... \u001b[?25ldone\n\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n\u001b[?25hRequirement already satisfied: MarkupSafe==2.1.3 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 22)) (2.1.3)\nCollecting moviepy==1.0.3 (from -r requirements.txt (line 23))\n Downloading moviepy-1.0.3.tar.gz (388 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m388.3/388.3 kB\u001b[0m \u001b[31m28.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25ldone\n\u001b[?25hRequirement already satisfied: mpmath==1.3.0 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 24)) (1.3.0)\nRequirement already satisfied: networkx==3.1 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 25)) (3.1)\nCollecting numpy==1.26.0 (from -r requirements.txt (line 26))\n Downloading numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m18.2/18.2 MB\u001b[0m \u001b[31m48.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-cublas-cu11==11.10.3.66 (from -r requirements.txt (line 27))\n Downloading 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[31m3.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-cuda-cupti-cu11==11.7.101 (from -r requirements.txt (line 28))\n Downloading 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[31m58.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m0:01\u001b[0mm\n\u001b[?25hCollecting nvidia-cuda-nvrtc-cu11==11.7.99 (from -r requirements.txt (line 29))\n Downloading 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[31m56.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-cuda-runtime-cu11==11.7.99 (from -r requirements.txt (line 30))\n Downloading 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[31m55.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting nvidia-cudnn-cu11==8.5.0.96 (from -r requirements.txt (line 31))\n Downloading 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[31m1.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-cufft-cu11==10.9.0.58 (from -r requirements.txt (line 32))\n Downloading nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl (168.4 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m168.4/168.4 MB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-curand-cu11==10.2.10.91 (from -r requirements.txt (line 33))\n Downloading 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[31m8.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-cusolver-cu11==11.4.0.1 (from -r requirements.txt (line 34))\n Downloading 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[31m10.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-cusparse-cu11==11.7.4.91 (from -r requirements.txt (line 35))\n Downloading 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[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-nccl-cu11==2.14.3 (from -r requirements.txt (line 36))\n Downloading 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.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting nvidia-nvtx-cu11==11.7.91 (from -r requirements.txt (line 37))\n Downloading 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[31m2.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mta \u001b[36m0:00:01\u001b[0m\n\u001b[?25hCollecting packaging==23.2 (from -r requirements.txt (line 38))\n Downloading packaging-23.2-py3-none-any.whl (53 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.0/53.0 kB\u001b[0m \u001b[31m396.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n\u001b[?25hRequirement already satisfied: pathtools==0.1.2 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 39)) (0.1.2)\nCollecting Pillow==10.0.1 (from -r requirements.txt (line 40))\n Downloading Pillow-10.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (3.6 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.6/3.6 MB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting proglog==0.1.10 (from -r requirements.txt (line 41))\n Downloading proglog-0.1.10-py3-none-any.whl (6.1 kB)\nCollecting protobuf==4.24.3 (from -r requirements.txt (line 42))\n Downloading protobuf-4.24.3-cp37-abi3-manylinux2014_x86_64.whl (311 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m311.6/311.6 kB\u001b[0m \u001b[31m23.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting psutil==5.9.5 (from -r requirements.txt (line 43))\n Downloading psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m282.1/282.1 kB\u001b[0m \u001b[31m26.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting PyYAML==6.0.1 (from -r requirements.txt (line 44))\n Downloading PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (705 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m705.5/705.5 kB\u001b[0m \u001b[31m44.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting regex==2023.10.3 (from -r requirements.txt (line 45))\n Downloading regex-2023.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (773 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m773.9/773.9 kB\u001b[0m \u001b[31m48.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: requests==2.31.0 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 46)) (2.31.0)\nRequirement already satisfied: safetensors==0.3.3 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 47)) (0.3.3)\nCollecting sentry-sdk==1.31.0 (from -r requirements.txt (line 48))\n Downloading sentry_sdk-1.31.0-py2.py3-none-any.whl (224 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m224.8/224.8 kB\u001b[0m \u001b[31m21.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting setproctitle==1.3.3 (from -r requirements.txt (line 49))\n Downloading setproctitle-1.3.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (30 kB)\nRequirement already satisfied: six==1.16.0 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 50)) (1.16.0)\nCollecting smmap==5.0.1 (from -r requirements.txt (line 51))\n Downloading smmap-5.0.1-py3-none-any.whl (24 kB)\nRequirement already satisfied: sympy==1.12 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 52)) (1.12)\nCollecting tokenizers==0.14.0 (from -r requirements.txt (line 53))\n Downloading tokenizers-0.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m64.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m\n\u001b[?25hCollecting torch==2.0.1 (from -r requirements.txt (line 54))\n Downloading 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[31m1.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting torchvision==0.15.2 (from -r requirements.txt (line 55))\n Downloading 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[31m83.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hRequirement already satisfied: tqdm==4.66.1 in /opt/conda/lib/python3.10/site-packages (from -r requirements.txt (line 56)) (4.66.1)\nCollecting transformers==4.34.0 (from -r requirements.txt (line 57))\n Downloading transformers-4.34.0-py3-none-any.whl (7.7 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.7/7.7 MB\u001b[0m \u001b[31m64.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting triton==2.0.0 (from -r requirements.txt (line 58))\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[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting typing_extensions==4.8.0 (from -r requirements.txt (line 59))\n Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)\nCollecting urllib3==2.0.6 (from -r requirements.txt (line 60))\n Downloading urllib3-2.0.6-py3-none-any.whl (123 kB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m123.8/123.8 kB\u001b[0m \u001b[31m11.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting wandb==0.15.11 (from -r requirements.txt (line 61))\n Downloading wandb-0.15.11-py3-none-any.whl (2.1 MB)\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m72.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCollecting zipp==3.17.0 (from -r requirements.txt (line 62))\n Downloading zipp-3.17.0-py3-none-any.whl (7.4 kB)\nRequirement already satisfied: setuptools in /opt/conda/lib/python3.10/site-packages (from imageio-ffmpeg==0.4.9->-r requirements.txt (line 18)) (68.0.0)\nRequirement already satisfied: wheel in /opt/conda/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->-r requirements.txt (line 27)) (0.40.0)\nRequirement already satisfied: opencv-python in /opt/conda/lib/python3.10/site-packages (from RealESRGAN==1.0->-r requirements.txt (line 63)) (4.8.0.76)\nBuilding wheels for collected packages: lit, moviepy, RealESRGAN\n Building wheel for lit (pyproject.toml) ... \u001b[?25ldone\n\u001b[?25h Created wheel for lit: filename=lit-17.0.2-py3-none-any.whl size=93257 sha256=8d7a674ca859456cd5212bc0daab6f2f45fbb5047de3db1d2bb27525a4eb3e9b\n Stored in directory: /root/.cache/pip/wheels/3a/ff/73/ce1a12d89231e9ac175fb6493ee1fcc8768e85ee3bea4b98b2\n Building wheel for moviepy (setup.py) ... \u001b[?25ldone\n\u001b[?25h Created wheel for moviepy: filename=moviepy-1.0.3-py3-none-any.whl size=110730 sha256=d1543fdffe9d2f3ff2a0e675345cb251f69c8a11da5438c851dc7c4621d41fa0\n Stored in directory: /root/.cache/pip/wheels/96/32/2d/e10123bd88fbfc02fed53cc18c80a171d3c87479ed845fa7c1\n Building wheel for RealESRGAN (setup.py) ... \u001b[?25ldone\n\u001b[?25h Created wheel for RealESRGAN: filename=RealESRGAN-1.0-py3-none-any.whl size=9107 sha256=ff1ec36ec406dc12fe2b7b24f5a41825ffe305acc5c6690becf35c0f3321b6ec\n Stored in directory: /tmp/pip-ephem-wheel-cache-ap43sbdv/wheels/dd/a3/7d/774508ed192455403be294c8a6c4ad1c83dde8fcdd8903e64a\nSuccessfully built lit moviepy RealESRGAN\nInstalling collected packages: lit, cmake, zipp, urllib3, typing_extensions, smmap, setproctitle, regex, PyYAML, psutil, protobuf, proglog, Pillow, packaging, 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, numpy, imageio-ffmpeg, fsspec, filelock, einops, decorator, charset-normalizer, sentry-sdk, nvidia-cusolver-cu11, nvidia-cudnn-cu11, importlib-metadata, imageio, moviepy, GitPython, wandb, tokenizers, diffusers, transformers, triton, torch, torchvision, RealESRGAN, accelerate\n Attempting uninstall: zipp\n Found existing installation: zipp 3.15.0\n Uninstalling zipp-3.15.0:\n Successfully uninstalled zipp-3.15.0\n Attempting uninstall: urllib3\n Found existing installation: urllib3 1.26.15\n Uninstalling urllib3-1.26.15:\n Successfully uninstalled urllib3-1.26.15\n Attempting uninstall: typing_extensions\n Found existing installation: typing_extensions 4.6.3\n Uninstalling typing_extensions-4.6.3:\n Successfully uninstalled typing_extensions-4.6.3\n Attempting uninstall: smmap\n Found existing installation: smmap 5.0.0\n Uninstalling smmap-5.0.0:\n Successfully uninstalled smmap-5.0.0\n Attempting uninstall: setproctitle\n Found existing installation: setproctitle 1.3.2\n Uninstalling setproctitle-1.3.2:\n Successfully uninstalled setproctitle-1.3.2\n Attempting uninstall: regex\n Found existing installation: regex 2023.6.3\n Uninstalling regex-2023.6.3:\n Successfully uninstalled regex-2023.6.3\n Attempting uninstall: PyYAML\n Found existing installation: PyYAML 6.0\n Uninstalling PyYAML-6.0:\n Successfully uninstalled PyYAML-6.0\n Attempting uninstall: psutil\n Found existing installation: psutil 5.9.3\n Uninstalling psutil-5.9.3:\n Successfully uninstalled psutil-5.9.3\n Attempting uninstall: protobuf\n Found existing installation: protobuf 3.20.3\n Uninstalling protobuf-3.20.3:\n Successfully uninstalled protobuf-3.20.3\n Attempting uninstall: Pillow\n Found existing installation: Pillow 9.5.0\n Uninstalling Pillow-9.5.0:\n Successfully uninstalled Pillow-9.5.0\n Attempting uninstall: packaging\n Found existing installation: packaging 21.3\n Uninstalling packaging-21.3:\n Successfully uninstalled packaging-21.3\n Attempting uninstall: numpy\n Found existing installation: numpy 1.23.5\n Uninstalling numpy-1.23.5:\n Successfully uninstalled numpy-1.23.5\n Attempting uninstall: fsspec\n Found existing installation: fsspec 2023.9.0\n Uninstalling fsspec-2023.9.0:\n Successfully uninstalled fsspec-2023.9.0\n Attempting uninstall: filelock\n Found existing installation: filelock 3.12.2\n Uninstalling filelock-3.12.2:\n Successfully uninstalled filelock-3.12.2\n Attempting uninstall: decorator\n Found existing installation: decorator 5.1.1\n Uninstalling decorator-5.1.1:\n Successfully uninstalled decorator-5.1.1\n Attempting uninstall: charset-normalizer\n Found existing installation: charset-normalizer 3.1.0\n Uninstalling charset-normalizer-3.1.0:\n Successfully uninstalled charset-normalizer-3.1.0\n Attempting uninstall: sentry-sdk\n Found existing installation: sentry-sdk 1.30.0\n Uninstalling sentry-sdk-1.30.0:\n Successfully uninstalled sentry-sdk-1.30.0\n Attempting uninstall: importlib-metadata\n Found existing installation: importlib-metadata 6.7.0\n Uninstalling importlib-metadata-6.7.0:\n Successfully uninstalled importlib-metadata-6.7.0\n Attempting uninstall: imageio\n Found existing installation: imageio 2.31.1\n Uninstalling imageio-2.31.1:\n Successfully uninstalled imageio-2.31.1\n Attempting uninstall: GitPython\n Found existing installation: GitPython 3.1.31\n Uninstalling GitPython-3.1.31:\n Successfully uninstalled GitPython-3.1.31\n Attempting uninstall: wandb\n Found existing installation: wandb 0.15.9\n Uninstalling wandb-0.15.9:\n Successfully uninstalled wandb-0.15.9\n Attempting uninstall: tokenizers\n Found existing installation: tokenizers 0.13.3\n Uninstalling tokenizers-0.13.3:\n Successfully uninstalled tokenizers-0.13.3\n Attempting uninstall: transformers\n Found existing installation: transformers 4.33.0\n Uninstalling transformers-4.33.0:\n Successfully uninstalled transformers-4.33.0\n Attempting uninstall: torch\n Found existing installation: torch 2.0.0\n Uninstalling torch-2.0.0:\n Successfully uninstalled torch-2.0.0\n Attempting uninstall: torchvision\n Found existing installation: torchvision 0.15.1\n Uninstalling torchvision-0.15.1:\n Successfully uninstalled torchvision-0.15.1\n Attempting uninstall: accelerate\n Found existing installation: accelerate 0.22.0\n Uninstalling accelerate-0.22.0:\n Successfully uninstalled accelerate-0.22.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.\ncudf 23.8.0 requires cupy-cuda11x>=12.0.0, which is not installed.\ncuml 23.8.0 requires cupy-cuda11x>=12.0.0, which is not installed.\ndask-cudf 23.8.0 requires cupy-cuda11x>=12.0.0, which is not installed.\napache-beam 2.46.0 requires dill<0.3.2,>=0.3.1.1, but you have dill 0.3.7 which is incompatible.\napache-beam 2.46.0 requires numpy<1.25.0,>=1.14.3, but you have numpy 1.26.0 which is incompatible.\napache-beam 2.46.0 requires protobuf<4,>3.12.2, but you have protobuf 4.24.3 which is incompatible.\napache-beam 2.46.0 requires pyarrow<10.0.0,>=3.0.0, but you have pyarrow 11.0.0 which is incompatible.\nbeatrix-jupyterlab 2023.621.222118 requires jupyter-server~=1.16, but you have jupyter-server 2.6.0 which is incompatible.\nbotocore 1.31.17 requires urllib3<1.27,>=1.25.4, but you have urllib3 2.0.6 which is incompatible.\ncmudict 1.0.13 requires importlib-metadata<6.0.0,>=5.1.0, but you have importlib-metadata 6.8.0 which is incompatible.\ncudf 23.8.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.0.2 which is incompatible.\ncuml 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.\ndask-cuda 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.\ndask-cuda 23.8.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.0.2 which is incompatible.\ndask-cudf 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.\ndask-cudf 23.8.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.0.2 which is incompatible.\ndistributed 2023.7.1 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.\nfitter 1.6.0 requires pandas<3.0.0,>=2.0.3, but you have pandas 2.0.2 which is incompatible.\ngcsfs 2023.6.0 requires fsspec==2023.6.0, but you have fsspec 2023.9.2 which is incompatible.\ngoogle-auth 2.20.0 requires urllib3<2.0, but you have urllib3 2.0.6 which is incompatible.\ngoogle-cloud-aiplatform 0.6.0a1 requires google-api-core[grpc]<2.0.0dev,>=1.22.2, but you have google-api-core 2.11.1 which is incompatible.\ngoogle-cloud-automl 1.0.1 requires google-api-core[grpc]<2.0.0dev,>=1.14.0, but you have google-api-core 2.11.1 which is incompatible.\ngoogle-cloud-bigquery 2.34.4 requires packaging<22.0dev,>=14.3, but you have packaging 23.2 which is incompatible.\ngoogle-cloud-bigquery 2.34.4 requires protobuf<4.0.0dev,>=3.12.0, but you have protobuf 4.24.3 which is incompatible.\ngoogle-cloud-bigtable 1.7.3 requires protobuf<4.0.0dev, but you have protobuf 4.24.3 which is incompatible.\ngoogle-cloud-pubsub 2.17.1 requires grpcio<2.0dev,>=1.51.3, but you have grpcio 1.51.1 which is incompatible.\ngoogle-cloud-vision 2.8.0 requires protobuf<4.0.0dev,>=3.19.0, but you have protobuf 4.24.3 which is incompatible.\njupyterlab-lsp 4.2.0 requires jupyter-lsp>=2.0.0, but you have jupyter-lsp 1.5.1 which is incompatible.\nkfp 2.0.1 requires google-cloud-storage<3,>=2.2.1, but you have google-cloud-storage 1.44.0 which is incompatible.\nkfp 2.0.1 requires protobuf<4,>=3.13.0, but you have protobuf 4.24.3 which is incompatible.\nkfp 2.0.1 requires urllib3<2.0.0, but you have urllib3 2.0.6 which is incompatible.\nkfp-pipeline-spec 0.2.2 requires protobuf<4,>=3.13.0, but you have protobuf 4.24.3 which is incompatible.\nmomepy 0.6.0 requires shapely>=2, but you have shapely 1.8.5.post1 which is incompatible.\nnumba 0.57.1 requires numpy<1.25,>=1.21, but you have numpy 1.26.0 which is incompatible.\nopentelemetry-api 1.18.0 requires importlib-metadata~=6.0.0, but you have importlib-metadata 6.8.0 which is incompatible.\npymc3 3.11.5 requires numpy<1.22.2,>=1.15.0, but you have numpy 1.26.0 which is incompatible.\npymc3 3.11.5 requires scipy<1.8.0,>=1.7.3, but you have scipy 1.11.2 which is incompatible.\nraft-dask 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.\ns3fs 2023.9.0 requires fsspec==2023.9.0, but you have fsspec 2023.9.2 which is incompatible.\ntensorboardx 2.6 requires protobuf<4,>=3.8.0, but you have protobuf 4.24.3 which is incompatible.\ntensorflow 2.12.0 requires numpy<1.24,>=1.22, but you have numpy 1.26.0 which is incompatible.\ntensorflow-metadata 0.14.0 requires protobuf<4,>=3.7, but you have protobuf 4.24.3 which is incompatible.\ntensorflow-transform 0.14.0 requires protobuf<4,>=3.7, but you have protobuf 4.24.3 which is incompatible.\ntorchdata 0.6.0 requires torch==2.0.0, but you have torch 2.0.1 which is incompatible.\nwoodwork 0.26.0 requires numpy<1.25.0,>=1.22.0, but you have numpy 1.26.0 which is incompatible.\nydata-profiling 4.3.1 requires numpy<1.24,>=1.16.0, but you have numpy 1.26.0 which is incompatible.\nydata-profiling 4.3.1 requires scipy<1.11,>=1.4.1, but you have scipy 1.11.2 which is incompatible.\u001b[0m\u001b[31m\n\u001b[0mSuccessfully installed GitPython-3.1.37 Pillow-10.0.1 PyYAML-6.0.1 RealESRGAN-1.0 accelerate-0.23.0 charset-normalizer-3.3.0 cmake-3.27.6 decorator-4.4.2 diffusers-0.21.4 einops-0.7.0 filelock-3.12.4 fsspec-2023.9.0 imageio-2.31.5 imageio-ffmpeg-0.4.9 importlib-metadata-6.8.0 lit-17.0.2 moviepy-1.0.3 numpy-1.25.2 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 packaging-23.2 proglog-0.1.10 protobuf-4.21.12 psutil-5.9.5 regex-2023.10.3 sentry-sdk-1.31.0 setproctitle-1.3.3 smmap-5.0.1 tokenizers-0.14.0 torch-2.0.1 torchvision-0.15.2 transformers-4.34.0 triton-2.0.0 typing_extensions-4.6.3 urllib3-1.26.16 wandb-0.15.11 zipp-3.15.0\nReading package lists... Done\nBuilding dependency tree... Done\nReading state information... Done\nThe following additional packages will be installed:\n fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts\n imagemagick-6-common imagemagick-6.q16 libde265-0 libdjvulibre-text\n libdjvulibre21 libfftw3-double3 libgs9 libgs9-common libheif1 libidn12\n libijs-0.35 libilmbase25 libjbig2dec0 libjxr-tools libjxr0 liblqr-1-0\n libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6\n libnetpbm10 libopenexr25 libwebpdemux2 libwmflite-0.2-7 netpbm poppler-data\nSuggested packages:\n fonts-noto fonts-freefont-otf | fonts-freefont-ttf fonts-texgyre\n ghostscript-x imagemagick-doc autotrace cups-bsd | lpr | lprng enscript gimp\n gnuplot grads hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils\n transfig ufraw-batch libfftw3-bin libfftw3-dev inkscape poppler-utils\n fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic\n | fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming fonts-nanum\nThe following NEW packages will be installed:\n fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts\n imagemagick imagemagick-6-common imagemagick-6.q16 libde265-0\n libdjvulibre-text libdjvulibre21 libfftw3-double3 libgs9 libgs9-common\n libheif1 libidn12 libijs-0.35 libilmbase25 libjbig2dec0 libjxr-tools libjxr0\n liblqr-1-0 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra\n libmagickwand-6.q16-6 libnetpbm10 libopenexr25 libwebpdemux2\n libwmflite-0.2-7 netpbm poppler-data\n0 upgraded, 31 newly installed, 0 to remove and 74 not upgraded.\nNeed to get 26.5 MB of archives.\nAfter this operation, 93.2 MB of additional disk space will be used.\nGet:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 fonts-droid-fallback all 1:6.0.1r16-1.1build1 [1805 kB]\nGet:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfftw3-double3 amd64 3.3.8-2ubuntu8 [770 kB]\nGet:3 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libde265-0 amd64 1.0.8-1 [243 kB]\nGet:4 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libheif1 amd64 1.12.0-2build1 [196 kB]\nGet:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 liblqr-1-0 amd64 0.4.2-2.1 [27.7 kB]\nIgn:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libwebpdemux2 amd64 1.2.2-2ubuntu0.22.04.1\nGet:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 imagemagick-6-common all 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 [63.6 kB]\nGet:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libmagickcore-6.q16-6 amd64 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 [1788 kB]\nGet:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libmagickwand-6.q16-6 amd64 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 [328 kB]\nGet:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 poppler-data all 0.4.11-1 [2171 kB]\nGet:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 fonts-noto-mono all 20201225-1build1 [397 kB]\nErr:6 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 libwebpdemux2 amd64 1.2.2-2ubuntu0.22.04.1\n 404 Not Found [IP: 185.125.190.39 80]\nGet:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 fonts-urw-base35 all 20200910-1 [6367 kB]\nGet:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgs9-common all 9.55.0~dfsg1-0ubuntu5.4 [752 kB]\nGet:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libidn12 amd64 1.38-4ubuntu1 [60.0 kB]\nGet:15 http://archive.ubuntu.com/ubuntu jammy/main amd64 libijs-0.35 amd64 0.35-15build2 [16.5 kB]\nGet:16 http://archive.ubuntu.com/ubuntu jammy/main amd64 libjbig2dec0 amd64 0.19-3build2 [64.7 kB]\nGet:17 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgs9 amd64 9.55.0~dfsg1-0ubuntu5.4 [5032 kB]\nGet:18 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ghostscript amd64 9.55.0~dfsg1-0ubuntu5.4 [49.4 kB]\nGet:19 http://archive.ubuntu.com/ubuntu jammy/universe amd64 gsfonts all 1:8.11+urwcyr1.0.7~pre44-4.5 [3120 kB]\nGet:20 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 imagemagick-6.q16 amd64 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 [224 kB]\nGet:21 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 imagemagick amd64 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 [14.6 kB]\nGet:22 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdjvulibre-text all 3.5.28-2build2 [50.9 kB]\nGet:23 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdjvulibre21 amd64 3.5.28-2build2 [624 kB]\nGet:24 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libilmbase25 amd64 2.5.7-2 [175 kB]\nGet:25 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libjxr0 amd64 1.2~git20170615.f752187-5 [174 kB]\nGet:26 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libjxr-tools amd64 1.2~git20170615.f752187-5 [16.0 kB]\nGet:27 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libopenexr25 amd64 2.5.7-1 [780 kB]\nGet:28 http://archive.ubuntu.com/ubuntu jammy/main amd64 libwmflite-0.2-7 amd64 0.2.12-5ubuntu1 [68.9 kB]\nGet:29 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libmagickcore-6.q16-6-extra amd64 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.3 [70.1 kB]\nGet:30 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libnetpbm10 amd64 2:10.0-15.4 [59.1 kB]\nGet:31 http://archive.ubuntu.com/ubuntu jammy/universe amd64 netpbm amd64 2:10.0-15.4 [1007 kB]\nFetched 26.5 MB in 2s (12.2 MB/s) \u001b[0m\u001b[33m\n\u001b[1;31mE: \u001b[0mFailed to fetch http://security.ubuntu.com/ubuntu/pool/main/libw/libwebp/libwebpdemux2_1.2.2-2ubuntu0.22.04.1_amd64.deb 404 Not Found [IP: 185.125.190.39 80]\u001b[0m\n\u001b[1;31mE: \u001b[0mUnable to fetch some archives, maybe run apt-get update or try with --fix-missing?\u001b[0m\n","output_type":"stream"}]},{"cell_type":"code","source":"%cd $HOTSHOT_PATH\n\n#Parameters\n\nbatch_size = 1 # @param {type:\"slider\", min:1, max:50, step:1}\npositive_prompt = 'snow white, gorgeous girl with black hair, pale skin, with red lipstick, in a long dress, dancing in a cyberpunk city square, octane render, dramatic lighting, dark, slow motion, colorful, disney, pixar style, centered, looking at viewer' #@param {type:\"string\"}\nnegative_prompt = 'blurry, fog' #@param {type:\"string\"}\nseed = -1 #@param {type:\"integer\"}\nwidth = 416 #@param {type:\"integer\"}\nheight = 608 #@param {type:\"integer\"}\nupscale = \"2\" #@param [0, 2, 4]\nvideo_frames = 8 #@param {type:\"integer\"}\nvideo_duration = 1000 #@param {type:\"integer\"}\nsteps = \"40\" #@param {type:\"string\"}\nlora_file_name = '' #@param {type:\"string\"}\nfile_prefix = 'out_' #@param {type:\"string\"}\nfile_type = '.mp4' #@param [\".mp4\", \".gif\"]\nscheduler='EulerDiscreteScheduler' #@param [\"EulerAncestralDiscreteScheduler\", \"EulerDiscreteScheduler\"]\n\n# Gif to video\ngif_name = '' #@param {type:\"string\"}\ncontrol_type = 'depth' #@param [\"depth\", \"canny\"]\ncontrolnet_conditioning_scale = 0.8 #@param {type:\"number\"}\ncontrol_guidance_start = 0.0 #@param {type:\"number\"}\ncontrol_guidance_end = 1.0 #@param {type:\"number\"}\n\n# Resolutions quick reference\n\n# | Width x Height | Ratio| Orientation |\n# | --- | --- | --- |\n# | 512 x 512 | 1 : 1 | Square |\n# | 608 x 416 | 19 : 13 | Horizontal\n# | 416 x 608 | 13 : 19 | Vertical\n# | 672 x 384 | 7 : 4 | Horizontal\n# | 384 x 672 | 4 : 7 | Vertical\n# | 768 x 320 | 12 : 5 | Horizontal\n# | 320 x 768 | 5 : 12 | Vertical\n\nimport datetime, random, os\nfrom IPython.display import display, Image, HTML\nfrom base64 import b64encode\n\nvideos = []\n\nif seed == None or seed == -1:\n seed = random.randint(0, 18446744073709519871)\n\nfor i in range(batch_size):\n file_name=f'{file_prefix}{datetime.datetime.now().strftime(\"%Y%m%d-%H%M%S\")}{file_type}'\n data_name=f'{file_prefix}{datetime.datetime.now().strftime(\"%Y%m%d-%H%M%S\")}.txt'\n # Create the command\n cmd = f'''python inference.py \\\n --prompt=\"{positive_prompt}\" \\\n --negative_prompt=\"{negative_prompt}\" \\\n --steps={steps} \\\n --seed={seed} \\\n --width={width} \\\n --height={height} \\\n --video_length={video_frames} \\\n --video_duration={video_duration} \\\n --scheduler=\"{scheduler}\" \\\n '''\n if upscale == '2' or upscale == '4':\n cmd += f'--upscale={upscale} '\n if not lora_file_name == '':\n print('using lora')\n cmd += f'--lora=\"lora/{lora_file_name}\" '\n if not gif_name == '':\n cmd += f'''--gif=input/{gif_name} \\\n --control_type={control_type} \\\n --controlnet_conditioning_scale={controlnet_conditioning_scale} \\\n --control_guidance_start={control_guidance_start} \\\n --control_guidance_end={control_guidance_end} \\\n '''\n\n cmd += f'--output=\"output/{file_name}\"'\n\n # Execute command\n print(cmd)\n get_ipython().system(cmd);\n\n # Write command to file\n f = open('output/'+data_name, 'w')\n f.write(cmd)\n f.close()\n\n seed = random.randint(0, 18446744073709519871)\n videos.append('output/' + file_name)\n\n# Show the results\nprint(str(videos))\nresult = ''\nif file_type == '.gif':\n for v in videos:\n display(Image(filename=v, retina=True))\nelse:\n for v in videos:\n mp4 = open(v,'rb').read()\n data_url = 'data:video/mp4;base64,' + b64encode(mp4).decode()\n result += ('''\n \n ''' % data_url)\nHTML(result)","metadata":{"execution":{"iopub.status.busy":"2023-10-11T02:47:40.972064Z","iopub.execute_input":"2023-10-11T02:47:40.972493Z"},"trusted":true},"execution_count":null,"outputs":[{"name":"stdout","text":"/kaggle/working/Hotshot-XL\npython inference.py --prompt=\"snow white, gorgeous girl with black hair, pale skin, with red lipstick, in a long dress, dancing in a cyberpunk city square, octane render, dramatic lighting, dark, slow motion, colorful, disney, pixar style, centered, looking at viewer\" --negative_prompt=\"blurry, fog\" --steps=40 --seed=8029280712831418301 --width=416 --height=608 --video_length=8 --video_duration=1000 --scheduler=\"EulerDiscreteScheduler\" --upscale=2 \\--output=\"output/out_20231011-024740.mp4\"\nThe cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.\n0it [00:00, ?it/s]\nDownloading (…)ain/model_index.json: 100%|█████| 579/579 [00:00<00:00, 3.09MB/s]\nFetching 18 files: 0%| | 0/18 [00:00