Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
c6720009
Commit
c6720009
authored
Mar 13, 2023
by
comfyanonymous
Browse files
Add github workflow for a build with pytorch nightly.
parent
83f23f82
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
156 additions
and
0 deletions
+156
-0
.ci/nightly/update_windows/update.py
.ci/nightly/update_windows/update.py
+65
-0
.ci/nightly/update_windows/update_all.bat
.ci/nightly/update_windows/update_all.bat
+3
-0
.ci/nightly/update_windows/update_comfyui_only.bat
.ci/nightly/update_windows/update_comfyui_only.bat
+2
-0
.ci/nightly/windows_base_files/README_VERY_IMPORTANT.txt
.ci/nightly/windows_base_files/README_VERY_IMPORTANT.txt
+22
-0
.ci/nightly/windows_base_files/run_cpu.bat
.ci/nightly/windows_base_files/run_cpu.bat
+2
-0
.ci/nightly/windows_base_files/run_nvidia_gpu.bat
.ci/nightly/windows_base_files/run_nvidia_gpu.bat
+2
-0
.ci/setup_windows_zip_nightly_pytorch.ps1
.ci/setup_windows_zip_nightly_pytorch.ps1
+26
-0
.github/workflows/windows_release_nightly_pytorch.yml
.github/workflows/windows_release_nightly_pytorch.yml
+34
-0
No files found.
.ci/nightly/update_windows/update.py
0 → 100755
View file @
c6720009
import
pygit2
from
datetime
import
datetime
import
sys
def
pull
(
repo
,
remote_name
=
'origin'
,
branch
=
'master'
):
for
remote
in
repo
.
remotes
:
if
remote
.
name
==
remote_name
:
remote
.
fetch
()
remote_master_id
=
repo
.
lookup_reference
(
'refs/remotes/origin/%s'
%
(
branch
)).
target
merge_result
,
_
=
repo
.
merge_analysis
(
remote_master_id
)
# Up to date, do nothing
if
merge_result
&
pygit2
.
GIT_MERGE_ANALYSIS_UP_TO_DATE
:
return
# We can just fastforward
elif
merge_result
&
pygit2
.
GIT_MERGE_ANALYSIS_FASTFORWARD
:
repo
.
checkout_tree
(
repo
.
get
(
remote_master_id
))
try
:
master_ref
=
repo
.
lookup_reference
(
'refs/heads/%s'
%
(
branch
))
master_ref
.
set_target
(
remote_master_id
)
except
KeyError
:
repo
.
create_branch
(
branch
,
repo
.
get
(
remote_master_id
))
repo
.
head
.
set_target
(
remote_master_id
)
elif
merge_result
&
pygit2
.
GIT_MERGE_ANALYSIS_NORMAL
:
repo
.
merge
(
remote_master_id
)
if
repo
.
index
.
conflicts
is
not
None
:
for
conflict
in
repo
.
index
.
conflicts
:
print
(
'Conflicts found in:'
,
conflict
[
0
].
path
)
raise
AssertionError
(
'Conflicts, ahhhhh!!'
)
user
=
repo
.
default_signature
tree
=
repo
.
index
.
write_tree
()
commit
=
repo
.
create_commit
(
'HEAD'
,
user
,
user
,
'Merge!'
,
tree
,
[
repo
.
head
.
target
,
remote_master_id
])
# We need to do this or git CLI will think we are still merging.
repo
.
state_cleanup
()
else
:
raise
AssertionError
(
'Unknown merge analysis result'
)
repo
=
pygit2
.
Repository
(
str
(
sys
.
argv
[
1
]))
ident
=
pygit2
.
Signature
(
'comfyui'
,
'comfy@ui'
)
try
:
print
(
"stashing current changes"
)
repo
.
stash
(
ident
)
except
KeyError
:
print
(
"nothing to stash"
)
backup_branch_name
=
'backup_branch_{}'
.
format
(
datetime
.
today
().
strftime
(
'%Y-%m-%d_%H_%M_%S'
))
print
(
"creating backup branch: {}"
.
format
(
backup_branch_name
))
repo
.
branches
.
local
.
create
(
backup_branch_name
,
repo
.
head
.
peel
())
print
(
"checking out master branch"
)
branch
=
repo
.
lookup_branch
(
'master'
)
ref
=
repo
.
lookup_reference
(
branch
.
name
)
repo
.
checkout
(
ref
)
print
(
"pulling latest changes"
)
pull
(
repo
)
print
(
"Done!"
)
.ci/nightly/update_windows/update_all.bat
0 → 100755
View file @
c6720009
..\python_embeded\python.exe .\update.py ..\ComfyUI\
..\python_embeded\python.exe
-s -m
pip
install
--upgrade --pre
torch
torchvision
torchaudio
--extra-index-url
https
://download.pytorch.org/whl/cu118
-r
../ComfyUI/requirements.txt
pygit2
pause
.ci/nightly/update_windows/update_comfyui_only.bat
0 → 100755
View file @
c6720009
..\python_embeded\python.exe .\update.py ..\ComfyUI\
pause
.ci/nightly/windows_base_files/README_VERY_IMPORTANT.txt
0 → 100755
View file @
c6720009
HOW TO RUN:
if you have a NVIDIA gpu:
run_nvidia_gpu.bat
To run it in slow CPU mode:
run_cpu.bat
IF YOU GET A RED ERROR IN THE UI MAKE SURE YOU HAVE A MODEL/CHECKPOINT IN: ComfyUI\models\checkpoints
You can download the stable diffusion 1.5 one from: https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt
To update only the ComfyUI code: update\update_comfyui_only.bat
To update ComfyUI with the python dependencies: update\update_all.bat
.ci/nightly/windows_base_files/run_cpu.bat
0 → 100755
View file @
c6720009
.\python_embeded\python.exe
-s
ComfyUI
\main.py
--cpu --windows-standalone-build
pause
.ci/nightly/windows_base_files/run_nvidia_gpu.bat
0 → 100755
View file @
c6720009
.\python_embeded\python.exe
-s
ComfyUI
\main.py
--windows-standalone-build --use-pytorch-cross-attention
pause
.ci/setup_windows_zip_nightly_pytorch.ps1
0 → 100755
View file @
c6720009
Invoke-WebRequest
-URI
https://www.python.org/ftp/python/3.10.9/python-3.10.9-embed-amd64.zip
-O
python_embeded.zip
Expand-Archive
python_embeded.zip
rm
python_embeded.zip
cd
python_embeded
Add-Content
-Path
.
\python310._pth
-Value
'import site'
Invoke-WebRequest
-Uri
https://bootstrap.pypa.io/get-pip.py
-OutFile
get-pip.py
.
\python.exe
get-pip.py
.
\python.exe
-s
-m
pip
install
torch
torchvision
torchaudio
--pre
--extra-index-url
https://download.pytorch.org/whl/nightly/cu118
-r
..
/ComfyUI/requirements.txt
pygit2
"../ComfyUI
`n
"
+
(
Get-Content
.
\python310._pth
-Raw
)
|
Set-Content
.
\python310._pth
cd
..
mkdir
ComfyUI_windows_portable
mv
python_embeded
ComfyUI_windows_portable_nightly_pytorch
mv
ComfyUI_copy
ComfyUI_windows_portable_nightly_pytorch/ComfyUI
cd
ComfyUI_windows_portable_nightly_pytorch
mkdir
update
cp
ComfyUI/.ci/nightly/update_windows/
*
.
/update/
cp
ComfyUI/.ci/nightly/windows_base_files/
*
.
/
cd
..
&
"C:\Program Files\7-Zip\7z.exe"
a
-t7z
-m0
=
lzma
-mx
=
8
-mfb
=
64
-md
=
32
m
-ms
=
on
ComfyUI_windows_portable_nightly_pytorch.7z
ComfyUI_windows_portable_nightly_pytorch
mv
ComfyUI_windows_portable_nightly_pytorch.7z
ComfyUI/ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z
.github/workflows/windows_release_nightly_pytorch.yml
0 → 100644
View file @
c6720009
name
:
"
Windows
Release
Nightly
pytorch"
on
:
workflow_dispatch
:
# push:
# branches:
# - master
jobs
:
build
:
permissions
:
contents
:
"
write"
packages
:
"
write"
pull-requests
:
"
read"
runs-on
:
windows-latest
steps
:
-
uses
:
actions/checkout@v3
with
:
fetch-depth
:
0
-
run
:
|
cd ..
cp ComfyUI/.ci/setup_windows_zip_nightly_pytorch.ps1 ./
cp -r ComfyUI ComfyUI_copy
.\setup_windows_zip_nightly_pytorch.ps1
ls
-
name
:
Upload binaries to release
uses
:
svenstaro/upload-release-action@v2
with
:
repo_token
:
${{ secrets.GITHUB_TOKEN }}
file
:
ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z
tag
:
"
latest"
overwrite
:
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment