Skip to content

Commit 40c1afb

Browse files
committed
merging main
2 parents a4647e1 + 9ebbfac commit 40c1afb

133 files changed

Lines changed: 8288 additions & 1556 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/1-bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ body:
88
attributes:
99
label: Checklist
1010
options:
11-
- label: 1. I have searched for related issues and FAQs (https://github.com/mit-han-lab/nunchaku/blob/main/docs/faq.md) but was unable to find a solution.
11+
- label: 1. I have searched for related issues and FAQs (https://nunchaku.tech/docs/nunchaku/faq/faq.html) but was unable to find a solution.
1212
- label: 2. The issue persists in the latest version.
1313
- label: 3. Please note that without environment information and a minimal reproducible example, it will be difficult for us to reproduce and address the issue, which may delay our response.
1414
- label: 4. If your report is a question rather than a bug, please submit it as a discussion at https://github.com/mit-han-lab/nunchaku/discussions/new/choose. Otherwise, this issue will be closed.

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
## Checklist
1212

1313
- [ ] Code is formatted using Pre-Commit hooks.
14-
- [ ] Relevant unit tests are added in the [`tests`](../tests) directory following the guidance in [`tests/README.md`](../tests/README.md).
15-
- [ ] [README](../README.md) and example scripts in [`examples`](../examples) are updated if necessary.
14+
- [ ] Relevant unit tests are added in the [`tests`](../tests) directory following the guidance in [`Contribution Guide`](https://nunchaku.tech/docs/nunchaku/developer/contribution_guide.html).
15+
- [ ] [Documentation](../docs/source) and example scripts in [`examples`](../examples) are updated if necessary.
1616
- [ ] Throughput/latency benchmarks and quality evaluations are included where applicable.
1717
- [ ] **For reviewers:** If you're only helping merge the main branch and haven't contributed code to this PR, please remove yourself as a co-author when merging.
1818
- [ ] Please feel free to join our [Slack](https://join.slack.com/t/nunchaku/shared_invite/zt-3170agzoz-NgZzWaTrEj~n2KEV3Hpl5Q), [Discord](https://discord.gg/Wk6PnwX9Sm) or [WeChat](https://github.com/mit-han-lab/nunchaku/blob/main/assets/wechat.jpg) to discuss your PR.

.github/workflows/clean-nightly-releases.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ name: Clean Old Nightly Releases
22
on:
33
schedule:
44
- cron: '* 6 * * *'
5-
workflow_dispatch:
65
permissions:
76
contents: write
87
jobs:
98
cleanup:
109
name: Delete old nightly releases and tags
1110
runs-on: ubuntu-latest
12-
if: github.repository == 'mit-han-lab/nunchaku'
11+
if: github.repository == 'nunchaku-tech/nunchaku'
1312
steps:
1413
- name: Checkout repository
1514
uses: actions/checkout@v4

.github/workflows/close-inactive-issues.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@ name: Close Inactive Issues
33
on:
44
schedule:
55
- cron: '0 0 * * *'
6-
workflow_dispatch:
76
permissions:
87
issues: write
98
contents: read
109
jobs:
1110
close-inactive-issues:
12-
if: github.repository == 'mit-han-lab/nunchaku'
11+
if: github.repository == 'nunchaku-tech/nunchaku'
1312
runs-on: ubuntu-latest
1413
steps:
1514
- name: Check and close inactive issues
1615
uses: actions/github-script@v6
1716
with:
1817
github-token: ${{secrets.GITHUB_TOKEN}}
1918
script: |
20-
const sixtyDaysAgo = new Date(Date.now() - 60 * 24 * 60 * 60 * 1000);
19+
const thirtyDaysAgo = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000);
2120
2221
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
2322
console.log(`Owner: ${owner}, Repo: ${repo}`);
@@ -57,7 +56,7 @@ jobs:
5756
console.log(`Skipping issue #${issue.number} as it's marked as 'good first issue'`);
5857
continue;
5958
}
60-
if (new Date(issue.updated_at) < sixtyDaysAgo) {
59+
if (new Date(issue.updated_at) < thirtyDaysAgo) {
6160
try {
6261
await github.rest.issues.update({
6362
owner,
@@ -70,7 +69,7 @@ jobs:
7069
owner,
7170
repo,
7271
issue_number: issue.number,
73-
body: 'This issue has been automatically closed due to 60-day inactivity. Please feel free to reopen it if needed.'
72+
body: 'This issue has been automatically closed due to 30-day inactivity. Please feel free to reopen it with \`/reopen\` if needed.'
7473
});
7574
console.log(`Closed issue #${issue.number} due to inactivity.`);
7675
} catch (error) {

.github/workflows/lint.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
push:
44
branches:
55
- main
6-
- dev
76
pull_request:
87
jobs:
98
lint:

.github/workflows/merge-main-into-dev.yaml

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

.github/workflows/nightly-build.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@ name: Nightly Build
22
on:
33
schedule:
44
- cron: '0 8 * * *' # UTC time
5-
workflow_dispatch:
65
permissions:
76
contents: write
87
jobs:
98
tag:
10-
name: Tag dev branch if dev version
9+
name: Check if main branch is a dev version
1110
runs-on: ubuntu-latest
12-
if: github.repository == 'mit-han-lab/nunchaku'
11+
if: github.repository == 'nunchaku-tech/nunchaku'
1312
outputs:
1413
need_build: ${{ steps.check.outputs.need_build }}
1514
tag_name: ${{ steps.tag.outputs.tag_name }}
1615
steps:
17-
- name: Checkout dev branch
16+
- name: Checkout main branch
1817
uses: actions/checkout@v4
1918
with:
2019
fetch-depth: 0
21-
ref: dev
20+
ref: main
2221
- name: Extract version from __version__.py
2322
id: version
2423
run: |
@@ -73,7 +72,7 @@ jobs:
7372
name: Build the linux nightly wheels
7473
runs-on: [self-hosted, linux-build]
7574
needs: tag
76-
if: needs.tag.outputs.need_build == 'true' && github.repository == 'mit-han-lab/nunchaku'
75+
if: needs.tag.outputs.need_build == 'true' && github.repository == 'nunchaku-tech/nunchaku'
7776
strategy:
7877
matrix:
7978
python: ["3.10", "3.11", "3.12"]

.github/workflows/release-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
release:
88
name: Tag Main Branch and Create Release
99
runs-on: ubuntu-latest
10-
if: github.repository == 'mit-han-lab/nunchaku'
10+
if: github.repository == 'nunchaku-tech/nunchaku'
1111
outputs:
1212
tag_name: ${{ steps.set-tag.outputs.tag_name }}
1313
steps:
@@ -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"]
54+
torch: ["2.5", "2.6", "2.7", "2.8"]
5555
steps:
5656
- name: Checkout to the tag
5757
uses: actions/checkout@v4
@@ -92,7 +92,7 @@ jobs:
9292
strategy:
9393
matrix:
9494
python: ["3.10", "3.11", "3.12"]
95-
torch: ["2.5", "2.6", "2.7"]
95+
torch: ["2.5", "2.6", "2.7", "2.8"]
9696
steps:
9797
- name: Checkout to the tag
9898
uses: actions/checkout@v4
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Reopen Issue on /reopen Command
2+
on:
3+
issue_comment:
4+
types: [created]
5+
permissions:
6+
issues: write
7+
contents: read
8+
jobs:
9+
reopen-issue:
10+
if: github.repository == 'nunchaku-tech/nunchaku'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if comment is /reopen by issue creator and reopen
14+
uses: actions/github-script@v6
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }}
17+
script: |
18+
const commentBody = context.payload.comment.body.trim();
19+
const issueNumber = context.payload.issue.number;
20+
const commentAuthor = context.payload.comment.user.login;
21+
const issueAuthor = context.payload.issue.user.login;
22+
23+
if (commentBody === '/reopen') {
24+
if (commentAuthor === issueAuthor) {
25+
// Only proceed if issue is currently closed
26+
if (context.payload.issue.state === 'closed') {
27+
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
28+
try {
29+
await github.rest.issues.update({
30+
owner,
31+
repo,
32+
issue_number: issueNumber,
33+
state: 'open',
34+
});
35+
36+
// Remove 'inactive' label if present
37+
const labels = context.payload.issue.labels.map(label => label.name);
38+
if (labels.includes('inactive')) {
39+
const newLabels = labels.filter(label => label !== 'inactive');
40+
await github.rest.issues.update({
41+
owner,
42+
repo,
43+
issue_number: issueNumber,
44+
labels: newLabels,
45+
});
46+
}
47+
48+
await github.rest.issues.createComment({
49+
owner,
50+
repo,
51+
issue_number: issueNumber,
52+
body: `Issue reopened by @${commentAuthor} via \`/reopen\` command.`,
53+
});
54+
55+
console.log(`Reopened issue #${issueNumber} by request of issuer.`);
56+
} catch (error) {
57+
console.error(`Failed to reopen issue #${issueNumber}: ${error.message}`);
58+
}
59+
} else {
60+
console.log(`Issue #${issueNumber} is already open.`);
61+
}
62+
} else {
63+
console.log(`Commenter @${commentAuthor} is not the issue creator @${issueAuthor}, ignoring.`);
64+
}
65+
} else {
66+
console.log(`Comment is not /reopen, ignoring.`);
67+
}

.github/workflows/sync-hf-to-ms.yaml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Synchronize HuggingFace Repos to ModelScope
22
on:
33
schedule:
44
- cron: '0 3 * * *' # Run every day at 03:00 UTC
5-
workflow_dispatch: # Allow manual trigger from GitHub UI
5+
# workflow_dispatch: # Allow manual trigger from GitHub UI
66
jobs:
77
sync:
88
runs-on: ubuntu-latest
9-
if: github.repository == 'mit-han-lab/nunchaku'
9+
if: github.repository == 'nunchaku-tech/nunchaku'
1010
strategy:
1111
matrix:
1212
repo:
@@ -19,27 +19,15 @@ jobs:
1919
- nunchaku-flux.1-canny-dev
2020
- nunchaku-shuttle-jaguar
2121
- nunchaku-sana
22-
- svdq-fp4-flux.1-schnell
23-
- svdq-int4-flux.1-schnell
24-
- svdq-fp4-flux.1-dev
25-
- svdq-int4-flux.1-dev
26-
- svdq-fp4-flux.1-fill-dev
27-
- svdq-int4-flux.1-fill-dev
28-
- svdq-fp4-flux.1-depth-dev
29-
- svdq-int4-flux.1-depth-dev
30-
- svdq-fp4-flux.1-canny-dev
31-
- svdq-int4-flux.1-canny-dev
32-
- svdq-fp4-shuttle-jaguar
33-
- svdq-int4-shuttle-jaguar
34-
- svdq-int4-sana-1600m
35-
- svdq-flux.1-schnell-pix2pix-turbo
22+
- nunchaku-flux.1-kontext-dev
23+
- nunchaku-flux.1-schnell-pix2pix-turbo
3624
steps:
3725
- name: Checkout repository
3826
uses: actions/checkout@v4
3927
- name: Set up Python
4028
uses: actions/setup-python@v5
4129
with:
42-
python-version: '3.11'
30+
python-version: '3.12'
4331
- name: Install dependencies
4432
run: |
4533
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)