Open cnhh-cyc opened 5 months ago
same
i have got it 我直接用中文吧, 因为需要安装torch的版本是2.3.0,所以自动给升级装了个2.3.0的cpu版本 需要去\new_ComfyUI_windows_portable\python_embeded\Scripts 下面cmd, 然后用python -m pip show torch或者pip show torch查看 理论是用了python -m是局部python环境,不加的是系统环境。但是我这台不知道怎么回事,反了一下,那就是看哪个命令下出现的torch的location是在new_ComfyUI_windows_portable\python_embeded\下还是系统下 比如可能会出现 Location: 。。。。。\appdata\roaming\python\python310\site-packages 或者 。。。。。new_ComfyUI_windows_portable\python_embeded\Scripts>pip show torch Name: torch Version: 2.3.0 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration Home-page: https://pytorch.org/ Author: PyTorch Team Author-email: packages@pytorch.org License: BSD-3 Location: 。。。。。\new_ComfyUI_windows_portable\python_embeded\Lib\site-packages 显然是下面那个是对的,那就用相应的命令去安装 ( 以此判断到底要不要用python -m python -m pip install torch-2.2.0+cu121-cp310-cp310-win_amd64.whl 或者直接 pip install torch-2.2.0+cu121-cp310-cp310-win_amd64.whl )否则你会装了个寂寞,应该装在局部python环境下结果装到了全局环境下
注意1局部python环境的版本,comfyui应该是3.11,我之前预下载python 3.10的torch,结果显然装不上,报错一次 注意2 必须2.3.0的torch,否则comfyui可以运行,但是动画是生不成的,因为后面依赖的是2.3.0的torch
torch地址在下面:https://pytorch.org/get-started/previous-versions/
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/rocm6.0
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu118
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cpu
before \python_embeded\python.exe -m pip install -r requirements.txt
安装依赖之后 after install requirements.txt
and can't run comfy ui: File "D:.....\new_ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda__init__.py", line 284, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled 彻底打不开comfy ui了,