AnyDoor icon indicating copy to clipboard operation
AnyDoor copied to clipboard

Error while running the inference.py file

Open 4yu5h-crtl opened this issue 1 year ago • 1 comments

E:\AnyDoor>python run_inference.py Traceback (most recent call last): File "E:\AnyDoor\run_inference.py", line 4, in import torch ModuleNotFoundError: No module named 'torch'

E:\AnyDoor>pip install torch ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch

[notice] A new release of pip is available: 23.2.1 -> 23.3.2 [notice] To update, run: python.exe -m pip install --upgrade pip

THIS IS WHAT I ENCOUNTERED EVEN AFTER TRYING MULTIPLE TIME.........................PLEASE HELP ME SOLVE THIS ISSUE

4yu5h-crtl avatar Dec 20 '23 19:12 4yu5h-crtl

You need to install pytorch and probably torchvision/torchaudio/plus the CUDA extension

Something like:

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

or use pip instead of pip3. Notice that you might have a different version of CUDA so you'll need to switch it up to match yours (if not cu118).

VioletRaven avatar Dec 21 '23 10:12 VioletRaven