Skip to content

Commit 2ce3713

Browse files
Merge pull request #9 from Snailpong/v0.17
V0.17
2 parents 179174e + a6238e5 commit 2ce3713

File tree

302 files changed

+38088
-5350
lines changed

Some content is hidden

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

302 files changed

+38088
-5350
lines changed

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
- doc-builder*
8-
- v*-release
8+
- v*-patch
99

1010
jobs:
1111
build:

.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

.github/workflows/push_tests_mps.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Fast mps tests on main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
DIFFUSERS_IS_CI: yes
10+
HF_HOME: /mnt/cache
11+
OMP_NUM_THREADS: 8
12+
MKL_NUM_THREADS: 8
13+
PYTEST_TIMEOUT: 600
14+
RUN_SLOW: no
15+
16+
jobs:
17+
run_fast_tests_apple_m1:
18+
name: Fast PyTorch MPS tests on MacOS
19+
runs-on: [ self-hosted, apple-m1 ]
20+
21+
steps:
22+
- name: Checkout diffusers
23+
uses: actions/checkout@v3
24+
with:
25+
fetch-depth: 2
26+
27+
- name: Clean checkout
28+
shell: arch -arch arm64 bash {0}
29+
run: |
30+
git clean -fxd
31+
32+
- name: Setup miniconda
33+
uses: ./.github/actions/setup-miniconda
34+
with:
35+
python-version: 3.9
36+
37+
- name: Install dependencies
38+
shell: arch -arch arm64 bash {0}
39+
run: |
40+
${CONDA_RUN} python -m pip install --upgrade pip
41+
${CONDA_RUN} python -m pip install -e .[quality,test]
42+
${CONDA_RUN} python -m pip install torch torchvision torchaudio
43+
${CONDA_RUN} python -m pip install accelerate --upgrade
44+
${CONDA_RUN} python -m pip install transformers --upgrade
45+
46+
- name: Environment
47+
shell: arch -arch arm64 bash {0}
48+
run: |
49+
${CONDA_RUN} python utils/print_env.py
50+
51+
- name: Run fast PyTorch tests on M1 (MPS)
52+
shell: arch -arch arm64 bash {0}
53+
env:
54+
HF_HOME: /System/Volumes/Data/mnt/cache
55+
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
56+
run: |
57+
${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/
58+
59+
- name: Failure short reports
60+
if: ${{ failure() }}
61+
run: cat reports/tests_torch_mps_failures_short.txt
62+
63+
- name: Test suite reports artifacts
64+
if: ${{ always() }}
65+
uses: actions/upload-artifact@v2
66+
with:
67+
name: pr_torch_mps_test_reports
68+
path: reports

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ Awesome! Tell us what problem it solved for you.
125125

126126
You can open a feature request [here](https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feature_request.md&title=).
127127

128-
#### 2.3 Feedback.
128+
#### 2.3 Feedback.
129129

130130
Feedback about the library design and why it is good or not good helps the core maintainers immensely to build a user-friendly library. To understand the philosophy behind the current design philosophy, please have a look [here](https://huggingface.co/docs/diffusers/conceptual/philosophy). If you feel like a certain design choice does not fit with the current design philosophy, please explain why and how it should be changed. If a certain design choice follows the design philosophy too much, hence restricting use cases, explain why and how it should be changed.
131131
If a certain design choice is very useful for you, please also leave a note as this is great feedback for future design decisions.
132132

133133
You can open an issue about feedback [here](https://github.com/huggingface/diffusers/issues/new?assignees=&labels=&template=feedback.md&title=).
134134

135-
#### 2.4 Technical questions.
135+
#### 2.4 Technical questions.
136136

137137
Technical questions are mainly about why certain code of the library was written in a certain way, or what a certain part of the code does. Please make sure to link to the code in question and please provide detail on
138138
why this part of the code is difficult to understand.
@@ -394,8 +394,8 @@ passes. You should run the tests impacted by your changes like this:
394394
```bash
395395
$ pytest tests/<TEST_TO_RUN>.py
396396
```
397-
398-
Before you run the tests, please make sure you install the dependencies required for testing. You can do so
397+
398+
Before you run the tests, please make sure you install the dependencies required for testing. You can do so
399399
with this command:
400400

401401
```bash

0 commit comments

Comments
 (0)