@echo off setlocal if "%~1"=="" ( echo Drag and drop one or more INT8 .safetensors files onto this .bat to patch them. echo The patched copy will be saved next to each input with "_fixed" before the extension. pause exit /b 0 ) set "PYTHON_EXE=F:\Nunchaku\ComfyUI-Easy-Install\ComfyUI-Easy-Install\python_embeded\python.exe" set "SCRIPT=%~dp0patch_int8_add_format.py" if not exist "%PYTHON_EXE%" ( echo Could not find Python at: echo %PYTHON_EXE% echo Edit this .bat and update PYTHON_EXE to your ComfyUI's python_embeded\python.exe path. pause exit /b 1 ) if not exist "%SCRIPT%" ( echo Could not find patch_int8_add_format.py next to this .bat. echo Expected at: %SCRIPT% pause exit /b 1 ) :loop if "%~1"=="" goto done echo. echo === Patching: %~1 === "%PYTHON_EXE%" "%SCRIPT%" "%~1" shift goto loop :done echo. echo All done. pause endlocal