Skip to content

Commit 0c772aa

Browse files
authored
Merge branch 'huggingface:main' into main
2 parents 98151a5 + 1b48db4 commit 0c772aa

1,448 files changed

Lines changed: 70900 additions & 19150 deletions

File tree

Some content is hidden

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

.github/workflows/benchmark.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@ env:
1111
HF_HOME: /mnt/cache
1212
OMP_NUM_THREADS: 8
1313
MKL_NUM_THREADS: 8
14+
BASE_PATH: benchmark_outputs
1415

1516
jobs:
16-
torch_pipelines_cuda_benchmark_tests:
17+
torch_models_cuda_benchmark_tests:
1718
env:
1819
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_BENCHMARK }}
19-
name: Torch Core Pipelines CUDA Benchmarking Tests
20+
name: Torch Core Models CUDA Benchmarking Tests
2021
strategy:
2122
fail-fast: false
2223
max-parallel: 1
2324
runs-on:
24-
group: aws-g6-4xlarge-plus
25+
group: aws-g6e-4xlarge
2526
container:
2627
image: diffusers/diffusers-pytorch-cuda
27-
options: --shm-size "16gb" --ipc host --gpus 0
28+
options: --shm-size "16gb" --ipc host --gpus all
2829
steps:
2930
- name: Checkout diffusers
3031
uses: actions/checkout@v3
@@ -35,27 +36,47 @@ jobs:
3536
nvidia-smi
3637
- name: Install dependencies
3738
run: |
39+
apt update
40+
apt install -y libpq-dev postgresql-client
3841
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
3942
python -m uv pip install -e [quality,test]
40-
python -m uv pip install pandas peft
41-
python -m uv pip uninstall transformers && python -m uv pip install transformers==4.48.0
43+
python -m uv pip install -r benchmarks/requirements.txt
4244
- name: Environment
4345
run: |
4446
python utils/print_env.py
4547
- name: Diffusers Benchmarking
4648
env:
47-
HF_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }}
48-
BASE_PATH: benchmark_outputs
49+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
4950
run: |
50-
export TOTAL_GPU_MEMORY=$(python -c "import torch; print(torch.cuda.get_device_properties(0).total_memory / (1024**3))")
51-
cd benchmarks && mkdir ${BASE_PATH} && python run_all.py && python push_results.py
51+
cd benchmarks && python run_all.py
52+
53+
- name: Push results to the Hub
54+
env:
55+
HF_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }}
56+
run: |
57+
cd benchmarks && python push_results.py
58+
mkdir $BASE_PATH && cp *.csv $BASE_PATH
5259
5360
- name: Test suite reports artifacts
5461
if: ${{ always() }}
5562
uses: actions/upload-artifact@v4
5663
with:
5764
name: benchmark_test_reports
58-
path: benchmarks/benchmark_outputs
65+
path: benchmarks/${{ env.BASE_PATH }}
66+
67+
# TODO: enable this once the connection problem has been resolved.
68+
- name: Update benchmarking results to DB
69+
env:
70+
PGDATABASE: metrics
71+
PGHOST: ${{ secrets.DIFFUSERS_BENCHMARKS_PGHOST }}
72+
PGUSER: transformers_benchmarks
73+
PGPASSWORD: ${{ secrets.DIFFUSERS_BENCHMARKS_PGPASSWORD }}
74+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
75+
run: |
76+
git config --global --add safe.directory /__w/diffusers/diffusers
77+
commit_id=$GITHUB_SHA
78+
commit_msg=$(git show -s --format=%s "$commit_id" | cut -c1-70)
79+
cd benchmarks && python populate_into_db.py "$BRANCH_NAME" "$commit_id" "$commit_msg"
5980
6081
- name: Report success status
6182
if: ${{ success() }}

.github/workflows/build_docker_images.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ jobs:
7575
- diffusers-pytorch-cuda
7676
- diffusers-pytorch-xformers-cuda
7777
- diffusers-pytorch-minimum-cuda
78-
- diffusers-flax-cpu
79-
- diffusers-flax-tpu
80-
- diffusers-onnxruntime-cpu
81-
- diffusers-onnxruntime-cuda
8278
- diffusers-doc-builder
8379

8480
steps:

.github/workflows/mirror_community_pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ jobs:
7979
8080
# Check secret is set
8181
- name: whoami
82-
run: huggingface-cli whoami
82+
run: hf auth whoami
8383
env:
8484
HF_TOKEN: ${{ secrets.HF_TOKEN_MIRROR_COMMUNITY_PIPELINES }}
8585

8686
# Push to HF! (under subfolder based on checkout ref)
8787
# https://huggingface.co/datasets/diffusers/community-pipelines-mirror
8888
- name: Mirror community pipeline to HF
89-
run: huggingface-cli upload diffusers/community-pipelines-mirror ./examples/community ${PATH_IN_REPO} --repo-type dataset
89+
run: hf upload diffusers/community-pipelines-mirror ./examples/community ${PATH_IN_REPO} --repo-type dataset
9090
env:
9191
PATH_IN_REPO: ${{ env.PATH_IN_REPO }}
9292
HF_TOKEN: ${{ secrets.HF_TOKEN_MIRROR_COMMUNITY_PIPELINES }}

0 commit comments

Comments
 (0)