What to do when comfyui AI painting is too slow?GUDA+cuDNN+pytorch installation to make your comfyUI take off!

Some people's computers are clearly well configured and have good graphics cards, but when they doAI ArtWhen it's slow, it's probably because you don't have CUDA and cuDNN installed.

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.

43d674f1j00syr9ja0076d000u000irm

Before I installed it, I ran a graph with kontext and it came in at 285 seconds.

be062c4bj00syr9j60003d0009u0010m

I. Installing CUDA

1, in the installation of the first to determine which version of your computer to install the highest CUDA support

First open the NVIDIA control panel on your computer

e862d103j00syr9j8002gd000fm007xm

Click System Information -> Components in the lower left corner of the NVIDIA control panel

ba1380a7j00syr9ja002md000qo00jrm

Finding NVCGDA64.DLL means that our computer supports the installation of CUDA

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.

2. Determine the version number of CUDA according to python

Open PyTorch's webpage (https://pytorch.org) and scroll down to see the python version selection

Since our CUDA supports up to 12.9.90, we have a choice of 11.8, 12.6 and 12.8 versions of CUDA.

Here we choose version 12.8.

6544bd29j00syr9j90031d000qq00hjm

3. Download CUDA

Once you have determined the version of CUDA, go to the CUDA download page and select the correct version to download:

Website:

https://developer.nvidia.com/cuda-toolkit-archive

6e9b11bej00syr9ja00gdd000u000r4m

3. Installation of CUDA

Download and install

Since I already have Visual Studio installed, I didn't check it here.

Click Next and default all the way to the end of the installation.

12d51b26j00syr9j80031d000gi00ccm

Once installed, check if the installation was successful

Win+r to open the Run window, type "cmd" to open the command line window.

Input "nvcc -version", you can check the CUDA version number, the current version number is V12.8.61, that means CUDA installation is successful.

Then type "set cuda" to see if the environment variable is set.

5dca8c98j00syr9j6001dd000kn00aom

You can also check to see if the environment variables have been set by doing the following:

Right click on my computer -> Properties -> Advanced System Settings

25266232j00syr9j7001hd000u000iom

Click on Environment Variables and see that CUDA has been added to the system variables

56075bf9j00syr9ja00ald000u000gwm

II. Installation of cuDNN

CUDA should be used in conjunction with cuDNN.

The version number of cuDNN should be equal to or less than the version number of CUDA

cuDNN URL:

https://developer.nvidia.com/rdp/cudnn-archive#a-collapse897-120

Since we installed CUDA version 12.8, the corresponding cuDNN should be installed with version 8.9.7.

9f3205b4j00syr9ja00a1d000u000r4m

After clicking on the link for version 8.9.7, download the first local an zip file.

You need to log in before you can download it, just register with any email address and log in.

3dd6c16aj00syr9ja0031d000ps00kom

After downloading and unzipping, you get some files

f2f07a27j00syr9j7000jd000gj006am

Copy these files and paste them into the CUDA path you just made, replacing the original files

The default installation path for CUDA is:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8

a446e398j00syr9j9001sd000lm00eum

After the copy is complete, the cuDNN installation is successful.

III. Installing PyTorch

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

If you don't have python on your computer, you can install a

python:https://www.python.org/

The bottom part is the pytorch installation command, copy it

a47a24a2j00syr9ja004ud000mr00nsm

Bring up the command line tool, paste the command you just copied, and hit enter.

pip3 install torch torchvision torchaudio -index-url https://download.pytorch.org/whl/cu128

a7eed619j00syr9j9000wd000u000gvm

Wait patiently for the installation to complete

aa2e1dabj00syr9ja0064d000u000gwm

Now that CUDA, cuDNN, and pytorch are installed, it takes a lot less time to run the kontext workflow.

834f6269j00syr9j60007d000fg001gm

Four, other advanced settings of the Autumn Leaf starter

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.

Enter the expert mode according to the following figure: Click on the lower left corner Settings->General Settings->Expert Mode

fc773e06j00syr9ja004yd000u000irm

1. Change the default browser

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.

36d57a66j00syr9ja004ud000u000irm

2. python path override

Set the path to python in the installation package as shown below

d0ffc91aj00syr9ja005ud000u000irm

2, check whether to install transformers and huggingface

Go back to the python folder in akiba comfyui and type cmd in the address bar and enter to bring up the command line.

a0cc6226j00syr9j9002cd000mk00i9m

Enter the command: python.exe -m pip show transformers

This command is used to check if transformers are installed.

4df2524ej00syr9j9002td000u000gwm

I have this one already installed. If yours is not installed, enter the following command to install it:

python.exe -m pip install transformers

Next, check if huggingface is installed by typing the following command

python.exe -m pip show huggingface_hub

1d5e5288j00syr9ja004md000u000gwm

I have this one already installed. If yours is not installed, enter the following command to install it:

python.exe -m pip install huggingface_hub

3. Use the same method to set the git path override

a90e9eaaj00syr9ja005ld000u000irm

4. Setting up a web proxy

Make sure the port number is the same when setting up the web proxy

Then turn on the four switches behind the proxy and turn off the mirroring switch

2d2fe245j00syr9ja004xd000u000irm

Final Thoughts

In fact, the GUDA, PyTorch and xformers installation methods we talked about today can be easily done in the Autumn Leaves Integration Pack.

Find "Advanced Options -> Environment Dimension -> Install PyTorch" in the Autumn Leaves Integration Pack, and just click on the desired version for a no-brainer installation.

Of course, you'd better make sure which version your computer supports before installing it as I mentioned above.

f6921890j00syr9ja005kd000u000ixm

That's all for today, I hope you find it helpful.

statement:The content of the source of public various media platforms, if the inclusion of the content violates your rights and interests, please contact the mailbox, this site will be the first time to deal with.
TutorialEncyclopedia

Use AI to make a free video of a beautiful woman dancing, AI beautiful woman dancing short video play details

2025-7-6 9:09:20

TutorialEncyclopedia

Easy to play with AI video production: super practical AI video skills, break through the video length limitations

2025-7-7 9:16:54

Zenium
Search