Skip to content

Commit 433f0b2

Browse files
authored
chore: support torch 2.9 uploading wheel to hf (#598)
* chore: support uploading wheel to hf * support ready_for_review
1 parent 2327c99 commit 433f0b2

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

.github/workflows/pr-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Tests
22
on:
33
pull_request:
4-
types: [opened, synchronize, reopened]
4+
types: [opened, synchronize, reopened, ready_for_review]
55
paths:
66
- "nunchaku/**"
77
- "src/**"
@@ -98,8 +98,8 @@ jobs:
9898
comfy node install comfyui-inpainteasy
9999
cp -r custom_nodes/ComfyUI-nunchaku/tests nunchaku_tests
100100
pip install -r nunchaku_tests/requirements.txt
101-
HF_TOKEN=${{ secrets.HF_TOKEN }} python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py
102-
HF_TOKEN=${{ secrets.HF_TOKEN }} python custom_nodes/ComfyUI-nunchaku/scripts/download_test_data.py
101+
python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py
102+
python custom_nodes/ComfyUI-nunchaku/scripts/download_test_data.py
103103
- name: Run ComfyUI tests
104104
run: |
105105
source $(conda info --base)/etc/profile.d/conda.sh

.github/workflows/release-build.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
strategy:
5252
matrix:
5353
python: ["3.10", "3.11", "3.12"]
54-
torch: ["2.5", "2.6", "2.7", "2.8"]
54+
torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
5555
steps:
5656
- name: Checkout to the tag
5757
uses: actions/checkout@v4
@@ -82,6 +82,18 @@ jobs:
8282
prerelease: false
8383
env:
8484
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
- name: Set up Python
86+
uses: actions/setup-python@v5
87+
with:
88+
python-version: '3.12'
89+
- name: Upload wheels to HuggingFace Hub
90+
env:
91+
HF_TOKEN: ${{ secrets.HF_WHEEL_UPLOAD_TOKEN }}
92+
run: |
93+
pip install huggingface_hub
94+
for whl in dist/*.whl; do
95+
hf upload nunchaku-tech/nunchaku "$whl" .
96+
done
8597
- name: Clean up
8698
if: always()
8799
run: bash scripts/linux_cleanup.sh
@@ -92,7 +104,7 @@ jobs:
92104
strategy:
93105
matrix:
94106
python: ["3.10", "3.11", "3.12"]
95-
torch: ["2.5", "2.6", "2.7", "2.8"]
107+
torch: ["2.5", "2.6", "2.7", "2.8", "2.9"]
96108
steps:
97109
- name: Checkout to the tag
98110
uses: actions/checkout@v4
@@ -129,3 +141,16 @@ jobs:
129141
prerelease: false
130142
env:
131143
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
- name: Set up Python
145+
uses: actions/setup-python@v5
146+
with:
147+
python-version: '3.12'
148+
- name: Upload wheels to HuggingFace Hub
149+
shell: cmd
150+
env:
151+
HF_TOKEN: ${{ secrets.HF_WHEEL_UPLOAD_TOKEN }}
152+
run: |
153+
pip install huggingface_hub
154+
for %%w in (dist\*.whl) do (
155+
hf upload nunchaku-tech/nunchaku "%%w" .
156+
)

0 commit comments

Comments
 (0)