From cfb3eecdc3c7f5b7dabad0b42c1437de20e0cf24 Mon Sep 17 00:00:00 2001 From: Rando717 <228354122+Rando717@users.noreply.github.com> Date: Thu, 2 Oct 2025 00:22:02 +0200 Subject: [PATCH] Update comfyui-n.bat, print hip PATH(s) prints "HIP_PATH" at the very top, and all defined "HIP_PATH_xx" paths optional print under Build Tools with check for MSVC in PATH, assuming default path: \\Microsoft Visual Studio\\BuildTools\VC\Tools\MSVC\\bin\Hostx64\x64 --- comfyui-n.bat | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/comfyui-n.bat b/comfyui-n.bat index 3bb7ac260..4d64c000d 100644 --- a/comfyui-n.bat +++ b/comfyui-n.bat @@ -19,6 +19,29 @@ set "COMMANDLINE_ARGS=--auto-launch --use-quad-cross-attention --reserve-vram 0. set "ZLUDA_COMGR_LOG_LEVEL=1" +:: echo Checking HIP environment variables... +if defined HIP_PATH ( + echo HIP_PATH = %HIP_PATH% +) else ( + echo HIP_PATH = Not set +) +if defined HIP_PATH_57 ( + echo HIP_PATH_57 = %HIP_PATH_57% +) +if defined HIP_PATH_61 ( + echo HIP_PATH_61 = %HIP_PATH_61% +) +if defined HIP_PATH_62 ( + echo HIP_PATH_62 = %HIP_PATH_62% +) +if defined HIP_PATH_64 ( + echo HIP_PATH_64 = %HIP_PATH_64% +) +if defined HIP_PATH_70 ( + echo HIP_PATH_70 = %HIP_PATH_70% +) +echo. + :: Check for Build Tools via vswhere.exe (assuming default path) setlocal enabledelayedexpansion set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" @@ -36,6 +59,35 @@ if defined VSVer ( ) endlocal +:: Check for MSVC Tools inside PATH (assuming default path) +setlocal enabledelayedexpansion +set "msvc_suffix=\BuildTools\VC\Tools\MSVC\" +set "msvc_prefix=\bin\Hostx64\x64" +set "msvc_vs_ver=2015 2017 2019 2022 2026" +set "drives=C D E F G" +for %%D in (%drives%) do ( + set "pf1=%%D:\Program Files" + set "pf2=%%D:\Program Files (x86)" + for %%P in ("!pf1!" "!pf2!") do ( + for %%V in (%msvc_vs_ver%) do ( + set "vs_path=%%~P\Microsoft Visual Studio\%%V" + set "full_prefix=!vs_path!!msvc_suffix!" + echo !PATH! | find /I "!full_prefix!" >nul + if errorlevel 1 ( + rem pass + ) else ( + echo !PATH! | find /I "!msvc_prefix!" >nul + if errorlevel 1 ( + echo [INFO] No MSVC Tools found in PATH. + ) else ( + echo [INFO] MSVC Tools for Visual Studio %%V found in PATH. + ) + ) + ) + ) +) +endlocal + :: Check Git version where git >NUL 2>&1 if errorlevel 1 ( @@ -101,6 +153,7 @@ if NOT "%LOCAL%"=="%REMOTE%" ( echo [INFO] Already up to date. ) copy comfy\customzluda\zluda.py comfy\zluda.py /y >NUL +echo. :: Get AMD Software version via registry (stop on first match) setlocal enabledelayedexpansion