Skip to content

Commit 58b35ba

Browse files
Merge branch 'main' into lora-hot-swapping
2 parents ac1346d + 9f28f1a commit 58b35ba

File tree

916 files changed

+93829
-10827
lines changed

Some content is hidden

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

916 files changed

+93829
-10827
lines changed

.github/workflows/build_docker_images.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
id: file_changes
3535
uses: jitterbit/get-changed-files@v1
3636
with:
37-
format: 'space-delimited'
37+
format: "space-delimited"
3838
token: ${{ secrets.GITHUB_TOKEN }}
3939

4040
- name: Build Changed Docker Images
@@ -67,6 +67,7 @@ jobs:
6767
- diffusers-pytorch-cuda
6868
- diffusers-pytorch-compile-cuda
6969
- diffusers-pytorch-xformers-cuda
70+
- diffusers-pytorch-minimum-cuda
7071
- diffusers-flax-cpu
7172
- diffusers-flax-tpu
7273
- diffusers-onnxruntime-cpu

.github/workflows/nightly_tests.yml

Lines changed: 181 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,128 @@ jobs:
180180
pip install slack_sdk tabulate
181181
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
182182
183+
run_big_gpu_torch_tests:
184+
name: Torch tests on big GPU
185+
strategy:
186+
fail-fast: false
187+
max-parallel: 2
188+
runs-on:
189+
group: aws-g6e-xlarge-plus
190+
container:
191+
image: diffusers/diffusers-pytorch-cuda
192+
options: --shm-size "16gb" --ipc host --gpus 0
193+
steps:
194+
- name: Checkout diffusers
195+
uses: actions/checkout@v3
196+
with:
197+
fetch-depth: 2
198+
- name: NVIDIA-SMI
199+
run: nvidia-smi
200+
- name: Install dependencies
201+
run: |
202+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
203+
python -m uv pip install -e [quality,test]
204+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
205+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
206+
python -m uv pip install pytest-reportlog
207+
- name: Environment
208+
run: |
209+
python utils/print_env.py
210+
- name: Selected Torch CUDA Test on big GPU
211+
env:
212+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
213+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
214+
CUBLAS_WORKSPACE_CONFIG: :16:8
215+
BIG_GPU_MEMORY: 40
216+
run: |
217+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
218+
-m "big_gpu_with_torch_cuda" \
219+
--make-reports=tests_big_gpu_torch_cuda \
220+
--report-log=tests_big_gpu_torch_cuda.log \
221+
tests/
222+
- name: Failure short reports
223+
if: ${{ failure() }}
224+
run: |
225+
cat reports/tests_big_gpu_torch_cuda_stats.txt
226+
cat reports/tests_big_gpu_torch_cuda_failures_short.txt
227+
- name: Test suite reports artifacts
228+
if: ${{ always() }}
229+
uses: actions/upload-artifact@v4
230+
with:
231+
name: torch_cuda_big_gpu_test_reports
232+
path: reports
233+
- name: Generate Report and Notify Channel
234+
if: always()
235+
run: |
236+
pip install slack_sdk tabulate
237+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
238+
239+
torch_minimum_version_cuda_tests:
240+
name: Torch Minimum Version CUDA Tests
241+
runs-on:
242+
group: aws-g4dn-2xlarge
243+
container:
244+
image: diffusers/diffusers-pytorch-minimum-cuda
245+
options: --shm-size "16gb" --ipc host --gpus 0
246+
defaults:
247+
run:
248+
shell: bash
249+
steps:
250+
- name: Checkout diffusers
251+
uses: actions/checkout@v3
252+
with:
253+
fetch-depth: 2
254+
255+
- name: Install dependencies
256+
run: |
257+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
258+
python -m uv pip install -e [quality,test]
259+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
260+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
261+
262+
- name: Environment
263+
run: |
264+
python utils/print_env.py
265+
266+
- name: Run PyTorch CUDA tests
267+
env:
268+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
269+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
270+
CUBLAS_WORKSPACE_CONFIG: :16:8
271+
run: |
272+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
273+
-s -v -k "not Flax and not Onnx" \
274+
--make-reports=tests_torch_minimum_version_cuda \
275+
tests/models/test_modeling_common.py \
276+
tests/pipelines/test_pipelines_common.py \
277+
tests/pipelines/test_pipeline_utils.py \
278+
tests/pipelines/test_pipelines.py \
279+
tests/pipelines/test_pipelines_auto.py \
280+
tests/schedulers/test_schedulers.py \
281+
tests/others
282+
283+
- name: Failure short reports
284+
if: ${{ failure() }}
285+
run: |
286+
cat reports/tests_torch_minimum_version_cuda_stats.txt
287+
cat reports/tests_torch_minimum_version_cuda_failures_short.txt
288+
289+
- name: Test suite reports artifacts
290+
if: ${{ always() }}
291+
uses: actions/upload-artifact@v4
292+
with:
293+
name: torch_minimum_version_cuda_test_reports
294+
path: reports
295+
183296
run_flax_tpu_tests:
184297
name: Nightly Flax TPU Tests
185-
runs-on: docker-tpu
298+
runs-on:
299+
group: gcp-ct5lp-hightpu-8t
186300
if: github.event_name == 'schedule'
187301

188302
container:
189303
image: diffusers/diffusers-flax-tpu
190-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --privileged
304+
options: --shm-size "16gb" --ipc host --privileged ${{ vars.V5_LITEPOD_8_ENV}} -v /mnt/hf_cache:/mnt/hf_cache
191305
defaults:
192306
run:
193307
shell: bash
@@ -291,6 +405,68 @@ jobs:
291405
pip install slack_sdk tabulate
292406
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
293407
408+
run_nightly_quantization_tests:
409+
name: Torch quantization nightly tests
410+
strategy:
411+
fail-fast: false
412+
max-parallel: 2
413+
matrix:
414+
config:
415+
- backend: "bitsandbytes"
416+
test_location: "bnb"
417+
- backend: "gguf"
418+
test_location: "gguf"
419+
- backend: "torchao"
420+
test_location: "torchao"
421+
runs-on:
422+
group: aws-g6e-xlarge-plus
423+
container:
424+
image: diffusers/diffusers-pytorch-cuda
425+
options: --shm-size "20gb" --ipc host --gpus 0
426+
steps:
427+
- name: Checkout diffusers
428+
uses: actions/checkout@v3
429+
with:
430+
fetch-depth: 2
431+
- name: NVIDIA-SMI
432+
run: nvidia-smi
433+
- name: Install dependencies
434+
run: |
435+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
436+
python -m uv pip install -e [quality,test]
437+
python -m uv pip install -U ${{ matrix.config.backend }}
438+
python -m uv pip install pytest-reportlog
439+
- name: Environment
440+
run: |
441+
python utils/print_env.py
442+
- name: ${{ matrix.config.backend }} quantization tests on GPU
443+
env:
444+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
445+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
446+
CUBLAS_WORKSPACE_CONFIG: :16:8
447+
BIG_GPU_MEMORY: 40
448+
run: |
449+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
450+
--make-reports=tests_${{ matrix.config.backend }}_torch_cuda \
451+
--report-log=tests_${{ matrix.config.backend }}_torch_cuda.log \
452+
tests/quantization/${{ matrix.config.test_location }}
453+
- name: Failure short reports
454+
if: ${{ failure() }}
455+
run: |
456+
cat reports/tests_${{ matrix.config.backend }}_torch_cuda_stats.txt
457+
cat reports/tests_${{ matrix.config.backend }}_torch_cuda_failures_short.txt
458+
- name: Test suite reports artifacts
459+
if: ${{ always() }}
460+
uses: actions/upload-artifact@v4
461+
with:
462+
name: torch_cuda_${{ matrix.config.backend }}_reports
463+
path: reports
464+
- name: Generate Report and Notify Channel
465+
if: always()
466+
run: |
467+
pip install slack_sdk tabulate
468+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
469+
294470
# M1 runner currently not well supported
295471
# TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
296472
# run_nightly_tests_apple_m1:
@@ -329,7 +505,7 @@ jobs:
329505
# shell: arch -arch arm64 bash {0}
330506
# env:
331507
# HF_HOME: /System/Volumes/Data/mnt/cache
332-
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
508+
# HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
333509
# run: |
334510
# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
335511
# --report-log=tests_torch_mps.log \
@@ -385,7 +561,7 @@ jobs:
385561
# shell: arch -arch arm64 bash {0}
386562
# env:
387563
# HF_HOME: /System/Volumes/Data/mnt/cache
388-
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
564+
# HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
389565
# run: |
390566
# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
391567
# --report-log=tests_torch_mps.log \
@@ -405,4 +581,4 @@ jobs:
405581
# if: always()
406582
# run: |
407583
# pip install slack_sdk tabulate
408-
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
584+
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY

.github/workflows/pr_test_peft_backend.yml

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

0 commit comments

Comments
 (0)