Skip to content

Commit 2598e5f

Browse files
authored
Merge branch 'nunchaku-tech:main' into main
2 parents 3b6da74 + d3a640a commit 2598e5f

File tree

4 files changed

+43
-90
lines changed

4 files changed

+43
-90
lines changed

.github/workflows/build-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
build-and-deploy-docs:
1313
name: Build and deploy docs
14-
runs-on: [self-hosted, '4090']
14+
runs-on: [self-hosted, build-docs]
1515
if: github.event_name != 'workflow_dispatch' || github.actor == 'lmxyy'
1616
env:
1717
DOC_VERSION: ${{ github.event.inputs.version || 'nightly' }}

.github/workflows/pr-test.yaml

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@ name: PR Tests
22
on:
33
pull_request:
44
types: [opened, synchronize, reopened]
5+
paths-ignore:
6+
- '**/*.md'
7+
- 'docs/**'
8+
- 'test_data/**'
9+
- 'scripts/**'
10+
- 'example_workflows/**'
11+
- '.gitignore'
12+
- '.pre-commit-config.yaml'
13+
- 'licence.txt'
14+
- 'pyproject.toml'
15+
- 'requirements.txt'
16+
- 'README.md'
517
workflow_dispatch:
618
inputs:
719
ref:
@@ -21,57 +33,37 @@ jobs:
2133
runs-on:
2234
- self-hosted
2335
- ${{ matrix.gpu }}
36+
- test
2437
# Only run for non-draft PRs, or for workflow_dispatch events
2538
if: |
2639
(github.event_name == 'pull_request' && !github.event.pull_request.draft) ||
2740
(github.event_name == 'workflow_dispatch')
2841
env:
2942
COMFYUI_MODELS_ROOT: "/home/nunchaku/comfyui_models"
3043
steps:
31-
- name: Determine ref
32-
id: set-ref
33-
run: |
34-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
35-
# Use the merged commit SHA for PRs
36-
echo "ref=${{ github.event.pull_request.merge_commit_sha }}" >> $GITHUB_OUTPUT
37-
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
38-
# Use github.event.inputs.ref if provided, else default to main
39-
if [[ -n "${{ github.event.inputs.ref }}" ]]; then
40-
echo "ref=${{ github.event.inputs.ref }}" >> $GITHUB_OUTPUT
41-
else
42-
echo "ref=main" >> $GITHUB_OUTPUT
43-
fi
44-
fi
4544
- name: Checkout
4645
uses: actions/checkout@v4
4746
with:
48-
ref: ${{ steps.set-ref.outputs.ref }}
4947
submodules: true
48+
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
5049
- name: Show current commit
5150
run: git log -1 --oneline
5251
- name: Set up Python
5352
run: |
5453
which python
5554
echo "Setting up Python with Conda"
56-
conda create -n test_env python=3.12 -y
55+
conda create -n test_env python=3.13 -y
5756
- name: Install Nunchaku
5857
run: |
5958
source $(conda info --base)/etc/profile.d/conda.sh
6059
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
6160
which python
6261
conda install -c conda-forge gxx=11 gcc=11
63-
echo "Installing dependencies"
64-
pip install torch==2.7 torchvision==0.22 torchaudio==2.7 --index-url https://download.pytorch.org/whl/cu128
65-
pip install ninja wheel diffusers==0.34 transformers==4.51 accelerate==1.7 sentencepiece==0.2 protobuf==6.31 huggingface_hub==0.31
66-
pwd
67-
cd ..
6862
rm -rf nunchaku
69-
git clone https://github.com/nunchaku-tech/nunchaku.git
63+
git clone --recurse-submodules https://github.com/nunchaku-tech/nunchaku.git
7064
cd nunchaku
71-
git log -1 --oneline
72-
git submodule init
73-
git submodule update
74-
python setup.py develop
65+
pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128
66+
pip install -e ".[ci]"
7567
- name: Install ComfyUI
7668
run: |
7769
source $(conda info --base)/etc/profile.d/conda.sh
@@ -80,30 +72,36 @@ jobs:
8072
pwd
8173
cd ..
8274
rm -rf ComfyUI
83-
pip install comfy-cli
84-
yes | comfy --here install --nvidia --skip-torch-or-directml --version 0.3.44
75+
mkdir -p ComfyUI
8576
cd ComfyUI
86-
rm -r models
8777
mkdir -p "${COMFYUI_MODELS_ROOT}"
8878
ln -s "${COMFYUI_MODELS_ROOT}" models
89-
cp -r ../ComfyUI-nunchaku/tests nunchaku_tests
90-
pip install -r nunchaku_tests/requirements.txt
79+
pip install -r ../ComfyUI-nunchaku/requirements.txt
80+
ln -s ../ComfyUI-nunchaku/tests tests
81+
pip install -r tests/requirements.txt
82+
mkdir -p custom_nodes
9183
cd custom_nodes
9284
ln -s ../../ComfyUI-nunchaku
85+
git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git
86+
cd comfyui_controlnet_aux
87+
git checkout cc6b232
88+
cd ..
89+
git clone https://github.com/CY-CHENYUE/ComfyUI-InpaintEasy.git
90+
cd ComfyUI-InpaintEasy
91+
pip install -r requirements.txt
92+
git checkout d631a03
93+
cd ..
9394
cd ..
94-
pip install -r custom_nodes/ComfyUI-nunchaku/requirements.txt
95-
comfy node install comfyui_controlnet_aux
96-
comfy node install comfyui-inpainteasy
97-
echo $COMFYUI_MODELS_ROOT
9895
python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py
99-
python custom_nodes/ComfyUI-nunchaku/scripts/download_test_data.py
96+
mkdir -p input
97+
python custom_nodes/ComfyUI-nunchaku/scripts/download_inputs.py
10098
- name: Run tests
10199
run: |
102100
source $(conda info --base)/etc/profile.d/conda.sh
103101
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
104102
pwd
105103
cd ../ComfyUI
106-
pytest -v nunchaku_tests/
104+
pytest tests/test_workflows.py -x -vv --reruns 2 --reruns-delay 0
107105
- name: clean up
108106
if: always()
109107
run: |

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<div align="center" id="nunchaku_logo">
2-
<img src="https://raw.githubusercontent.com/nunchaku-tech/nunchaku/96615bd93a1f0d2cf98039fddecfec43ce34cc96/assets/nunchaku.svg" alt="logo" width="220"></img>
2+
<img src="https://huggingface.co/datasets/nunchaku-tech/cdn/resolve/main/nunchaku/assets/nunchaku_v2.png" alt="logo" width="220"></img>
33
</div>
44
<h3 align="center">
55
<a href="http://arxiv.org/abs/2411.05007"><b>Paper</b></a> | <a href="https://nunchaku.tech/docs/ComfyUI-nunchaku/"><b>Docs</b></a> | <a href="https://hanlab.mit.edu/projects/svdquant"><b>Website</b></a> | <a href="https://hanlab.mit.edu/blog/svdquant"><b>Blog</b></a> | <a href="https://svdquant.mit.edu"><b>Demo</b></a> | <a href="https://huggingface.co/nunchaku-tech"><b>Hugging Face</b></a> | <a href="https://modelscope.cn/organization/nunchaku-tech"><b>ModelScope</b></a>
66
</h3>
77

8-
<h3 align="center">
9-
<a href="README.md"><b>English</b></a> | <a href="README_ZH.md"><b>中文</b></a>
10-
</h3>
8+
<div align="center">
9+
<a href=https://discord.gg/Wk6PnwX9Sm target="_blank"><img src=https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscord.com%2Fapi%2Finvites%2FWk6PnwX9Sm%3Fwith_counts%3Dtrue&query=%24.approximate_member_count&logo=discord&logoColor=white&label=Discord&color=green&suffix=%20total height=22px></a>
10+
<a href=https://huggingface.co/datasets/nunchaku-tech/cdn/resolve/main/nunchaku/assets/wechat.jpg target="_blank"><img src=https://img.shields.io/badge/WeChat-07C160?logo=wechat&logoColor=white height=22px></a>
11+
<a href=https://deepwiki.com/nunchaku-tech/ComfyUI-nunchaku target="_blank"><img src=https://deepwiki.com/badge.svg height=22px></a>
12+
</div>
1113

1214
This repository provides the ComfyUI plugin for [**Nunchaku**](https://github.com/nunchaku-tech/nunchaku), an efficient inference engine for 4-bit neural networks quantized with [SVDQuant](http://arxiv.org/abs/2411.05007). For the quantization library, check out [DeepCompressor](https://github.com/nunchaku-tech/deepcompressor).
1315

@@ -19,7 +21,7 @@ Join our user groups on [**Discord**](https://discord.gg/Wk6PnwX9Sm) and [**WeCh
1921

2022
## News
2123

22-
- **[2025-09-24]** 🔥 Released **4-bit 4/8-step Qwen-Image-Edit-2509 lightning** models at [Hugging Face](https://huggingface.co/nunchaku-tech/nunchaku-qwen-image-2509)! Try them out with this [workflow](./example_workflows/nunchaku-qwen-image-edit-2509-lightning.json)!
24+
- **[2025-09-24]** 🔥 Released **4-bit 4/8-step Qwen-Image-Edit-2509 lightning** models at [Hugging Face](https://huggingface.co/nunchaku-tech/nunchaku-qwen-image-edit-2509)! Try them out with this [workflow](./example_workflows/nunchaku-qwen-image-edit-2509-lightning.json)!
2325
- **[2025-09-24]** 🔥 Released **4-bit Qwen-Image-Edit-2509**! Models are available on [Hugging Face](https://huggingface.co/nunchaku-tech/nunchaku-qwen-image-2509). Try them out with this [workflow](./example_workflows/nunchaku-qwen-image-edit-2509.json)!
2426
- **[2025-09-09]** 🔥 Released **4-bit Qwen-Image-Edit** together with the [4/8-step Lightning](https://huggingface.co/lightx2v/Qwen-Image-Lightning) variants! Models are available on [Hugging Face](https://huggingface.co/nunchaku-tech/nunchaku-qwen-image). Try them out with this [workflow](./example_workflows/nunchaku-qwen-image-edit.json)!
2527
- **[2025-09-04]** 🚀 Official release of **Nunchaku v1.0.0**! Qwen-Image now supports **asynchronous offloading**, cutting Transformer VRAM usage to as little as **3 GiB** with no performance loss. You can also try our pre-quantized [4/8-step Qwen-Image-Lightning](https://huggingface.co/lightx2v/Qwen-Image-Lightning) models on [Hugging Face](https://huggingface.co/nunchaku-tech/nunchaku-qwen-image) or [ModelScope](https://modelscope.cn/models/nunchaku-tech/nunchaku-qwen-image).

README_ZH.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)