How to Install ComfyUI on Windows with AMD GPU using PyTorch DirectML

When I tried to install ComfyUI on my laptop with AMD 6800M GPU, I found that the instructions were not that great. I am sharing my steps to install it.

  • Download and install git from this link
  • Download and install Python version 3.11 or earlier (I use 3.10.6)
  • Open Command Prompt and change directory to where you want to install ComfyUI
  • Type the following to clone ComfyUI
    git clone
  • Change directory to the ComfyUI directory
    cd ComfyUI
  • Type the following to create a virtual environment for ComfyUI
    python -m venv venv
  • Type the following to install PyTorch for directml
    venv\Scripts\pip install torch-directml
  • (Optional) Type the following to upgrade pip
    venv\Scripts\python -m pip install --upgrade pip
  • Type the following to install the required Python modules
    venv\Scripts\pip install -r requirements.txt
  • The installation is done. Just type the following to run ComfyUI
    venv\Scripts\python --directml
  • Open up a brower and visit

This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.


  1. Hi, i have a problem: when i try
    python -m venv venv
    i get an error message
    “Impossibile to execute program ‘python.exe’: not correct function In riga:1 car:1
    + python -m venv venv
    + ~~~~~~~~~~~~~~~~~~~.
    In riga:1 car:1
    + python -m venv venv
    + ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

    Any ideas?

  2. I get this issue when trying to install PyTorch for directml

    ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
    ERROR: No matching distribution found for torch-directml

Leave a Reply