Skip to content

Commit 08b8f5f

Browse files
committed
Fix merge
1 parent 22a5475 commit 08b8f5f

File tree

258 files changed

+9439
-2473
lines changed

Some content is hidden

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

258 files changed

+9439
-2473
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "\U0001F31F Remote VAE"
2+
description: Feedback for remote VAE pilot
3+
labels: [ "Remote VAE" ]
4+
5+
body:
6+
- type: textarea
7+
id: positive
8+
validations:
9+
required: true
10+
attributes:
11+
label: Did you like the remote VAE solution?
12+
description: |
13+
If you liked it, we would appreciate it if you could elaborate what you liked.
14+
15+
- type: textarea
16+
id: feedback
17+
validations:
18+
required: true
19+
attributes:
20+
label: What can be improved about the current solution?
21+
description: |
22+
Let us know the things you would like to see improved. Note that we will work optimizing the solution once the pilot is over and we have usage.
23+
24+
- type: textarea
25+
id: others
26+
validations:
27+
required: true
28+
attributes:
29+
label: What other VAEs you would like to see if the pilot goes well?
30+
description: |
31+
Provide a list of the VAEs you would like to see in the future if the pilot goes well.
32+
33+
- type: textarea
34+
id: additional-info
35+
attributes:
36+
label: Notify the members of the team
37+
description: |
38+
Tag the following folks when submitting this feedback: @hlky @sayakpaul

.github/workflows/pr_style_bot.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: PR Style Bot
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
check-permissions:
13+
if: >
14+
contains(github.event.comment.body, '@bot /style') &&
15+
github.event.issue.pull_request != null
16+
runs-on: ubuntu-latest
17+
outputs:
18+
is_authorized: ${{ steps.check_user_permission.outputs.has_permission }}
19+
steps:
20+
- name: Check user permission
21+
id: check_user_permission
22+
uses: actions/github-script@v6
23+
with:
24+
script: |
25+
const comment_user = context.payload.comment.user.login;
26+
const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({
27+
owner: context.repo.owner,
28+
repo: context.repo.repo,
29+
username: comment_user
30+
});
31+
const authorized = permission.permission === 'admin';
32+
console.log(`User ${comment_user} has permission level: ${permission.permission}, authorized: ${authorized} (only admins allowed)`);
33+
core.setOutput('has_permission', authorized);
34+
35+
run-style-bot:
36+
needs: check-permissions
37+
if: needs.check-permissions.outputs.is_authorized == 'true'
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Extract PR details
41+
id: pr_info
42+
uses: actions/github-script@v6
43+
with:
44+
script: |
45+
const prNumber = context.payload.issue.number;
46+
const { data: pr } = await github.rest.pulls.get({
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
pull_number: prNumber
50+
});
51+
52+
// We capture both the branch ref and the "full_name" of the head repo
53+
// so that we can check out the correct repository & branch (including forks).
54+
core.setOutput("prNumber", prNumber);
55+
core.setOutput("headRef", pr.head.ref);
56+
core.setOutput("headRepoFullName", pr.head.repo.full_name);
57+
58+
- name: Check out PR branch
59+
uses: actions/checkout@v3
60+
env:
61+
HEADREPOFULLNAME: ${{ steps.pr_info.outputs.headRepoFullName }}
62+
HEADREF: ${{ steps.pr_info.outputs.headRef }}
63+
with:
64+
# Instead of checking out the base repo, use the contributor's repo name
65+
repository: ${{ env.HEADREPOFULLNAME }}
66+
ref: ${{ env.HEADREF }}
67+
# You may need fetch-depth: 0 for being able to push
68+
fetch-depth: 0
69+
token: ${{ secrets.GITHUB_TOKEN }}
70+
71+
- name: Debug
72+
env:
73+
HEADREPOFULLNAME: ${{ steps.pr_info.outputs.headRepoFullName }}
74+
HEADREF: ${{ steps.pr_info.outputs.headRef }}
75+
PRNUMBER: ${{ steps.pr_info.outputs.prNumber }}
76+
run: |
77+
echo "PR number: $PRNUMBER"
78+
echo "Head Ref: $HEADREF"
79+
echo "Head Repo Full Name: $HEADREPOFULLNAME"
80+
81+
- name: Set up Python
82+
uses: actions/setup-python@v4
83+
84+
- name: Install dependencies
85+
run: |
86+
pip install .[quality]
87+
88+
- name: Download necessary files from main branch of Diffusers
89+
run: |
90+
curl -o main_Makefile https://raw.githubusercontent.com/huggingface/diffusers/main/Makefile
91+
curl -o main_setup.py https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/setup.py
92+
curl -o main_check_doc_toc.py https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/utils/check_doc_toc.py
93+
94+
- name: Compare the files and raise error if needed
95+
run: |
96+
diff_failed=0
97+
98+
if ! diff -q main_Makefile Makefile; then
99+
echo "Error: The Makefile has changed. Please ensure it matches the main branch."
100+
diff_failed=1
101+
fi
102+
103+
if ! diff -q main_setup.py setup.py; then
104+
echo "Error: The setup.py has changed. Please ensure it matches the main branch."
105+
diff_failed=1
106+
fi
107+
108+
if ! diff -q main_check_doc_toc.py utils/check_doc_toc.py; then
109+
echo "Error: The utils/check_doc_toc.py has changed. Please ensure it matches the main branch."
110+
diff_failed=1
111+
fi
112+
113+
if [ $diff_failed -eq 1 ]; then
114+
echo "❌ Error happened as we detected changes in the files that should not be changed ❌"
115+
exit 1
116+
fi
117+
118+
echo "No changes in the files. Proceeding..."
119+
rm -rf main_Makefile main_setup.py main_check_doc_toc.py
120+
121+
- name: Run make style and make quality
122+
run: |
123+
make style && make quality
124+
125+
- name: Commit and push changes
126+
id: commit_and_push
127+
env:
128+
HEADREPOFULLNAME: ${{ steps.pr_info.outputs.headRepoFullName }}
129+
HEADREF: ${{ steps.pr_info.outputs.headRef }}
130+
PRNUMBER: ${{ steps.pr_info.outputs.prNumber }}
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
run: |
133+
echo "HEADREPOFULLNAME: $HEADREPOFULLNAME, HEADREF: $HEADREF"
134+
# Configure git with the Actions bot user
135+
git config user.name "github-actions[bot]"
136+
git config user.email "github-actions[bot]@users.noreply.github.com"
137+
138+
# Make sure your 'origin' remote is set to the contributor's fork
139+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/$HEADREPOFULLNAME.git"
140+
141+
# If there are changes after running style/quality, commit them
142+
if [ -n "$(git status --porcelain)" ]; then
143+
git add .
144+
git commit -m "Apply style fixes"
145+
# Push to the original contributor's forked branch
146+
git push origin HEAD:$HEADREF
147+
echo "changes_pushed=true" >> $GITHUB_OUTPUT
148+
else
149+
echo "No changes to commit."
150+
echo "changes_pushed=false" >> $GITHUB_OUTPUT
151+
fi
152+
153+
- name: Comment on PR with workflow run link
154+
if: steps.commit_and_push.outputs.changes_pushed == 'true'
155+
uses: actions/github-script@v6
156+
with:
157+
script: |
158+
const prNumber = parseInt(process.env.prNumber, 10);
159+
const runUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
160+
161+
await github.rest.issues.createComment({
162+
owner: context.repo.owner,
163+
repo: context.repo.repo,
164+
issue_number: prNumber,
165+
body: `Style fixes have been applied. [View the workflow run here](${runUrl}).`
166+
});
167+
env:
168+
prNumber: ${{ steps.pr_info.outputs.prNumber }}

.github/workflows/pr_tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Fast tests for PRs
22

33
on:
44
pull_request:
5-
branches:
6-
- main
5+
branches: [main]
6+
types: [synchronize]
77
paths:
88
- "src/diffusers/**.py"
99
- "benchmarks/**.py"
@@ -64,6 +64,7 @@ jobs:
6464
run: |
6565
python utils/check_copies.py
6666
python utils/check_dummies.py
67+
python utils/check_support_list.py
6768
make deps_table_check_updated
6869
- name: Check if failure
6970
if: ${{ failure() }}
@@ -120,7 +121,8 @@ jobs:
120121
run: |
121122
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
122123
python -m uv pip install -e [quality,test]
123-
python -m uv pip install accelerate
124+
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
125+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
124126
125127
- name: Environment
126128
run: |

0 commit comments

Comments
 (0)