*last update 2025-04-25: 更新一行指令。
趁還記得的時候紀錄一下是怎麼做的。
換卡後,ComfyUI跑工作流會出現這樣的錯誤訊息:
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
不要管他,個人之前還在用這個訊息跟Grok3在那邊浪費了好多時間。雖然不知道有沒有作用,個人是先去CUDA官網抓了CUDA12.8來裝。
打開ComfyUI目錄下的.venv\Scripts目錄,目錄內直接右鍵「在終端中開啟」打開Power shell。

進去後先執行「./pip3 list」,"./"一定要,這表示用目前目錄的執行檔執行。
確認庫裡torch、torchvision、torchaudio的版本,torch不是 2.7以上、CU不是12.8就要刪掉重裝。
這是裝完後的樣子:

把torch、torchvision、torchaudio反安裝:
「./pip3 uninstall torch torchaudio torchvision -y」
然後安裝支援CUDA12.8版本的torch、torchvision、torchaudio:
*2.7正式支援50系顯卡,更新這行。
中間如果有出問題,就把torch、torchvision、torchaudio反安裝,安裝的流程再跑一遍。
或是先單獨反安裝torch:
「./pip3 uninstall torch」
再反安裝其他的。
「./pip3 uninstall torchaudio torchvision」
還有另外一個小東西要注意一下:

如果有裝nunchaku,記得torch更新後的版本,nunchaku也要安裝對應的輪子。
至於其他特製節點的依賴環境...
等碰到問題再說吧...????
P.S. 有裝triton-windows的話,triton-windows也要一併更新上去。