Open mykcs opened 6 months ago
import cv2.cv2 as cv
评价:没见过这种写法,感觉好怪 改为
import cv2 as cv
❯ python inference.py --style=style3 --input_image=./data/test_inputs/002.png --alpha=0.8
Traceback (most recent call last):
File "/Users/myk/Repo/DoesFS-0430/inference.py", line 38, in <module>
generator = DeformAwareGenerator(1024, 512, 8, 2, resolutions=tps_swap_resolutions,
File "/Users/myk/anaconda3/envs/env-DoesFS/lib/python3.9/site-packages/torch/nn/modules/module.py", line 989, in to
return self._apply(convert)
File "/Users/myk/anaconda3/envs/env-DoesFS/lib/python3.9/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/Users/myk/anaconda3/envs/env-DoesFS/lib/python3.9/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/Users/myk/anaconda3/envs/env-DoesFS/lib/python3.9/site-packages/torch/nn/modules/module.py", line 664, in _apply
param_applied = fn(param)
File "/Users/myk/anaconda3/envs/env-DoesFS/lib/python3.9/site-packages/torch/nn/modules/module.py", line 987, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
File "/Users/myk/anaconda3/envs/env-DoesFS/lib/python3.9/site-packages/torch/cuda/__init__.py", line 221, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
好吧,我是macbook,也没有cuda 学一学怎么用google colab,再回来吧