{"id":1383,"date":"2023-08-16T19:30:36","date_gmt":"2023-08-16T19:30:36","guid":{"rendered":"http:\/\/www.netexl.com\/blog\/?p=1383"},"modified":"2026-04-02T09:12:08","modified_gmt":"2026-04-02T09:12:08","slug":"install-deoldify-on-windows","status":"publish","type":"post","link":"https:\/\/www.netexl.com\/blog\/install-deoldify-on-windows\/","title":{"rendered":"Install DeOldify on Windows"},"content":{"rendered":"\n<p>Download and install <a href=\"https:\/\/www.anaconda.com\" target=\"_blank\" rel=\"noopener\" title=\"\">Anaconda<\/a><\/p>\n\n\n\n<p>Download Deoldify code from github<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/jantic\/DeOldify\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/github.com\/jantic\/DeOldify<\/a><\/p>\n\n\n\n<p>Extract contents of the downloaded DeOldify code zip file to a folder.<\/p>\n\n\n\n<p>Download <span style=\"text-decoration: underline;\">Completed Generator Weights<\/span> file for Video from the DeOldify github page (834 MB size)<\/p>\n\n\n\n<p>In the root of DeOldify folder create a new folder named &#8220;models&#8221; and copy downloaded <span style=\"text-decoration: underline;\">Completed Generator Weights<\/span> file to this folder (ColorizeVideo_gen.pth)<\/p>\n\n\n\n<p>Now launch Anaconda Powershell and go to root of DeOldify folder.<\/p>\n\n\n\n<p>Now we need to run few commands in sequence.<\/p>\n\n\n\n<p>Run following command first which will take a while to finish<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda env create -f environment.yml<\/code><\/pre>\n\n\n\n<p>Once above command finished, run the next command as following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda activate deoldify<\/code><\/pre>\n\n\n\n<p>Now run the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>jupyter lab<\/code><\/pre>\n\n\n\n<p>Note: In case you face issues with running jypyter command such as &#8220;cmdlet not found&#8221;, check the path of python library in the system PATH variable. Also, make sure jypyter is installed on your system. You can install jupyter using windows command prompt as following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install jupyter<\/code><\/pre>\n\n\n\n<p>Running jupyter lab command will launch in browser as shown in the screenshot below<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/www.netexl.com\/blog\/wp-content\/uploads\/2023\/08\/image-1-1024x503.png\" alt=\"\" class=\"wp-image-1388\" srcset=\"https:\/\/www.netexl.com\/blog\/wp-content\/uploads\/2023\/08\/image-1-1024x503.png 1024w, https:\/\/www.netexl.com\/blog\/wp-content\/uploads\/2023\/08\/image-1-300x147.png 300w, https:\/\/www.netexl.com\/blog\/wp-content\/uploads\/2023\/08\/image-1-768x377.png 768w, https:\/\/www.netexl.com\/blog\/wp-content\/uploads\/2023\/08\/image-1-280x138.png 280w, https:\/\/www.netexl.com\/blog\/wp-content\/uploads\/2023\/08\/image-1.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click Python 3 tab under notebook which will open up in a new tab. We will run all all code in this window. Make sure left hand side pane is diplaying content of the root of Deoldify folder. If not, then navigate to it.<\/p>\n\n\n\n<p>Go to the URL below (you can also navigate to this URL from DeOldify github page)<\/p>\n\n\n\n<p><a href=\"https:\/\/colab.research.google.com\/github\/jantic\/DeOldify\/blob\/master\/VideoColorizerColab.ipynb\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/colab.research.google.com\/github\/jantic\/DeOldify\/blob\/master\/VideoColorizerColab.ipynb<\/a><\/p>\n\n\n\n<p>Scroll down to Setup section which lists down a sequence of code which should be run from your local Colab. When running code in Colab, if you face issues with any module, install it locally in Colab using conda. You can also install ffmpeg if you get error such as &#8220;ffmpeg is not installed&#8221; using the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda install ffmpeg\r<\/code><\/pre>\n\n\n\n<p>In your local colab, run following commands. (Change some of the parameters accordingly such as video URL etc)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from deoldify import device\r\nfrom deoldify.device_id import DeviceId\r\n#choices:  CPU, GPU0...GPU7\r\ndevice.set(device=DeviceId.CPU)\r\n\r\nimport torch\r\n\r\nif not torch.cuda.is_available():\r\n    print('GPU not available.')\r\n\r\nfrom os import path\r\n\r\n!pip install -r requirements-colab.txt\r\n\r\nimport fastai\r\nfrom deoldify.visualize import *\r\nfrom pathlib import Path\r\ntorch.backends.cudnn.benchmark=True\r\nimport warnings\r\nwarnings.filterwarnings(\"ignore\", category=UserWarning, message=\".*?Your .*? set is empty.*?\")\r\n\r\ncolorizer = get_video_colorizer()\r\n\r\n\r\nsource_url = 'https:\/\/youtu.be\/7LE4FkucN9w' #@param {type:\"string\"}\r\nrender_factor = 21  #@param {type: \"slider\", min: 5, max: 40}\r\nwatermarked = True #@param {type:\"boolean\"}\r\n\r\nif source_url is not None and source_url !='':\r\n    video_path = colorizer.colorize_from_url(source_url, 'video.mp4', render_factor, watermarked=watermarked)\r\n    show_video_in_notebook(video_path)\r\nelse:\r\n    print('Provide a video url and try again.')<\/code><\/pre>\n\n\n\n<p>Once the process finishes, check your video in the &#8220;video\/result&#8221; folder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download and install Anaconda Download Deoldify code from github https:\/\/github.com\/jantic\/DeOldify Extract contents of the downloaded DeOldify code zip file to a folder. Download Completed Generator Weights file for Video from the DeOldify github page (834 MB size) In the root of DeOldify folder create a new folder named &#8220;models&#8221; and copy downloaded Completed Generator Weights file to this folder (ColorizeVideo_gen.pth) Now launch Anaconda Powershell and go to root of DeOldify folder. Now we need to run few commands in sequence. Run following command first which will take a while to finish Once above command finished, run the next command as following Now run the following command Note: In case you face issues with running jypyter command such as &#8220;cmdlet not found&#8221;, check the path of python library in the system PATH variable. Also, make sure jypyter is installed on your system. You can install jupyter using windows command prompt as[&#8230;]<\/p>\n","protected":false},"author":5,"featured_media":1537,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,37,1],"tags":[],"class_list":["post-1383","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-python","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/1383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/comments?post=1383"}],"version-history":[{"count":5,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/1383\/revisions"}],"predecessor-version":[{"id":1391,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/1383\/revisions\/1391"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media\/1537"}],"wp:attachment":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media?parent=1383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/categories?post=1383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/tags?post=1383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}