{"id":38730,"date":"2025-07-06T09:52:16","date_gmt":"2025-07-06T01:52:16","guid":{"rendered":"https:\/\/www.1ai.net\/?p=38730"},"modified":"2025-07-02T12:57:50","modified_gmt":"2025-07-02T04:57:50","slug":"comfyui-ai%e7%bb%98%e7%94%bb%e5%a4%aa%e6%85%a2%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9fgudacudnnpytorch%e5%ae%89%e8%a3%85%ef%bc%8c%e8%ae%a9%e4%bd%a0%e7%9a%84comfyui%e8%b5%b7%e9%a3%9e","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/38730.html","title":{"rendered":"What to do when comfyui AI painting is too slow?GUDA+cuDNN+pytorch installation to make your comfyUI take off!"},"content":{"rendered":"<p>Some people's computers are clearly well configured and have good graphics cards, but when they do<a href=\"https:\/\/www.1ai.net\/en\/tag\/ai%e7%bb%98%e7%94%bb\" title=\"[SEES ARTICLES WITH [AI PAINTING] LABELS]\" target=\"_blank\" >AI Painting<\/a>When it's slow, it's probably because you don't have CUDA and cuDNN installed.<\/p>\n<p>My computer just did the system, comfyUI also reinstalled, comfyUI did not install CUDA, out of the map becomes very slow very slow, today I will take you to the CUDA, cuDNN and pytorch installation, so that comfyUI speed up a bit.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38731\" title=\"43d674f1j00syr9ja0076d000u000irm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/43d674f1j00syr9ja0076d000u000irm.jpg\" alt=\"43d674f1j00syr9ja0076d000u000irm\" width=\"1080\" height=\"675\" \/><\/p>\n<p>Before I installed it, I ran a graph with kontext and it came in at 285 seconds.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38732\" title=\"be062c4bj00syr9j60003d0009u0010m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/be062c4bj00syr9j60003d0009u0010m.jpg\" alt=\"be062c4bj00syr9j60003d0009u0010m\" width=\"354\" height=\"36\" \/><\/p>\n<p>I. Installing CUDA<\/p>\n<p>1, in the installation of the first to determine which version of your computer to install the highest CUDA support<\/p>\n<p>First open the NVIDIA control panel on your computer<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38733\" title=\"e862d103j00syr9j8002gd000fm007xm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/e862d103j00syr9j8002gd000fm007xm.jpg\" alt=\"e862d103j00syr9j8002gd000fm007xm\" width=\"562\" height=\"285\" \/><\/p>\n<p>CLICK ON THE NVIDIA CONTROL PANEL FOR SYSTEM INFORMATION TO THE BOTTOM LEFT OF THE PANEL<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38735\" title=\"ba1380a7j00syr9ja002md000qo00jrm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/ba1380a7j00syr9ja002md000qo00jrm.jpg\" alt=\"ba1380a7j00syr9ja002md000qo00jrm\" width=\"960\" height=\"711\" \/><\/p>\n<p>Finding NVCGDA64.DLL means that our computer supports the installation of CUDA<\/p>\n<p>Remember the version number 12.9.90 at the end, this is the highest version supported by our computer and we can only install CUDA versions less than or equal to 12.9.90.<\/p>\n<p>2. Determine the version number of CUDA according to python<\/p>\n<p>Open PyTorch's webpage (https:\/\/pytorch.org) and scroll down to see the python version selection<\/p>\n<p>Since our CUDA supports up to 12.9.90, we have a choice of 11.8, 12.6 and 12.8 versions of CUDA.<\/p>\n<p>Here we choose version 12.8.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38734\" title=\"6544bd29j00syr9j90031d000qq00hjm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/6544bd29j00syr9j90031d000qq00hjm.jpg\" alt=\"6544bd29j00syr9j90031d000qq00hjm\" width=\"962\" height=\"631\" \/><\/p>\n<p>3. Download CUDA<\/p>\n<p>Once you have determined the version of CUDA, go to the CUDA download page and select the correct version to download:<\/p>\n<p>Website:<\/p>\n<p>https:\/\/developer.nvidia.com\/cuda-toolkit-archive<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38736\" title=\"6e9b11bej00syr9ja00gdd000u000r4m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/6e9b11bej00syr9ja00gdd000u000r4m.jpg\" alt=\"6e9b11bej00syr9ja00gdd000u000r4m\" width=\"1080\" height=\"976\" \/><\/p>\n<p>3. Installation of CUDA<\/p>\n<p>Download and install<\/p>\n<p>Since I already have Visual Studio installed, I didn't check it here.<\/p>\n<p>Click Next and default all the way to the end of the installation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38737\" title=\"12d51b26j00syr9j80031d000gi00ccm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/12d51b26j00syr9j80031d000gi00ccm.jpg\" alt=\"12d51b26j00syr9j80031d000gi00ccm\" width=\"594\" height=\"444\" \/><\/p>\n<p>Once installed, check if the installation was successful<\/p>\n<p>win+r opens the running window, enter cmd to open the command line window<\/p>\n<p>Enter \"nvcc \u2013version\" to view CUDA version number, currently V12.8.61, indicating that CUDA was installed successfully<\/p>\n<p>enter \"set cuda\" to see if the environment variable is set<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38738\" title=\"5dca8c98j00syr9j6001dd000kn00aom\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/5dca8c98j00syr9j6001dd000kn00aom.jpg\" alt=\"5dca8c98j00syr9j6001dd000kn00aom\" width=\"743\" height=\"384\" \/><\/p>\n<p>You can also check to see if the environment variables have been set by doing the following:<\/p>\n<p>Right on my computer<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38739\" title=\"25266232j00syr9j7001hd000u000iom\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/25266232j00syr9j7001hd000u000iom.jpg\" alt=\"25266232j00syr9j7001hd000u000iom\" width=\"1080\" height=\"672\" \/><\/p>\n<p>Click on Environment Variables and see that CUDA has been added to the system variables<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38740\" title=\"56075bf9j00syr9ja00ald000u000gwm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/56075bf9j00syr9ja00ald000u000gwm.jpg\" alt=\"56075bf9j00syr9ja00ald000u000gwm\" width=\"1080\" height=\"608\" \/><\/p>\n<p>II. Installation of cuDNN<\/p>\n<p>CUDA should be used in conjunction with cuDNN.<\/p>\n<p>The version number of cuDNN should be equal to or less than the version number of CUDA<\/p>\n<p>cuDNN URL:<\/p>\n<p>https:\/\/developer.nvidia.com\/rdp\/cudnn-archive#a-collapse897-120<\/p>\n<p>Since we installed CUDA version 12.8, the corresponding cuDNN should be installed with version 8.9.7.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38741\" title=\"9f3205b4j00syr9ja00a1d000u000r4m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/9f3205b4j00syr9ja00a1d000u000r4m.jpg\" alt=\"9f3205b4j00syr9ja00a1d000u000r4m\" width=\"1080\" height=\"976\" \/><\/p>\n<p>After clicking on the link for version 8.9.7, download the first local an zip file.<\/p>\n<p>You need to log in before you can download it, just register with any email address and log in.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38743\" title=\"3dd6c16aj00syr9ja0031d000ps00kom\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/3dd6c16aj00syr9ja0031d000ps00kom.jpg\" alt=\"3dd6c16aj00syr9ja0031d000ps00kom\" width=\"928\" height=\"744\" \/><\/p>\n<p>After downloading and unzipping, you get some files<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38742\" title=\"f2f07a27j00syr9j7000jd000gj006am\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/f2f07a27j00syr9j7000jd000gj006am.jpg\" alt=\"f2f07a27j00syr9j7000jd000gj006am\" width=\"595\" height=\"226\" \/><\/p>\n<p>Copy these files and paste them into the CUDA path you just made, replacing the original files<\/p>\n<p>The default installation path for CUDA is:<\/p>\n<p>C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.8<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38744\" title=\"a446e398j00syr9j9001sd000lm00eum\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/a446e398j00syr9j9001sd000lm00eum.jpg\" alt=\"a446e398j00syr9j9001sd000lm00eum\" width=\"778\" height=\"534\" \/><\/p>\n<p>After the copy is complete, the cuDNN installation is successful.<\/p>\n<p>III. Installing PyTorch<\/p>\n<p>Going back to the PyTorch page just above, notice the two circled parts in the image below, the circled part above means that Python must be 3.9 or later<\/p>\n<p>If you don't have python on your computer, you can install a<\/p>\n<p>python:https:\/\/www.python.org\/<\/p>\n<p>The bottom part is the pytorch installation command, copy it<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38745\" title=\"a47a24a2j00syr9ja004ud000mr00nsm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/a47a24a2j00syr9ja004ud000mr00nsm.jpg\" alt=\"a47a24a2j00syr9ja004ud000mr00nsm\" width=\"819\" height=\"856\" \/><\/p>\n<p>Bring up the command line tool, paste the command you just copied, and hit enter.<\/p>\n<p>pip3 install tooltochvision tochaudio-index-url https:\/\/download.pytorch.org\/whl\/cu128<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38746\" title=\"a7eed619j00syr9j9000wd000u000gvm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/a7eed619j00syr9j9000wd000u000gvm.jpg\" alt=\"a7eed619j00syr9j9000wd000u000gvm\" width=\"1080\" height=\"607\" \/><\/p>\n<p>Wait patiently for the installation to complete<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38747\" title=\"aa2e1dabj00syr9ja0064d000u000gwm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/aa2e1dabj00syr9ja0064d000u000gwm.jpg\" alt=\"aa2e1dabj00syr9ja0064d000u000gwm\" width=\"1080\" height=\"608\" \/><\/p>\n<p>Now that CUDA, cuDNN, and pytorch are installed, it takes a lot less time to run the kontext workflow.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38748\" title=\"834f6269j00syr9j60007d000fg001gm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/834f6269j00syr9j60007d000fg001gm.jpg\" alt=\"834f6269j00syr9j60007d000fg001gm\" width=\"556\" height=\"52\" \/><\/p>\n<p>Four, other advanced settings of the Autumn Leaf starter<\/p>\n<p>In fact, Autumn Leaf Launcher has a lot of useful functions integrated into it, and will use it to bring us a lot of convenience.<\/p>\n<p>Click the following to enter the expert mode: Click the lower left-hand setting &gt; General setting &gt; expert mode<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38749\" title=\"fc773e06j00syr9ja004yd000u000irm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/fc773e06j00syr9ja004yd000u000irm.jpg\" alt=\"fc773e06j00syr9ja004yd000u000irm\" width=\"1080\" height=\"675\" \/><\/p>\n<p>1. Change the default browser<\/p>\n<p>Google Chrome is recommended here because it is the most stable browser, and if you don't have one in your computer, it is recommended to download one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38750\" title=\"36d57a66j00syr9ja004ud000u000irm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/36d57a66j00syr9ja004ud000u000irm.jpg\" alt=\"36d57a66j00syr9ja004ud000u000irm\" width=\"1080\" height=\"675\" \/><\/p>\n<p>2. python path override<\/p>\n<p>Set the path to python in the installation package as shown below<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38751\" title=\"d0ffc91aj00syr9ja005ud000u000irm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/d0ffc91aj00syr9ja005ud000u000irm.jpg\" alt=\"d0ffc91aj00syr9ja005ud000u000irm\" width=\"1080\" height=\"675\" \/><\/p>\n<p>2, check whether to install transformers and huggingface<\/p>\n<p>Go back to the python folder in akiba comfyui and type cmd in the address bar and enter to bring up the command line.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38752\" title=\"a0cc6226j00syr9j9002cd000mk00i9m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/a0cc6226j00syr9j9002cd000mk00i9m.jpg\" alt=\"a0cc6226j00syr9j9002cd000mk00i9m\" width=\"812\" height=\"657\" \/><\/p>\n<p>Enter the command: python.exe -m pip show transformers<\/p>\n<p>This command is used to check if transformers are installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38753\" title=\"4df2524ej00syr9j9002td000u000gwm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/4df2524ej00syr9j9002td000u000gwm.jpg\" alt=\"4df2524ej00syr9j9002td000u000gwm\" width=\"1080\" height=\"608\" \/><\/p>\n<p>I have this one already installed. If yours is not installed, enter the following command to install it:<\/p>\n<p>python.exe -m pip install transformers<\/p>\n<p>Next, check if huggingface is installed by typing the following command<\/p>\n<p>python.exe -m pip show huggingface_hub<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38754\" title=\"1d5e5288j00syr9ja004md000u000gwm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/1d5e5288j00syr9ja004md000u000gwm.jpg\" alt=\"1d5e5288j00syr9ja004md000u000gwm\" width=\"1080\" height=\"608\" \/><\/p>\n<p>I have this one already installed. If yours is not installed, enter the following command to install it:<\/p>\n<p>python.exe -m pip install huggingface_hub<\/p>\n<p>3. Use the same method to set the git path override<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38755\" title=\"a90e9eaaj00syr9ja005ld000u000irm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/a90e9eaaj00syr9ja005ld000u000irm.jpg\" alt=\"a90e9eaaj00syr9ja005ld000u000irm\" width=\"1080\" height=\"675\" \/><\/p>\n<p>4. Setting up a web proxy<\/p>\n<p>Make sure the port number is the same when setting up the web proxy<\/p>\n<p>Then turn on the four switches behind the proxy and turn off the mirroring switch<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38756\" title=\"2d2fe245j00syr9ja004xd000u000irm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/2d2fe245j00syr9ja004xd000u000irm.jpg\" alt=\"2d2fe245j00syr9ja004xd000u000irm\" width=\"1080\" height=\"675\" \/><\/p>\n<p>Final Thoughts<\/p>\n<p>In fact, the GUDA, PyTorch and xformers installation methods we talked about today can be easily done in the Autumn Leaves Integration Pack.<\/p>\n<p>Finds \"Advanced Options-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\u3002<\/p>\n<p>Of course, you'd better make sure which version your computer supports before installing it as I mentioned above.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38757\" title=\"f6921890j00syr9ja005kd000u000ixm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/07\/f6921890j00syr9ja005kd000u000ixm.jpg\" alt=\"f6921890j00syr9ja005kd000u000ixm\" width=\"1080\" height=\"681\" \/><\/p>\n<p>That's all for today, I hope you find it helpful.<\/p>","protected":false},"excerpt":{"rendered":"<p>Someone with a very high computer setup and a good graphic card, but at a very slow pace when you're doing an AI painting, you probably didn't install CUDA and CUDNN. I've just finished my computer, and I've got a new system, and I've got no CUDA, and I've got a slow, slow picture, and I'm gonna need you to install CUDA, CUDNN, and pytorch today, so that we can move the cofyUI. Before it was installed, I ran a map with kontext, which was 285 seconds. I. Installation of CUDA 1 and determination of which version of the computer will be most supported by the CUDA before it is installed<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[491,1989,6276],"collection":[],"class_list":["post-38730","post","type-post","status-publish","format-standard","hentry","category-baike","tag-ai","tag-comfyui"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/38730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=38730"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/38730\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=38730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=38730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=38730"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=38730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}