Skip to content

Commit

Permalink
New start script
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Sep 7, 2024
1 parent 7141e22 commit 78ee896
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
19 changes: 19 additions & 0 deletions attachments/run_nvidia_gpu.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@REM To set proxy, edit and uncomment the two lines below (remove 'rem ' in the beginning of line).
@REM 如需配置代理,编辑下两行命令,并取消注释(移除行首的 'rem ')。
rem set HTTP_PROXY=http://localhost:1081
rem set HTTPS_PROXY=http://localhost:1081

@REM This command will set PATH environment variable.
@REM 该行命令会配置 PATH 环境变量。
set PATH=%PATH%;%~dp0\python_embeded\Scripts\

@REM This command will let the .pyc files to be stored in one place.
@REM 该行命令会使 .pyc 文件集中保存在一处。
set PYTHONPYCACHEPREFIX=.\pycache

@REM If you don't want the browser to open automatically,
@REM add " --disable-auto-launch" (without quotation marks) to the end of the line below.
@REM 如果不想要 ComfyUI 启动后自动打开浏览器,添加" --disable-auto-launch"(不含引号)到下行末尾。
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

pause
10 changes: 4 additions & 6 deletions stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ mkdir update
cp -r ComfyUI/.ci/update_windows/* ./update/
cp -r ComfyUI/.ci/windows_base_files/* ./

# Setup Python embeded, part 3/3
sed -i '1irem .\\python_embeded\\python.exe -s ComfyUI\\main.py --windows-standalone-build --disable-auto-launch' ./run_nvidia_gpu.bat
sed -i '1irem set PYTHONPYCACHEPREFIX=.\\pycache' ./run_nvidia_gpu.bat
sed -i '1irem set HTTPS_PROXY=http://localhost:1081' ./run_nvidia_gpu.bat
sed -i '1irem set HTTP_PROXY=http://localhost:1081' ./run_nvidia_gpu.bat
sed -i '1irem set PATH=%PATH%;C:\\EDIT_THIS_TO_PATH_TO_YOUR_\\python_embeded\\Scripts\\' ./run_nvidia_gpu.bat
# Replace start script file
rm "$workdir"/ComfyUI_Windows_portable/run_nvidia_gpu.bat
cp "$workdir"/attachments/run_nvidia_gpu.bat \
"$workdir"/ComfyUI_Windows_portable/run_nvidia_gpu.bat

du -hd1 "$workdir"

Expand Down

0 comments on commit 78ee896

Please sign in to comment.