amdgpu-arch.exe contains hardcoded path for python.exe
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
amdgpu-arch.exe finds python.exe and executes successfully
### Actual Behavior
amdgpu-arch.exe throws an error
### Steps to Reproduce
fresh install of ComfyUI 6.0
execute run_amd_gpu.bat
[WARNING] failed to run amdgpu-arch: binary not found.
=> reason: .\python_embeded\Scripts is not in PATH
=> I updated run_amd_gpu.bat and added the next line as first line in the batch file :
SET PATH=%PATH%;C:\Comfy\python_embeded;C:\Comfy\python_embeded\Scripts
execute run_amd_gpu.bat
Now amdgpu-arch.exe is found and executed, but it throws an error:
The system cannot find the file specified.
Fatal error in launcher: Unable to create process using '"D:\a\ComfyUI\python_embeded\python.exe" "C:\Comfy\python_embeded\Scripts\amdgpu-arch.exe" ': The system cannot find the file specified.
[WARNING] amdgpu-arch failed with return code 1
=> reason: .\python_embeded\Scripts\amdgpu-arch.exe contains a hardcoded path for python.exe (D:\a\ComfyUI\python_embeded) which does not exist.
*** attempt 1 ***
ignore the issue and git clone the comfyui manager
=> error persists. This is not a solution.
*** attempt 2 ***
fresh install of ComfyUI 6.0
and then updated run_amd_gpu.bat with: SET PATH=%PATH%;C:\Comfy\python_embeded;C:\Comfy\python_embeded\Scripts
then: hex-edit amdgpu-arch.ex and change "D:\a\ComfyUI\python_embeded\python.exe" to "python.exe " (multiple spaces after "python.exe" so that length of .exe does not change)
execute run_amd_gpu.bat
=> a different error occurs:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Comfy\python_embeded\Scripts\amdgpu-arch.exe\__main__.py", line 2, in
from rocm_sdk_core._cli import amdgpu_arch
ModuleNotFoundError: No module named 'rocm_sdk_core'
[WARNING] amdgpu-arch failed with return code 1
=> this is not a solution
*** attempt 3 ***
fresh install of ComfyUI 6.0
and then updated run_amd_gpu.bat with: SET PATH=%PATH%;C:\Comfy\python_embeded;C:\Comfy\python_embeded\Scripts
then:
- create folder "a" in "D:\"
- as admin, create a symbolic link named "ComfyUI" pointing to C:\Comfy
D:
cd \
md a
cd a
mklink /D ComfyUI C:\Comfy
execute run_amd_gpu.bat
=> this works. No more errors.
*** additional test ***
after the successful run, remove the "D:\a" folder and its symbolic link, and execute run_amd_gpu.bat again
=> run_amd_gpu.bat fails again on amdgpu-arch.exe
=> the amdgpu-arch.exe execution is not a 1-time thing (ex: to find and log what GPU you have), but it is needed at every run
*** Final solution ***
amdgpu-arch.exe should not contain a hardcoded path. It should just use "python.exe" (assuming the PATH is set correctly) or ".\python_embeded\python.exe" (assuming you start from the correct current folder)
### Debug Logs
```powershell
(debug log snippets are included in section above)
```
### Other
my hardware:
CPU : AMD Ryzen 9 7950X (16c/32t)
GPU : AMD Radeon RX 7900 XTX (24 GB VRAM)
System Memory : 64 GB
OS : Windows 11
installed driver : https://www.amd.com/en/resources/support-articles/release-notes/RN-AMDGPU-WINDOWS-PYTORCH-7-1-1.html
Contributor guide
Assessment
This issue has not been assessed yet.