How to set startup proxy parameters for the desktop version of comfyui

When using ComfyUI_windows_portable, I edit the run_nvidia_gpu.bat file to add proxy parameters and listen params. However, when using the desktop version, I don’t know how to set it up anymore.

  1. try use TUN mode if you’re using Clash-like proxies.
  2. try check :white_check_mark:System Proxy in your proxy software (and restart ComfyUI)
  3. try System Settings > Network & Internet > Proxy (and restart ComfyUI)

  1. try put this launch command into your .bat file just below the “set http_proxy=…”, which will launch your comfyui desktop version
start "comfyui" "%LOCALAPPDATA%\Programs\@comfyorgcomfyui-electron\ComfyUI.exe"

Thx for the suggestion.

I tried the 4th method.

:: file name: run_comfyui_desktop.bat

set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080
set no_proxy=localhost,127.0.0.1

start "comfyui" "%LOCALAPPDATA%\Programs\@comfyorgcomfyui-electron\ComfyUI.exe"
pause

And it worked sometimes, but sometimes not work. And it reported some error and I have no idea how to fix it.


And nother problem is that when I click restart in the ComfyUI Manager Menu, the proxy parameters do not work. I have to close the comgyui window and double-click to open the run_comfyui_desktop.bat file again.

When I used the run_nvidia_gpu.bat file with the proxy arg, it worked good without any error.
The first three methods will make the entire system use the proxy and I can not do in that way for some reasons. Therefore, I only edit the run_nvidia_gpu.bat file, add the proxy parameter, and only need comfyui to use the proxy.

Does it work now? Those errors seem unrelated to the proxy.