The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
Go to file
2025-08-05 19:21:20 +03:00
.ci Document what the fast_fp16_accumulation is in the portable. (#8973) 2025-07-20 01:24:09 -04:00
.github Fix issue with line endings github workflow. (#9053) 2025-07-25 17:25:08 -04:00
alembic_db Add support for sqlite database (#8444) 2025-06-11 16:43:39 -04:00
api_server Add Load Image Output node (#6790) 2025-02-18 17:53:01 -05:00
app API for Recently Used Items (#8792) 2025-08-01 22:02:06 -04:00
cfz Update cfz_cudnn.toggle.py 2025-06-19 00:14:37 +03:00
comfy Update zluda.py 2025-08-05 19:21:20 +03:00
comfy_api V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
comfy_api_nodes Add Veo3 video generation node with audio support (#9110) 2025-08-05 01:52:25 -04:00
comfy_config Add new fields to the config types (#8507) 2025-06-18 15:12:29 -04:00
comfy_execution V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
comfy_extras Fix WanFirstLastFrameToVideo node when no clip vision. (#9134) 2025-07-31 23:33:27 -04:00
custom_nodes Delete custom_nodes/cfz_checkpoint_loader.py 2025-05-28 02:13:38 +03:00
input LoadLatent and SaveLatent should behave like the LoadImage and SaveImage. 2023-05-18 00:09:12 -04:00
models Update folder paths: "clip" -> "text_encoders" 2024-11-02 15:35:38 -04:00
output Initial commit. 2023-01-16 22:37:14 -05:00
script_examples Allow the prompt request to specify the prompt ID. (#8189) 2025-07-14 14:48:31 -04:00
tests Add support for partial execution in backend (#9123) 2025-07-30 22:55:28 -04:00
tests-unit Added parameter required_frontend_version in the /system_stats API response (#8875) 2025-07-24 14:05:54 -04:00
utils Add support for sqlite database (#8444) 2025-06-11 16:43:39 -04:00
.gitattributes Add Veo3 video generation node with audio support (#9110) 2025-08-05 01:52:25 -04:00
.gitignore More API Nodes (#7956) 2025-05-06 04:23:00 -04:00
alembic.ini Add support for sqlite database (#8444) 2025-06-11 16:43:39 -04:00
basic-flux-workflow.json Add files via upload 2025-01-07 02:19:30 +03:00
better-flux-workflow.json Add files via upload 2025-01-07 02:19:30 +03:00
cache-clean.bat A little cache cleaning script, because there are quite a lot of them. 2025-08-04 23:01:16 +10:00
cfz_checkpoint_loader.py Add files via upload 2025-05-28 02:14:31 +03:00
CODEOWNERS Remove huchenlei from CODEOWNERS (#8350) 2025-05-30 17:27:52 -04:00
comfyui_version.py ComfyUI version 0.3.49 2025-08-05 07:33:02 -04:00
comfyui-n.bat Update comfyui-n.bat 2025-06-12 16:17:10 +03:00
comfyui.bat update won't need zluda.py to be deleted anymore 2025-06-12 16:16:09 +03:00
comfyui.png Add files via upload 2024-11-21 10:46:38 +03:00
CONTRIBUTING.md Add CONTRIBUTING.md (#3910) 2024-07-01 13:51:00 -04:00
cuda_malloc.py Merge branch 'comfyanonymous:master' into master 2025-07-24 13:59:09 +03:00
deepcache-sample.json Update deepcache-sample.json 2025-02-01 01:59:43 +03:00
execution.py V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
extra_model_paths.yaml.example add 'is_default' to model paths config (#4979) 2024-09-19 08:59:55 -04:00
fix-update.bat Create fix-update.bat 2024-09-14 16:14:34 +03:00
fixforrx580.bat Update fixforrx580.bat 2025-07-10 23:54:16 +03:00
fluxguide.md Update fluxguide.md 2025-01-07 14:02:01 +03:00
folder_paths.py LoRA Trainer: LoRA training node in weight adapter scheme (#8446) 2025-06-13 19:25:59 -04:00
hook_breaker_ac10a0.py Prevent custom nodes from hooking certain functions. (#7825) 2025-04-26 20:52:56 -04:00
install-for-older-amd.bat Update install-for-older-amd.bat 2025-07-10 23:52:54 +03:00
install-n.bat added torch patches for triton from https://github.com/sfinktah/amd-torch) 2025-08-04 10:48:27 +03:00
install.bat Update install.bat 2025-07-10 23:50:37 +03:00
latent_preview.py Convert latents_ubyte to 8-bit unsigned int before converting to CPU (#6300) 2025-01-28 08:22:54 -05:00
LICENSE Initial commit. 2023-01-16 22:37:14 -05:00
main.py ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
new_updater.py Replace print with logging (#6138) 2024-12-20 16:24:55 -05:00
node_helpers.py Add append feature to conditioning_set_values (#8239) 2025-05-22 08:11:13 -04:00
nodes.py Initial support for qwen image model. (#9179) 2025-08-04 22:53:25 -04:00
patchzluda2.bat Update patchzluda2.bat 2025-05-31 16:56:39 +03:00
patchzluda-n.bat Update patchzluda-n.bat 2025-06-05 00:26:50 +03:00
patchzluda.bat Update patchzluda.bat 2025-07-10 23:48:08 +03:00
protocol.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00
pyproject.toml ComfyUI version 0.3.49 2025-08-05 07:33:02 -04:00
pytest.ini Execution Model Inversion (#2666) 2024-08-15 11:21:11 -04:00
README.md Update README.md 2025-08-05 19:17:12 +03:00
requirements.txt Update template to 0.1.51 (#9187) 2025-08-05 07:24:12 -04:00
server.py V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
start-tunableop-novram.bat Update start-tunableop-novram.bat 2024-08-30 16:07:10 +03:00
testzluda.py Add files via upload 2025-02-15 17:14:13 +03:00
update.bat Create update.bat 2025-06-12 16:22:29 +03:00

ComfyUI-ZLUDA

Windows-only version of ComfyUI which uses ZLUDA to get better performance with AMD GPUs.

Table of Contents

*** FOR THOSE THAT ARE GETTING TROJAN DETECTIONS IN NCCL.DLL IN ZLUDA FOLDER, in dev's words : " nccl.dll is a dummy file, it does nothing. when one of its functions is called, it will just return "not supported" status. nccl.dll, cufftw.dll are dummy. they are introduced only for compatibility (to run applications that reject to start without them, but rarely or never use them).zluda.exe hijacks windows api and injects some dlls. its behavior can be considered as malicious by some antiviruses, but it does not hurt the user. The antiviruses, including windows defender on my computer, didn't detect them as malicious when I made nightly build. but somehow the nightly build is now detected as virus on my end too. " SO IGNORE THE WARNING AND MAYBE EXCLUDE THE ZLUDA FOLDER FROM DEFENDER.

*** QUICK INSTALL INSTRUCTIONS : "https://github.com/patientx/ComfyUI-Zluda/issues/188"

What's New?

  • Python libs are copied automatically now, so triton compilation errors should be gone on startup. Also triton and torch patches are applied on install thanks to https://github.com/sfinktah
  • Updated included zluda version for the new install method to 3.9.5 nightly aka latest version available. You MUST use latest amd gpu drivers with this setup otherwise there would be problems later, (drivers >= 25.5.1) """ WIPE THE CACHES , READ ON TROUBLESHOOTING BELOW """ I recommend using "patchzluda-n.bat" to install it , it uninstalls torch's and reinstalls and patches them with new zluda.ALSO you need to uninstall hip 6.2.4 completely, delete the folder , and reinstall it and again download and unzip the NEW Hip addon (this is not the same as the one I shared before , this is new for 3.9.5) for this 3.9.5 version (hopefully this won't happen that much) new hip addon for zluda 3.9.5 : (https://drive.google.com/file/d/1Gvg3hxNEj2Vsd2nQgwadrUEY6dYXy0H9/view?usp=sharing)
  • Florance2 is now fixed , (probably some other nodes too) you need to disable "do_sample" meaning change it from True to False, now it would work without needing to edit it's node.
  • To use any zluda you want (to use with HIP versions you want to use such as 6.1 - 6.2) After installing, close the app, run patchzluda2.bat. It will ask for url of the zluda build you want to use. You can choose from them here, lshyqqtiger's ZLUDA Fork then you can use patchzluda2.bat, run it paste the link via right click (A correct link would be like this, https://github.com/lshqqytiger/ZLUDA/releases/download/rel.d60bddbc870827566b3d2d417e00e1d2d8acc026/ZLUDA-windows-rocm6-amd64.zip) After pasting press enter and it would patch that zluda into comfy for you.

Important

📢 REGARDING KEEPING THE APP UP TO DATE

Avoid using the update function from the manager, instead use git pull, which we are doing on every start if start.bat is used. (App Already Does It Every Time You Open It, If You Are Using comfyui.bat, So This Way It Is Always Up To Date With Whatever Is On My GitHub Page)

Only use comfy manager to update the extensions (Manager -> Custom Nodes Manager -> Set Filter To Installed -> Click Check Update On The Bottom Of The Window) otherwise it breaks the basic installation, and in that case run install.bat once again.

📢 REGARDING RX 480-580 AND SIMILAR OLDER GPUS

Please use the "install-for-older-amd.bat" instead of "install.bat" or "install-n.bat" if you want to be able to use comfyui with zluda.

Dependencies

  • Do everything one by one, do not skip. *
  1. Git: Download from https://git-scm.com/download/win. During installation don't forget to check the box for "Use Git from the Windows Command line and also from 3rd-party-software" to add Git to your system's PATH.

  2. Python (3.11.9) version "3.11" . Install the latest release from python.org. Please don't use windows store version. If you have that installed, uninstall and please install from python.org. During installation remember to check the box for "Add Python to PATH when you are at the "Customize Python" screen.

  3. Visual C++ Runtime: Download vc_redist.x64.exe and install it.

  4. Install HIP SDK 5.7.1 from HERE the correct version, "Windows 10 & 11 5.7.1 HIP SDK"

    *** (*** this app installs zluda for 5.7.1 by default, if you want to use 6.1 or 6.2 you have to get the latest zluda link from lshyqqtiger's ZLUDA Fork then you can use patchzluda2.bat, run it paste the link via right click (a correct link would be like this, https://github.com/lshqqytiger/ZLUDA/releases/download/rel.d60bddbc870827566b3d2d417e00e1d2d8acc026/ZLUDA-windows-rocm6-amd64.zip press enter and it would patch that zluda into comfy for you. Of course this also would mean you have to change the variables below from "5.7" to "6.x" where needed) ***

  5. Add the system variable HIP_PATH, value: C:\Program Files\AMD\ROCm\5.7\ (This is the default folder with default 5.7.1 installed, if you have installed it on another drive, change if necessary, if you have installed 6.2.4, or other newer versions the numbers should reflect that.)

    1. Check the variables on the lower part (System Variables), there should be a variable called: HIP_PATH.
    2. Also check the variables on the lower part (System Variables), there should be a variable called: "Path". Double-click it and click "New" add this: C:\Program Files\AMD\ROCm\5.7\bin (This is the default folder with default 5.7.1 installed, if you have installed it on another drive, change if necessary, if you have installed 6.2.4, or other newer versions the numbers should reflect that.)

    ((( these should be HIP_PATH, value: C:\Program Files\AMD\ROCm\6.2\ and Path variable C:\Program Files\AMD\ROCm\6.2\bin )))

    5.1 *** YOU MUST DO THIS ADDITIONAL STEPS : if you want to try miopen-triton with high end gpu : aka plan to use install-n.bat ***

  6. If you have an AMD GPU below 6800 (6700,6600 etc.), download the recommended library files for your gpu

    • !!! NOTE !!! : Besides those older gpu's the newest gfx1200 and gfx1201 aka 9070 - 9070xt STILL requires libraries because amd didn't add support for them in the 6.2.4 . In the future they %100 would but using 6.2.4 those gpu's also need libraries - from likelovewant libs. Those gpu's only have libraries for HIP 6.2.4, so you have to install HIP 6.2.4 and get the libraries from the likelovewant repository below for your gpu's. At this moment though, this newest GPU's have very poor performance with zluda even if you set them up with libraries etc ... Keep this in mind.
  • from Brknsoul Repository (for hip 5.7.1)

  • from likelovewant Repository (for hip 6.2.4)

    1. Go to folder "C:\Program Files\AMD\ROCm\5.7\bin\rocblas", (or 6.2 if you have installed that) there would be a "library" folder, backup the files inside to somewhere else.
    2. Open your downloaded optimized library archive and put them inside the library folder (overwriting if necessary): "C:\Program Files\AMD\ROCm\5.7\bin\rocblas\library" (or 6.2 if you have installed that)
      • There could be a rocblas.dll file in the archive as well, if it is present then copy it inside "C:\Program Files\AMD\ROCm\5.7\bin\rocblas" (or 6.2 if you have installed that)
  1. Reboot your system.

Setup (Windows-Only)

Open a cmd prompt. (Powershell doesn't work, you have to use command prompt.)

git clone https://github.com/patientx/ComfyUI-Zluda
cd ComfyUI-Zluda
install.bat

((( use install-n.bat if you want to install for miopen-triton combo for high end gpu's )))

to start for later use (or create a shortcut to) :

comfyui.bat

((( use comfyui-n.bat if you want to use miopen-triton combo for high end gpu's, that basically changes the attention to pytorch attention which works with flash attention )))

--- To use sage-attention , you have to change the "--use-pytorch-cross-attention" to "--use-sage-attention". My advice is make a seperate batch file for all different attention types instead of changing them.
--- You can use "--use-pytorch-cross-attention", "--use-quad-cross-attention" , "--use-flash-attention" and "--use-sage-attention" . Also you can activate flash or sage with the help some nodes from pytorch attention.

also for later when you need to repatch zluda (maybe a torch update etc.) you can use:

patchzluda.bat

((( patchzluda-n.bat for miopen-triton setup)))

  • The first generation would take around 10-15 minutes, there won't be any progress or indicator on the webui or cmd window, just wait. Zluda creates a database for use with generation with your gpu.

Note

This might happen with torch changes , zluda version changes and / or gpu driver changes.

Troubleshooting

  • Use update.bat if comfyui.bat or comfyui-n.bat can't update. (as when they are the files that needs to be updated, so delete them, run update.bat) When you run your comfyui(-n).bat afterwards, it now copies correct zluda and uses that.
  • WIPING CACHES FOR A CLEAN REINSTALL :: There are three caches to delete if you want to start anew -it is recommended if you want a painless zluda experience : 1-) "C:\Users\yourusername\AppData\Local\ZLUDA\ComputeCache" 2-) "C:\ Users \ yourusername \ .miopen" 3-) "C:\ Users \ yourusername \ .triton" , delete everything in these three directories, zluda and miopen and triton will do everything from the start again but it would be less painful for the future.
  • Problems with triton , try this : Remove visual studio 2022 (if you have already installed it and getting errors) and install "https://aka.ms/vs/17/release/vs_BuildTools.exe" , and then use "Developer Command Prompt" to run comfyui. This option shouldn't be needed for many but nevertheless try.
  • CUDA device detected: None , if seeing this error with the new install-n , make sure you are NOT using the amd driver 25.5.1 . Use a previous driver, it has problems with zluda.
  • RuntimeError: CUDNN_BACKEND_OPERATIONGRAPH_DESCRIPTOR: cudnnFinalize FailedmiopenStatusInternalError cudnn_status: miopenStatusUnknownError , if this is encountered at the end, while vae-decoding, use tiled-vae decoding either from official comfy nodes or from Tiled-Diffussion (my preference). Also vae-decoding is overall better with tiled-vae decoding.
  • DO NOT use non-english characters as folder names to put comfyui-zluda under.
  • Wipe your pip cache "C:\Users\USERNAME\AppData\Local\pip\cache" You can also do this when venv is active with : pip cache purge
  • xformers isn't usable with zluda so any nodes / packages that require it doesn't work. Flash attention doesn't work.
  • Have the latest drivers installed for your amd gpu. Also, Remove Any Nvidia Drivers you might have from previous nvidia gpu's.
  • If for some reason you can't solve with these and want to start from zero, delete "venv" folder and re-run install.bat
  • If you can't git pull to the latest version, run these commands, git fetch --all and then git reset --hard origin/master now you can git pull
  • Problems with caffe2_nvrtc.dll: if you are sure you properly installed hip and can see it on path, please DON'T use python from windows store, use the link provided or 3.11 from the official website. After uninstalling python from windows store and installing the one from the website, be sure the delete venv folder, and run install.bat once again.
  • rocBLAS-error: If you have an integrated GPU by AMD (e.g. AMD Radeon(TM) Graphics) you need to add HIP_VISIBLE_DEVICES=1 to your environment variables. Other possible variables to use : ROCR_VISIBLE_DEVICES=1 HCC_AMDGPU_TARGET=1 . This basically tells it to use 1st gpu -this number could be different if you have multiple gpu's- otherwise it will default to using your iGPU, which will most likely not work. This behavior is caused by a bug in the ROCm-driver.
  • Lots of other problems were encountered and solved by users so check the issues if you can't find your problem here.

Examples

  • There are some example workflows in cfz folder.
  • Flux Guide HERE

Credits