ComfyUI with DirectML

This guide is recommended if you have an Old AMD Card, Intel Card or Integrated Card and Zluda didn't work for you. DirectML will be slower but it's your last option.

Requirements

Make sure you check the box "Add Python 3.10 to PATH" at the very beginning of the python installer. If you did it, typing python --version on your terminal should return Python 3.10.xx, meaning you're good to go.

  1. Paste this command on your terminal to clone ComfyUI
    git clone https://github.com/Comfy-Org/ComfyUI.git
  2. In the new ComfyUI/ folder (where is requirements.txt), create a run.bat file and paste this script inside of it.
  3. Execute the run.bat; Do it every time you want to use ComfyUI again.
Normal installation
  1. Cloning ComfyUI
    git clone https://github.com/Comfy-Org/ComfyUI.git
  2. Get in ComfyUI folder
    cd ComfyUI
  3. Install Requirements
    pip install -r requirements.txt
    Normally ComfyUI installs the CUDA version of torch, we don't want that, so we will replace it with directml version.
  4. Force install torch-directml;
    pip install torch-directml torchvision torchaudio sqlalchemy --upgrade
    You can skip the next step but it's an essential extension that you will need in the future
  5. Install ComfyUI-Manager extension
    cd custom_nodes
    git clone https://github.com/ltdrdata/ComfyUI-Manager
    cd ..
  6. Run ComfyUI
    python main.py --directml --force-fp16 --lowvram --preview-method auto --use-split-cross-attention --auto-launch

Some ComfyUI Updates or Extension Updates/Installations might replace your DirectML torch (torch-directml) back with the CUDA one (torch) without your consent so ComfyUI will eventually crash. If this happens, you need to repeat step 4 again before running it. That's why this script is so convenient, it's the step 2 of the Quick Installation and you can use it even if you've already followed the whole Normal Installation.

Edit

Pub: 05 Mar 2026 13:32 UTC

Edit: 05 Mar 2026 15:54 UTC

Views: 23