File size: 943 Bytes
7f15321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@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