Skip to content

Commit e72503c

Browse files
committed
Merge branch 'huggingface-main'
2 parents adb1c25 + 1271d42 commit e72503c

File tree

399 files changed

+62995
-6776
lines changed

Some content is hidden

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

399 files changed

+62995
-6776
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,32 @@ body:
4949
placeholder: diffusers version, platform, python version, ...
5050
validations:
5151
required: true
52+
- type: textarea
53+
id: who-can-help
54+
attributes:
55+
label: Who can help?
56+
description: |
57+
Your issue will be replied to more quickly if you can figure out the right person to tag with @
58+
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
59+
60+
All issues are read by one of the core maintainers, so if you don't know who to tag, just leave this blank and
61+
a core maintainer will ping the right person.
62+
63+
Please tag fewer than 3 people.
64+
65+
General library related questions: @patrickvonplaten and @sayakpaul
66+
67+
Questions on the training examples: @williamberman, @sayakpaul, @yiyixuxu
68+
69+
Questions on memory optimizations, LoRA, float16, etc.: @williamberman, @patrickvonplaten, and @sayakpaul
70+
71+
Questions on schedulers: @patrickvonplaten and @williamberman
72+
73+
Questions on models and pipelines: @patrickvonplaten, @sayakpaul, and @williamberman
74+
75+
Questions on JAX- and MPS-related things: @pcuenca
76+
77+
Questions on audio pipelines: @patrickvonplaten, @kashif, and @sanchit-gandhi
78+
79+
Documentation: @stevhliu and @yiyixuxu
80+
placeholder: "@Username ..."

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# What does this PR do?
2+
3+
<!--
4+
Congratulations! You've made it this far! You're not quite done yet though.
5+
6+
Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.
7+
8+
Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.
9+
10+
Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
11+
-->
12+
13+
<!-- Remove if not applicable -->
14+
15+
Fixes # (issue)
16+
17+
18+
## Before submitting
19+
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
20+
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/diffusers/blob/main/CONTRIBUTING.md)?
21+
- [ ] Did you read our [philosophy doc](https://github.com/huggingface/diffusers/blob/main/PHILOSOPHY.md) (important for complex PRs)?
22+
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case.
23+
- [ ] Did you make sure to update the documentation with your changes? Here are the
24+
[documentation guidelines](https://github.com/huggingface/diffusers/tree/main/docs), and
25+
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
26+
- [ ] Did you write any new necessary tests?
27+
28+
29+
## Who can review?
30+
31+
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
32+
members/contributors who may be interested in your PR.
33+
34+
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
35+
36+
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
37+
Please tag fewer than 3 people.
38+
39+
Core library:
40+
41+
- Schedulers: @williamberman and @patrickvonplaten
42+
- Pipelines: @patrickvonplaten and @sayakpaul
43+
- Training examples: @sayakpaul and @patrickvonplaten
44+
- Docs: @stevenliu and @yiyixu
45+
- JAX and MPS: @pcuenca
46+
- Audio: @sanchit-gandhi
47+
- General functionalities: @patrickvonplaten and @sayakpaul
48+
49+
Integrations:
50+
51+
- deepspeed: HF Trainer/Accelerate: @pacman100
52+
53+
HF projects:
54+
55+
- accelerate: [different repo](https://github.com/huggingface/accelerate)
56+
- datasets: [different repo](https://github.com/huggingface/datasets)
57+
- transformers: [different repo](https://github.com/huggingface/transformers)
58+
- safetensors: [different repo](https://github.com/huggingface/safetensors)
59+
60+
-->

.github/actions/setup-miniconda/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
- name: Get date
2828
id: get-date
2929
shell: bash
30-
run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')d"
30+
run: echo "today=$(/bin/date -u '+%Y%m%d')d" >> $GITHUB_OUTPUT
3131
- name: Setup miniconda cache
3232
id: miniconda-cache
3333
uses: actions/cache@v2
@@ -143,4 +143,4 @@ runs:
143143
echo "There is ${AVAIL}KB free space left in $MOUNT, continue"
144144
fi
145145
fi
146-
done
146+
done

.github/workflows/build_documentation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
- doc-builder*
88
- v*-release
9+
- v*-patch
910

1011
jobs:
1112
build:
@@ -14,6 +15,7 @@ jobs:
1415
commit_sha: ${{ github.sha }}
1516
package: diffusers
1617
notebook_folder: diffusers_doc
17-
languages: en ko
18+
languages: en ko zh
1819
secrets:
1920
token: ${{ secrets.HUGGINGFACE_PUSH }}
21+
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
name: Delete dev documentation
1+
name: Delete doc comment
22

33
on:
4-
pull_request:
5-
types: [ closed ]
4+
workflow_run:
5+
workflows: ["Delete doc comment trigger"]
6+
types:
7+
- completed
68

79

810
jobs:
911
delete:
1012
uses: huggingface/doc-builder/.github/workflows/delete_doc_comment.yml@main
11-
with:
12-
pr_number: ${{ github.event.number }}
13-
package: diffusers
13+
secrets:
14+
comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Delete doc comment trigger
2+
3+
on:
4+
pull_request:
5+
types: [ closed ]
6+
7+
8+
jobs:
9+
delete:
10+
uses: huggingface/doc-builder/.github/workflows/delete_doc_comment_trigger.yml@main
11+
with:
12+
pr_number: ${{ github.event.number }}

.github/workflows/pr_tests.yml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ jobs:
3636
runner: docker-cpu
3737
image: diffusers/diffusers-flax-cpu
3838
report: flax_cpu
39-
- name: Fast ONNXRuntime CPU tests
40-
framework: onnxruntime
41-
runner: docker-cpu
42-
image: diffusers/diffusers-onnxruntime-cpu
43-
report: onnx_cpu
4439
- name: PyTorch Example CPU tests
4540
framework: pytorch_examples
4641
runner: docker-cpu
@@ -69,8 +64,6 @@ jobs:
6964
run: |
7065
apt-get update && apt-get install libsndfile1-dev -y
7166
python -m pip install -e .[quality,test]
72-
python -m pip install -U git+https://github.com/huggingface/transformers
73-
python -m pip install git+https://github.com/huggingface/accelerate
7467
7568
- name: Environment
7669
run: |
@@ -100,14 +93,6 @@ jobs:
10093
--make-reports=tests_${{ matrix.config.report }} \
10194
tests
10295
103-
- name: Run fast ONNXRuntime CPU tests
104-
if: ${{ matrix.config.framework == 'onnxruntime' }}
105-
run: |
106-
python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \
107-
-s -v -k "Onnx" \
108-
--make-reports=tests_${{ matrix.config.report }} \
109-
tests/
110-
11196
- name: Run example PyTorch CPU tests
11297
if: ${{ matrix.config.framework == 'pytorch_examples' }}
11398
run: |
@@ -125,56 +110,3 @@ jobs:
125110
with:
126111
name: pr_${{ matrix.config.report }}_test_reports
127112
path: reports
128-
129-
run_fast_tests_apple_m1:
130-
name: Fast PyTorch MPS tests on MacOS
131-
runs-on: [ self-hosted, apple-m1 ]
132-
133-
steps:
134-
- name: Checkout diffusers
135-
uses: actions/checkout@v3
136-
with:
137-
fetch-depth: 2
138-
139-
- name: Clean checkout
140-
shell: arch -arch arm64 bash {0}
141-
run: |
142-
git clean -fxd
143-
144-
- name: Setup miniconda
145-
uses: ./.github/actions/setup-miniconda
146-
with:
147-
python-version: 3.9
148-
149-
- name: Install dependencies
150-
shell: arch -arch arm64 bash {0}
151-
run: |
152-
${CONDA_RUN} python -m pip install --upgrade pip
153-
${CONDA_RUN} python -m pip install -e .[quality,test]
154-
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
155-
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate
156-
${CONDA_RUN} python -m pip install -U git+https://github.com/huggingface/transformers
157-
158-
- name: Environment
159-
shell: arch -arch arm64 bash {0}
160-
run: |
161-
${CONDA_RUN} python utils/print_env.py
162-
163-
- name: Run fast PyTorch tests on M1 (MPS)
164-
shell: arch -arch arm64 bash {0}
165-
env:
166-
HF_HOME: /System/Volumes/Data/mnt/cache
167-
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
168-
run: |
169-
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
170-
171-
- name: Failure short reports
172-
if: ${{ failure() }}
173-
run: cat reports/tests_torch_mps_failures_short.txt
174-
175-
- name: Test suite reports artifacts
176-
if: ${{ always() }}
177-
uses: actions/upload-artifact@v2
178-
with:
179-
name: pr_torch_mps_test_reports
180-
path: reports

.github/workflows/push_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
run_slow_tests:
1818
strategy:
1919
fail-fast: false
20+
max-parallel: 1
2021
matrix:
2122
config:
2223
- name: Slow PyTorch CUDA tests on Ubuntu
@@ -61,8 +62,6 @@ jobs:
6162
- name: Install dependencies
6263
run: |
6364
python -m pip install -e .[quality,test]
64-
python -m pip install -U git+https://github.com/huggingface/transformers
65-
python -m pip install git+https://github.com/huggingface/accelerate
6665
6766
- name: Environment
6867
run: |
@@ -72,6 +71,9 @@ jobs:
7271
if: ${{ matrix.config.framework == 'pytorch' }}
7372
env:
7473
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
74+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
75+
CUBLAS_WORKSPACE_CONFIG: :16:8
76+
7577
run: |
7678
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
7779
-s -v -k "not Flax and not Onnx" \
@@ -131,8 +133,6 @@ jobs:
131133
- name: Install dependencies
132134
run: |
133135
python -m pip install -e .[quality,test,training]
134-
python -m pip install git+https://github.com/huggingface/accelerate
135-
python -m pip install -U git+https://github.com/huggingface/transformers
136136
137137
- name: Environment
138138
run: |

.github/workflows/push_tests_fast.yml

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Slow tests on main
1+
name: Fast tests on main
22

33
on:
44
push:
@@ -62,8 +62,6 @@ jobs:
6262
run: |
6363
apt-get update && apt-get install libsndfile1-dev -y
6464
python -m pip install -e .[quality,test]
65-
python -m pip install -U git+https://github.com/huggingface/transformers
66-
python -m pip install git+https://github.com/huggingface/accelerate
6765
6866
- name: Environment
6967
run: |
@@ -110,56 +108,3 @@ jobs:
110108
with:
111109
name: pr_${{ matrix.config.report }}_test_reports
112110
path: reports
113-
114-
run_fast_tests_apple_m1:
115-
name: Fast PyTorch MPS tests on MacOS
116-
runs-on: [ self-hosted, apple-m1 ]
117-
118-
steps:
119-
- name: Checkout diffusers
120-
uses: actions/checkout@v3
121-
with:
122-
fetch-depth: 2
123-
124-
- name: Clean checkout
125-
shell: arch -arch arm64 bash {0}
126-
run: |
127-
git clean -fxd
128-
129-
- name: Setup miniconda
130-
uses: ./.github/actions/setup-miniconda
131-
with:
132-
python-version: 3.9
133-
134-
- name: Install dependencies
135-
shell: arch -arch arm64 bash {0}
136-
run: |
137-
${CONDA_RUN} python -m pip install --upgrade pip
138-
${CONDA_RUN} python -m pip install -e .[quality,test]
139-
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
140-
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate
141-
${CONDA_RUN} python -m pip install -U git+https://github.com/huggingface/transformers
142-
143-
- name: Environment
144-
shell: arch -arch arm64 bash {0}
145-
run: |
146-
${CONDA_RUN} python utils/print_env.py
147-
148-
- name: Run fast PyTorch tests on M1 (MPS)
149-
shell: arch -arch arm64 bash {0}
150-
env:
151-
HF_HOME: /System/Volumes/Data/mnt/cache
152-
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
153-
run: |
154-
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
155-
156-
- name: Failure short reports
157-
if: ${{ failure() }}
158-
run: cat reports/tests_torch_mps_failures_short.txt
159-
160-
- name: Test suite reports artifacts
161-
if: ${{ always() }}
162-
uses: actions/upload-artifact@v2
163-
with:
164-
name: pr_torch_mps_test_reports
165-
path: reports

0 commit comments

Comments
 (0)