bmaltais / kohya_ss

Apache License 2.0
9.72k stars 1.25k forks source link

Could not load torch: No module named 'torch.amp' #2500

Open Cookie4Free opened 6 months ago

Cookie4Free commented 6 months ago

When launching Kohya_ss GUI, this is the error I get. PyTorch is installed. I tried searching through the internet but couldn't find anything that would solve my problem - or I'm just too dumb to solve it. I would appreciate it if someone could help me out.

14:07:40-688967 INFO     Kohya_ss GUI version: v24.1.4
14:07:41-110714 INFO     Submodule initialized and updated.
14:07:41-112714 INFO     nVidia toolkit detected
14:07:41-839146 ERROR    Could not load torch: No module named 'torch.amp'

(venv) B:\Stable_Diffusion\Kohya\kohya_ss>

Edit: maybe relevant: My OS is Windows 11, Pyton 3.10.11 and Pytorch 2.3 pip is installed

bmaltais commented 6 months ago

Are you using CUDA 11.8? You can't use 12.x

Cookie4Free commented 6 months ago

Are you using CUDA 11.8? You can't use 12.x

I'm using CUDA 11.8. I downloaded everything by the link in the guide here.

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0

NertonSaintfort commented 6 months ago

I'm also getting this issue "ERROR Could not load torch: No module named 'torch'" is what shows up.

delcore50 commented 3 months ago

Any solution? I am getting this same error.

Theowin68 commented 2 months ago

I am getting this same error.

jeanjerome commented 1 month ago

same here 😢 (macOS): ModuleNotFoundError: No module named 'torch'