OOTDiffusion icon indicating copy to clipboard operation
OOTDiffusion copied to clipboard

No module named 'torch._custom_ops'

Open jeffreyrobeson opened this issue 1 year ago • 3 comments

(ootd) E:\software\OOTDiffusion\run>python run_ootd.py --model_path E:\software\OOTDiffusion\run\examples\model\model_1.png --cloth_path E:\software\OOTDiffusion\run\examples\garment\02305_00.jpg --scale 2.0 --sample 4 Traceback (most recent call last): File "E:\software\OOTDiffusion\run\run_ootd.py", line 9, in from preprocess.openpose.run_openpose import OpenPose File "E:\software\OOTDiffusion\preprocess\openpose\run_openpose.py", line 20, in from preprocess.openpose.annotator.openpose import OpenposeDetector File "E:\software\OOTDiffusion\preprocess\openpose\annotator\openpose_init_.py", line 15, in from .body import Body File "E:\software\OOTDiffusion\preprocess\openpose\annotator\openpose\body.py", line 14, in from torchvision import transforms File "C:\Users\Administrator\pinokio\bin\miniconda\envs\ootd\lib\site-packages\torchvision_init_.py", line 6, in from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils File "C:\Users\Administrator\pinokio\bin\miniconda\envs\ootd\lib\site-packages\torchvision_meta_registrations.py", line 4, in import torch._custom_ops ModuleNotFoundError: No module named 'torch._custom_ops'

(ootd) E:\software\OOTDiffusion\run>

jeffreyrobeson avatar Feb 22 '24 18:02 jeffreyrobeson

How can I solve this problem?

jeffreyrobeson avatar Feb 22 '24 18:02 jeffreyrobeson

pip uninstall torch pip uninstall torchvision conda clean -a pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia python -c "import torch; print(torch.cuda.is_available())" nvcc --version python -m torch.utils.collect_env

jeffreyrobeson avatar Feb 23 '24 17:02 jeffreyrobeson

The problem has been solved

jeffreyrobeson avatar Feb 23 '24 17:02 jeffreyrobeson

1710729798369 I want to know that “ No module named 'torch._custom_ops' ” this problem,how should be solved

508135669 avatar Mar 18 '24 02:03 508135669

pip uninstall torch pip uninstall torchvision conda clean -a pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia python -c "import torch; print(torch.cuda.is_available())" nvcc --version python -m torch.utils.collect_env

May I ask if cuda=11.6 is OK?

chilljudaoren avatar Mar 19 '24 01:03 chilljudaoren

1710729798369 I want to know that “ No module named 'torch._custom_ops' ” this problem,how should be solved

You can follow the author's method above.

chilljudaoren avatar Mar 19 '24 01:03 chilljudaoren