Skip to content

Commit 7811185

Browse files
authored
Merge branch 'huggingface:main' into main
2 parents 11a4491 + 49b959b commit 7811185

File tree

249 files changed

+25504
-5132
lines changed

Some content is hidden

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

249 files changed

+25504
-5132
lines changed

.github/workflows/benchmark.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
nvidia-smi
3232
- name: Install dependencies
3333
run: |
34-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
3534
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3635
python -m uv pip install -e [quality,test]
3736
python -m uv pip install pandas peft

.github/workflows/build_docker_images.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020

2121
jobs:
2222
test-build-docker-images:
23-
runs-on: ubuntu-latest
23+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
2424
if: github.event_name == 'pull_request'
2525
steps:
2626
- name: Set up Docker Buildx
@@ -50,7 +50,7 @@ jobs:
5050
if: steps.file_changes.outputs.all != ''
5151

5252
build-and-push-docker-images:
53-
runs-on: ubuntu-latest
53+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
5454
if: github.event_name != 'pull_request'
5555

5656
permissions:
@@ -73,13 +73,13 @@ jobs:
7373
steps:
7474
- name: Checkout repository
7575
uses: actions/checkout@v3
76-
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v1
7778
- name: Login to Docker Hub
7879
uses: docker/login-action@v2
7980
with:
8081
username: ${{ env.REGISTRY }}
8182
password: ${{ secrets.DOCKERHUB_TOKEN }}
82-
8383
- name: Build and push
8484
uses: docker/build-push-action@v3
8585
with:

.github/workflows/nightly_tests.yml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
jobs:
2020
setup_torch_cuda_pipeline_matrix:
2121
name: Setup Torch Pipelines Matrix
22-
runs-on: ubuntu-latest
22+
runs-on: diffusers/diffusers-pytorch-cpu
2323
outputs:
2424
pipeline_test_matrix: ${{ steps.fetch_pipeline_matrix.outputs.pipeline_test_matrix }}
2525
steps:
@@ -67,20 +67,19 @@ jobs:
6767
fetch-depth: 2
6868
- name: NVIDIA-SMI
6969
run: nvidia-smi
70-
70+
7171
- name: Install dependencies
7272
run: |
73-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
7473
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7574
python -m uv pip install -e [quality,test]
7675
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
7776
python -m uv pip install pytest-reportlog
78-
77+
7978
- name: Environment
8079
run: |
8180
python utils/print_env.py
82-
83-
- name: Nightly PyTorch CUDA checkpoint (pipelines) tests
81+
82+
- name: Nightly PyTorch CUDA checkpoint (pipelines) tests
8483
env:
8584
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
8685
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
@@ -89,9 +88,9 @@ jobs:
8988
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
9089
-s -v -k "not Flax and not Onnx" \
9190
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
92-
--report-log=tests_pipeline_${{ matrix.module }}_cuda.log \
91+
--report-log=tests_pipeline_${{ matrix.module }}_cuda.log \
9392
tests/pipelines/${{ matrix.module }}
94-
93+
9594
- name: Failure short reports
9695
if: ${{ failure() }}
9796
run: |
@@ -104,7 +103,7 @@ jobs:
104103
with:
105104
name: pipeline_${{ matrix.module }}_test_reports
106105
path: reports
107-
106+
108107
- name: Generate Report and Notify Channel
109108
if: always()
110109
run: |
@@ -113,7 +112,7 @@ jobs:
113112
114113
run_nightly_tests_for_other_torch_modules:
115114
name: Torch Non-Pipelines CUDA Nightly Tests
116-
runs-on: docker-gpu
115+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
117116
container:
118117
image: diffusers/diffusers-pytorch-cuda
119118
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
@@ -131,7 +130,6 @@ jobs:
131130

132131
- name: Install dependencies
133132
run: |
134-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
135133
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
136134
python -m uv pip install -e [quality,test]
137135
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -141,7 +139,7 @@ jobs:
141139
run: python utils/print_env.py
142140

143141
- name: Run nightly PyTorch CUDA tests for non-pipeline modules
144-
if: ${{ matrix.module != 'examples'}}
142+
if: ${{ matrix.module != 'examples'}}
145143
env:
146144
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
147145
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
@@ -150,7 +148,7 @@ jobs:
150148
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
151149
-s -v -k "not Flax and not Onnx" \
152150
--make-reports=tests_torch_${{ matrix.module }}_cuda \
153-
--report-log=tests_torch_${{ matrix.module }}_cuda.log \
151+
--report-log=tests_torch_${{ matrix.module }}_cuda.log \
154152
tests/${{ matrix.module }}
155153
156154
- name: Run nightly example tests with Torch
@@ -163,13 +161,13 @@ jobs:
163161
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
164162
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
165163
-s -v --make-reports=examples_torch_cuda \
166-
--report-log=examples_torch_cuda.log \
164+
--report-log=examples_torch_cuda.log \
167165
examples/
168166
169167
- name: Failure short reports
170168
if: ${{ failure() }}
171169
run: |
172-
cat reports/tests_torch_${{ matrix.module }}_cuda_stats.txt
170+
cat reports/tests_torch_${{ matrix.module }}_cuda_stats.txt
173171
cat reports/tests_torch_${{ matrix.module }}_cuda_failures_short.txt
174172
175173
- name: Test suite reports artifacts
@@ -187,7 +185,7 @@ jobs:
187185
188186
run_lora_nightly_tests:
189187
name: Nightly LoRA Tests with PEFT and TORCH
190-
runs-on: docker-gpu
188+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
191189
container:
192190
image: diffusers/diffusers-pytorch-cuda
193191
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
@@ -202,7 +200,6 @@ jobs:
202200

203201
- name: Install dependencies
204202
run: |
205-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
206203
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
207204
python -m uv pip install -e [quality,test]
208205
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -221,13 +218,13 @@ jobs:
221218
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
222219
-s -v -k "not Flax and not Onnx" \
223220
--make-reports=tests_torch_lora_cuda \
224-
--report-log=tests_torch_lora_cuda.log \
221+
--report-log=tests_torch_lora_cuda.log \
225222
tests/lora
226-
223+
227224
- name: Failure short reports
228225
if: ${{ failure() }}
229226
run: |
230-
cat reports/tests_torch_lora_cuda_stats.txt
227+
cat reports/tests_torch_lora_cuda_stats.txt
231228
cat reports/tests_torch_lora_cuda_failures_short.txt
232229
233230
- name: Test suite reports artifacts
@@ -242,12 +239,12 @@ jobs:
242239
run: |
243240
pip install slack_sdk tabulate
244241
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
245-
242+
246243
run_flax_tpu_tests:
247244
name: Nightly Flax TPU Tests
248245
runs-on: docker-tpu
249246
if: github.event_name == 'schedule'
250-
247+
251248
container:
252249
image: diffusers/diffusers-flax-tpu
253250
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --privileged
@@ -262,7 +259,6 @@ jobs:
262259

263260
- name: Install dependencies
264261
run: |
265-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
266262
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
267263
python -m uv pip install -e [quality,test]
268264
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
@@ -278,7 +274,7 @@ jobs:
278274
python -m pytest -n 0 \
279275
-s -v -k "Flax" \
280276
--make-reports=tests_flax_tpu \
281-
--report-log=tests_flax_tpu.log \
277+
--report-log=tests_flax_tpu.log \
282278
tests/
283279
284280
- name: Failure short reports
@@ -302,11 +298,11 @@ jobs:
302298
303299
run_nightly_onnx_tests:
304300
name: Nightly ONNXRuntime CUDA tests on Ubuntu
305-
runs-on: docker-gpu
301+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
306302
container:
307303
image: diffusers/diffusers-onnxruntime-cuda
308304
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
309-
305+
310306
steps:
311307
- name: Checkout diffusers
312308
uses: actions/checkout@v3
@@ -325,15 +321,15 @@ jobs:
325321
326322
- name: Environment
327323
run: python utils/print_env.py
328-
324+
329325
- name: Run nightly ONNXRuntime CUDA tests
330326
env:
331327
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
332328
run: |
333329
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
334330
-s -v -k "Onnx" \
335331
--make-reports=tests_onnx_cuda \
336-
--report-log=tests_onnx_cuda.log \
332+
--report-log=tests_onnx_cuda.log \
337333
tests/
338334
339335
- name: Failure short reports
@@ -348,7 +344,7 @@ jobs:
348344
with:
349345
name: ${{ matrix.config.report }}_test_reports
350346
path: reports
351-
347+
352348
- name: Generate Report and Notify Channel
353349
if: always()
354350
run: |

.github/workflows/pr_test_fetcher.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
setup_pr_tests:
1717
name: Setup PR Tests
18-
runs-on: docker-cpu
18+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
1919
container:
2020
image: diffusers/diffusers-pytorch-cpu
2121
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
@@ -32,7 +32,6 @@ jobs:
3232
fetch-depth: 0
3333
- name: Install dependencies
3434
run: |
35-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
3635
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3736
python -m uv pip install -e [quality,test]
3837
- name: Environment
@@ -74,7 +73,7 @@ jobs:
7473
max-parallel: 2
7574
matrix:
7675
modules: ${{ fromJson(needs.setup_pr_tests.outputs.matrix) }}
77-
runs-on: docker-cpu
76+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
7877
container:
7978
image: diffusers/diffusers-pytorch-cpu
8079
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
@@ -89,7 +88,6 @@ jobs:
8988

9089
- name: Install dependencies
9190
run: |
92-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
9391
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
9492
python -m pip install -e [quality,test]
9593
python -m pip install accelerate
@@ -125,7 +123,7 @@ jobs:
125123
config:
126124
- name: Hub tests for models, schedulers, and pipelines
127125
framework: hub_tests_pytorch
128-
runner: docker-cpu
126+
runner: [ self-hosted, intel-cpu, 8-cpu, ci ]
129127
image: diffusers/diffusers-pytorch-cpu
130128
report: torch_hub
131129

@@ -147,7 +145,6 @@ jobs:
147145

148146
- name: Install dependencies
149147
run: |
150-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
151148
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
152149
python -m pip install -e [quality,test]
153150

.github/workflows/pr_test_peft_backend.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ jobs:
8989

9090
- name: Install dependencies
9191
run: |
92-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
9392
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
9493
python -m uv pip install -e [quality,test]
9594
if [ "${{ matrix.lib-versions }}" == "main" ]; then
96-
python -m uv pip install -U peft@git+https://github.com/huggingface/peft.git
95+
python -m pip install -U peft@git+https://github.com/huggingface/peft.git
9796
python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git
9897
python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
9998
else

.github/workflows/pr_tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ jobs:
116116

117117
- name: Install dependencies
118118
run: |
119-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
120119
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
121120
python -m uv pip install -e [quality,test]
122121
python -m uv pip install accelerate
@@ -205,7 +204,6 @@ jobs:
205204

206205
- name: Install dependencies
207206
run: |
208-
apt-get update && apt-get install libsndfile1-dev libgl1 -y
209207
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
210208
python -m uv pip install -e [quality,test]
211209

0 commit comments

Comments
 (0)