Skip to content

Commit 7f0942a

Browse files
committed
Merge branch 'main' into pr-test-speed-up
2 parents d87907d + 9c3b58d commit 7f0942a

File tree

1,239 files changed

+72843
-21056
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,239 files changed

+72843
-21056
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
DIFFUSERS_IS_CI: yes
10-
HF_HUB_ENABLE_HF_TRANSFER: 1
10+
HF_XET_HIGH_PERFORMANCE: 1
1111
HF_HOME: /mnt/cache
1212
OMP_NUM_THREADS: 8
1313
MKL_NUM_THREADS: 8
@@ -25,7 +25,7 @@ jobs:
2525
group: aws-g6e-4xlarge
2626
container:
2727
image: diffusers/diffusers-pytorch-cuda
28-
options: --shm-size "16gb" --ipc host --gpus 0
28+
options: --shm-size "16gb" --ipc host --gpus all
2929
steps:
3030
- name: Checkout diffusers
3131
uses: actions/checkout@v3
@@ -38,9 +38,8 @@ jobs:
3838
run: |
3939
apt update
4040
apt install -y libpq-dev postgresql-client
41-
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
42-
python -m uv pip install -e [quality,test]
43-
python -m uv pip install -r benchmarks/requirements.txt
41+
uv pip install -e ".[quality]"
42+
uv pip install -r benchmarks/requirements.txt
4443
- name: Environment
4544
run: |
4645
python utils/print_env.py

.github/workflows/build_docker_images.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,39 @@ jobs:
4242
CHANGED_FILES: ${{ steps.file_changes.outputs.all }}
4343
run: |
4444
echo "$CHANGED_FILES"
45-
for FILE in $CHANGED_FILES; do
45+
ALLOWED_IMAGES=(
46+
diffusers-pytorch-cpu
47+
diffusers-pytorch-cuda
48+
diffusers-pytorch-xformers-cuda
49+
diffusers-pytorch-minimum-cuda
50+
diffusers-doc-builder
51+
)
52+
53+
declare -A IMAGES_TO_BUILD=()
54+
55+
for FILE in $CHANGED_FILES; do
4656
# skip anything that isn't still on disk
47-
if [[ ! -f "$FILE" ]]; then
57+
if [[ ! -e "$FILE" ]]; then
4858
echo "Skipping removed file $FILE"
4959
continue
50-
fi
51-
if [[ "$FILE" == docker/*Dockerfile ]]; then
52-
DOCKER_PATH="${FILE%/Dockerfile}"
53-
DOCKER_TAG=$(basename "$DOCKER_PATH")
54-
echo "Building Docker image for $DOCKER_TAG"
55-
docker build -t "$DOCKER_TAG" "$DOCKER_PATH"
5660
fi
61+
62+
for IMAGE in "${ALLOWED_IMAGES[@]}"; do
63+
if [[ "$FILE" == docker/${IMAGE}/* ]]; then
64+
IMAGES_TO_BUILD["$IMAGE"]=1
65+
fi
66+
done
67+
done
68+
69+
if [[ ${#IMAGES_TO_BUILD[@]} -eq 0 ]]; then
70+
echo "No relevant Docker changes detected."
71+
exit 0
72+
fi
73+
74+
for IMAGE in "${!IMAGES_TO_BUILD[@]}"; do
75+
DOCKER_PATH="docker/${IMAGE}"
76+
echo "Building Docker image for $IMAGE"
77+
docker build -t "$IMAGE" "$DOCKER_PATH"
5778
done
5879
if: steps.file_changes.outputs.all != ''
5980

@@ -72,7 +93,6 @@ jobs:
7293
image-name:
7394
- diffusers-pytorch-cpu
7495
- diffusers-pytorch-cuda
75-
- diffusers-pytorch-cuda
7696
- diffusers-pytorch-xformers-cuda
7797
- diffusers-pytorch-minimum-cuda
7898
- diffusers-doc-builder

.github/workflows/build_pr_documentation.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,33 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15+
check-links:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.10'
26+
27+
- name: Install uv
28+
run: |
29+
curl -LsSf https://astral.sh/uv/install.sh | sh
30+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
31+
32+
- name: Install doc-builder
33+
run: |
34+
uv pip install --system git+https://github.com/huggingface/doc-builder.git@main
35+
36+
- name: Check documentation links
37+
run: |
38+
uv run doc-builder check-links docs/source/en
39+
1540
build:
41+
needs: check-links
1642
uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main
1743
with:
1844
commit_sha: ${{ github.event.pull_request.head.sha }}

.github/workflows/mirror_community_pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ jobs:
7474
python-version: "3.10"
7575
- name: Install dependencies
7676
run: |
77-
python -m pip install --upgrade pip
77+
pip install --upgrade pip
7878
pip install --upgrade huggingface_hub
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)