Skip to content

Commit 5d1e6bf

Browse files
authored
Merge branch 'main' into advdiff_sdxl
2 parents d8ef9ef + c4646a3 commit 5d1e6bf

File tree

1,059 files changed

+126883
-11020
lines changed

Some content is hidden

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

1,059 files changed

+126883
-11020
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/benchmark.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3939
python -m uv pip install -e [quality,test]
4040
python -m uv pip install pandas peft
41+
python -m uv pip uninstall transformers && python -m uv pip install transformers==4.48.0
4142
- name: Environment
4243
run: |
4344
python utils/print_env.py

.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: 134 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,73 @@ jobs:
235235
run: |
236236
pip install slack_sdk tabulate
237237
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
238265
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+
239296
run_flax_tpu_tests:
240297
name: Nightly Flax TPU Tests
241-
runs-on: docker-tpu
298+
runs-on:
299+
group: gcp-ct5lp-hightpu-8t
242300
if: github.event_name == 'schedule'
243301

244302
container:
245303
image: diffusers/diffusers-flax-tpu
246-
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
247305
defaults:
248306
run:
249307
shell: bash
@@ -347,6 +405,77 @@ jobs:
347405
pip install slack_sdk tabulate
348406
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
349407
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+
additional_deps: ["peft"]
418+
- backend: "gguf"
419+
test_location: "gguf"
420+
additional_deps: []
421+
- backend: "torchao"
422+
test_location: "torchao"
423+
additional_deps: []
424+
- backend: "optimum_quanto"
425+
test_location: "quanto"
426+
additional_deps: []
427+
runs-on:
428+
group: aws-g6e-xlarge-plus
429+
container:
430+
image: diffusers/diffusers-pytorch-cuda
431+
options: --shm-size "20gb" --ipc host --gpus 0
432+
steps:
433+
- name: Checkout diffusers
434+
uses: actions/checkout@v3
435+
with:
436+
fetch-depth: 2
437+
- name: NVIDIA-SMI
438+
run: nvidia-smi
439+
- name: Install dependencies
440+
run: |
441+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
442+
python -m uv pip install -e [quality,test]
443+
python -m uv pip install -U ${{ matrix.config.backend }}
444+
if [ "${{ join(matrix.config.additional_deps, ' ') }}" != "" ]; then
445+
python -m uv pip install ${{ join(matrix.config.additional_deps, ' ') }}
446+
fi
447+
python -m uv pip install pytest-reportlog
448+
- name: Environment
449+
run: |
450+
python utils/print_env.py
451+
- name: ${{ matrix.config.backend }} quantization tests on GPU
452+
env:
453+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
454+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
455+
CUBLAS_WORKSPACE_CONFIG: :16:8
456+
BIG_GPU_MEMORY: 40
457+
run: |
458+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
459+
--make-reports=tests_${{ matrix.config.backend }}_torch_cuda \
460+
--report-log=tests_${{ matrix.config.backend }}_torch_cuda.log \
461+
tests/quantization/${{ matrix.config.test_location }}
462+
- name: Failure short reports
463+
if: ${{ failure() }}
464+
run: |
465+
cat reports/tests_${{ matrix.config.backend }}_torch_cuda_stats.txt
466+
cat reports/tests_${{ matrix.config.backend }}_torch_cuda_failures_short.txt
467+
- name: Test suite reports artifacts
468+
if: ${{ always() }}
469+
uses: actions/upload-artifact@v4
470+
with:
471+
name: torch_cuda_${{ matrix.config.backend }}_reports
472+
path: reports
473+
- name: Generate Report and Notify Channel
474+
if: always()
475+
run: |
476+
pip install slack_sdk tabulate
477+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
478+
350479
# M1 runner currently not well supported
351480
# TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
352481
# run_nightly_tests_apple_m1:
@@ -385,7 +514,7 @@ jobs:
385514
# shell: arch -arch arm64 bash {0}
386515
# env:
387516
# HF_HOME: /System/Volumes/Data/mnt/cache
388-
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
517+
# HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
389518
# run: |
390519
# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
391520
# --report-log=tests_torch_mps.log \
@@ -441,7 +570,7 @@ jobs:
441570
# shell: arch -arch arm64 bash {0}
442571
# env:
443572
# HF_HOME: /System/Volumes/Data/mnt/cache
444-
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
573+
# HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
445574
# run: |
446575
# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
447576
# --report-log=tests_torch_mps.log \
@@ -461,4 +590,4 @@ jobs:
461590
# if: always()
462591
# run: |
463592
# pip install slack_sdk tabulate
464-
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
593+
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY

.github/workflows/pr_style_bot.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
style:
13+
uses: huggingface/huggingface_hub/.github/workflows/style-bot-action.yml@main
14+
with:
15+
python_quality_dependencies: "[quality]"
16+
pre_commit_script_name: "Download and Compare files from the main branch"
17+
pre_commit_script: |
18+
echo "Downloading the files from the main branch"
19+
20+
curl -o main_Makefile https://raw.githubusercontent.com/huggingface/diffusers/main/Makefile
21+
curl -o main_setup.py https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/setup.py
22+
curl -o main_check_doc_toc.py https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/utils/check_doc_toc.py
23+
24+
echo "Compare the files and raise error if needed"
25+
26+
diff_failed=0
27+
if ! diff -q main_Makefile Makefile; then
28+
echo "Error: The Makefile has changed. Please ensure it matches the main branch."
29+
diff_failed=1
30+
fi
31+
32+
if ! diff -q main_setup.py setup.py; then
33+
echo "Error: The setup.py has changed. Please ensure it matches the main branch."
34+
diff_failed=1
35+
fi
36+
37+
if ! diff -q main_check_doc_toc.py utils/check_doc_toc.py; then
38+
echo "Error: The utils/check_doc_toc.py has changed. Please ensure it matches the main branch."
39+
diff_failed=1
40+
fi
41+
42+
if [ $diff_failed -eq 1 ]; then
43+
echo "❌ Error happened as we detected changes in the files that should not be changed ❌"
44+
exit 1
45+
fi
46+
47+
echo "No changes in the files. Proceeding..."
48+
rm -rf main_Makefile main_setup.py main_check_doc_toc.py
49+
style_command: "make style && make quality"
50+
secrets:
51+
bot_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)