Skip to content

Commit 5663ba5

Browse files
committed
fix
2 parents 45daa98 + 6695635 commit 5663ba5

File tree

170 files changed

+7831
-2979
lines changed

Some content is hidden

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

170 files changed

+7831
-2979
lines changed

.github/workflows/nightly_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
113113
run_nightly_tests_for_other_torch_modules:
114114
name: Torch Non-Pipelines CUDA Nightly Tests
115-
runs-on: docker-gpu
115+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
116116
container:
117117
image: diffusers/diffusers-pytorch-cuda
118118
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
@@ -185,7 +185,7 @@ jobs:
185185
186186
run_lora_nightly_tests:
187187
name: Nightly LoRA Tests with PEFT and TORCH
188-
runs-on: docker-gpu
188+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
189189
container:
190190
image: diffusers/diffusers-pytorch-cuda
191191
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
@@ -298,7 +298,7 @@ jobs:
298298
299299
run_nightly_onnx_tests:
300300
name: Nightly ONNXRuntime CUDA tests on Ubuntu
301-
runs-on: docker-gpu
301+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
302302
container:
303303
image: diffusers/diffusers-onnxruntime-cuda
304304
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/

.github/workflows/pr_test_fetcher.yml

Lines changed: 3 additions & 3 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/
@@ -73,7 +73,7 @@ jobs:
7373
max-parallel: 2
7474
matrix:
7575
modules: ${{ fromJson(needs.setup_pr_tests.outputs.matrix) }}
76-
runs-on: docker-cpu
76+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
7777
container:
7878
image: diffusers/diffusers-pytorch-cpu
7979
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
@@ -123,7 +123,7 @@ jobs:
123123
config:
124124
- name: Hub tests for models, schedulers, and pipelines
125125
framework: hub_tests_pytorch
126-
runner: docker-cpu
126+
runner: [ self-hosted, intel-cpu, 8-cpu, ci ]
127127
image: diffusers/diffusers-pytorch-cpu
128128
report: torch_hub
129129

.github/workflows/push_tests.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,23 @@ env:
2121
jobs:
2222
setup_torch_cuda_pipeline_matrix:
2323
name: Setup Torch Pipelines CUDA Slow Tests Matrix
24-
runs-on: diffusers/diffusers-pytorch-cpu
24+
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
25+
container:
26+
image: diffusers/diffusers-pytorch-cpu
2527
outputs:
2628
pipeline_test_matrix: ${{ steps.fetch_pipeline_matrix.outputs.pipeline_test_matrix }}
2729
steps:
2830
- name: Checkout diffusers
2931
uses: actions/checkout@v3
3032
with:
3133
fetch-depth: 2
32-
- name: Set up Python
33-
uses: actions/setup-python@v4
34-
with:
35-
python-version: "3.8"
3634
- name: Install dependencies
3735
run: |
38-
pip install -e .
39-
pip install huggingface_hub
36+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
37+
python -m uv pip install -e [quality,test]
38+
- name: Environment
39+
run: |
40+
python utils/print_env.py
4041
- name: Fetch Pipeline Matrix
4142
id: fetch_pipeline_matrix
4243
run: |
@@ -55,12 +56,13 @@ jobs:
5556
needs: setup_torch_cuda_pipeline_matrix
5657
strategy:
5758
fail-fast: false
59+
max-parallel: 8
5860
matrix:
5961
module: ${{ fromJson(needs.setup_torch_cuda_pipeline_matrix.outputs.pipeline_test_matrix) }}
6062
runs-on: [single-gpu, nvidia-gpu, t4, ci]
6163
container:
6264
image: diffusers/diffusers-pytorch-cuda
63-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0 --privileged
65+
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0 --privileged
6466
steps:
6567
- name: Checkout diffusers
6668
uses: actions/checkout@v3
@@ -114,16 +116,16 @@ jobs:
114116

115117
torch_cuda_tests:
116118
name: Torch CUDA Tests
117-
runs-on: docker-gpu
119+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
118120
container:
119121
image: diffusers/diffusers-pytorch-cuda
120-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
122+
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
121123
defaults:
122124
run:
123125
shell: bash
124126
strategy:
125127
matrix:
126-
module: [models, schedulers, lora, others]
128+
module: [models, schedulers, lora, others, single_file]
127129
steps:
128130
- name: Checkout diffusers
129131
uses: actions/checkout@v3
@@ -166,10 +168,10 @@ jobs:
166168

167169
peft_cuda_tests:
168170
name: PEFT CUDA Tests
169-
runs-on: docker-gpu
171+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
170172
container:
171173
image: diffusers/diffusers-pytorch-cuda
172-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
174+
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
173175
defaults:
174176
run:
175177
shell: bash
@@ -219,7 +221,7 @@ jobs:
219221
runs-on: docker-tpu
220222
container:
221223
image: diffusers/diffusers-flax-tpu
222-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --privileged
224+
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ --privileged
223225
defaults:
224226
run:
225227
shell: bash
@@ -263,10 +265,10 @@ jobs:
263265

264266
onnx_cuda_tests:
265267
name: ONNX CUDA Tests
266-
runs-on: docker-gpu
268+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
267269
container:
268270
image: diffusers/diffusers-onnxruntime-cuda
269-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
271+
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ --gpus 0
270272
defaults:
271273
run:
272274
shell: bash
@@ -311,11 +313,11 @@ jobs:
311313
run_torch_compile_tests:
312314
name: PyTorch Compile CUDA tests
313315

314-
runs-on: docker-gpu
316+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
315317

316318
container:
317319
image: diffusers/diffusers-pytorch-compile-cuda
318-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
320+
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
319321

320322
steps:
321323
- name: Checkout diffusers
@@ -352,11 +354,11 @@ jobs:
352354
run_xformers_tests:
353355
name: PyTorch xformers CUDA tests
354356

355-
runs-on: docker-gpu
357+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
356358

357359
container:
358360
image: diffusers/diffusers-pytorch-xformers-cuda
359-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
361+
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
360362

361363
steps:
362364
- name: Checkout diffusers
@@ -393,11 +395,11 @@ jobs:
393395
run_examples_tests:
394396
name: Examples PyTorch CUDA tests on Ubuntu
395397

396-
runs-on: docker-gpu
398+
runs-on: [single-gpu, nvidia-gpu, t4, ci]
397399

398400
container:
399401
image: diffusers/diffusers-pytorch-cuda
400-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
402+
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
401403

402404
steps:
403405
- name: Checkout diffusers

docker/diffusers-flax-cpu/Dockerfile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ LABEL repository="diffusers"
44

55
ENV DEBIAN_FRONTEND=noninteractive
66

7-
RUN apt update && \
8-
apt install -y bash \
9-
build-essential \
10-
git \
11-
git-lfs \
12-
curl \
13-
ca-certificates \
14-
libsndfile1-dev \
15-
libgl1 \
16-
python3.8 \
17-
python3-pip \
18-
python3.8-venv && \
7+
RUN apt-get -y update \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository ppa:deadsnakes/ppa
10+
11+
RUN apt install -y bash \
12+
build-essential \
13+
git \
14+
git-lfs \
15+
curl \
16+
ca-certificates \
17+
libsndfile1-dev \
18+
libgl1 \
19+
python3.10 \
20+
python3-pip \
21+
python3.10-venv && \
1922
rm -rf /var/lib/apt/lists
2023

2124
# make sure to use venv
22-
RUN python3 -m venv /opt/venv
25+
RUN python3.10 -m venv /opt/venv
2326
ENV PATH="/opt/venv/bin:$PATH"
2427

2528
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)

docker/diffusers-flax-tpu/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ LABEL repository="diffusers"
44

55
ENV DEBIAN_FRONTEND=noninteractive
66

7-
RUN apt update && \
8-
apt install -y bash \
7+
RUN apt-get -y update \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository ppa:deadsnakes/ppa
10+
11+
RUN apt install -y bash \
912
build-essential \
1013
git \
1114
git-lfs \
1215
curl \
1316
ca-certificates \
1417
libsndfile1-dev \
1518
libgl1 \
16-
python3.8 \
19+
python3.10 \
1720
python3-pip \
18-
python3.8-venv && \
21+
python3.10-venv && \
1922
rm -rf /var/lib/apt/lists
2023

2124
# make sure to use venv
22-
RUN python3 -m venv /opt/venv
25+
RUN python3.10 -m venv /opt/venv
2326
ENV PATH="/opt/venv/bin:$PATH"
2427

2528
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)

docker/diffusers-onnxruntime-cpu/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ LABEL repository="diffusers"
44

55
ENV DEBIAN_FRONTEND=noninteractive
66

7-
RUN apt update && \
8-
apt install -y bash \
7+
RUN apt-get -y update \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository ppa:deadsnakes/ppa
10+
11+
RUN apt install -y bash \
912
build-essential \
1013
git \
1114
git-lfs \
1215
curl \
1316
ca-certificates \
1417
libsndfile1-dev \
1518
libgl1 \
16-
python3.8 \
19+
python3.10 \
1720
python3-pip \
18-
python3.8-venv && \
21+
python3.10-venv && \
1922
rm -rf /var/lib/apt/lists
2023

2124
# make sure to use venv
22-
RUN python3 -m venv /opt/venv
25+
RUN python3.10 -m venv /opt/venv
2326
ENV PATH="/opt/venv/bin:$PATH"
2427

2528
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)

docker/diffusers-onnxruntime-cuda/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,36 @@ LABEL repository="diffusers"
44

55
ENV DEBIAN_FRONTEND=noninteractive
66

7-
RUN apt update && \
8-
apt install -y bash \
7+
RUN apt-get -y update \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository ppa:deadsnakes/ppa
10+
11+
RUN apt install -y bash \
912
build-essential \
1013
git \
1114
git-lfs \
1215
curl \
1316
ca-certificates \
1417
libsndfile1-dev \
1518
libgl1 \
16-
python3.8 \
19+
python3.10 \
1720
python3-pip \
18-
python3.8-venv && \
21+
python3.10-venv && \
1922
rm -rf /var/lib/apt/lists
2023

2124
# make sure to use venv
22-
RUN python3 -m venv /opt/venv
25+
RUN python3.10 -m venv /opt/venv
2326
ENV PATH="/opt/venv/bin:$PATH"
2427

2528
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
26-
RUN python3 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
27-
python3 -m uv pip install --no-cache-dir \
29+
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
30+
python3.10 -m uv pip install --no-cache-dir \
2831
torch \
2932
torchvision \
3033
torchaudio \
3134
"onnxruntime-gpu>=1.13.1" \
3235
--extra-index-url https://download.pytorch.org/whl/cu117 && \
33-
python3 -m uv pip install --no-cache-dir \
36+
python3.10 -m uv pip install --no-cache-dir \
3437
accelerate \
3538
datasets \
3639
hf-doc-builder \

docker/diffusers-pytorch-compile-cuda/Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,35 @@ LABEL repository="diffusers"
44

55
ENV DEBIAN_FRONTEND=noninteractive
66

7-
RUN apt update && \
8-
apt install -y bash \
7+
RUN apt-get -y update \
8+
&& apt-get install -y software-properties-common \
9+
&& add-apt-repository ppa:deadsnakes/ppa
10+
11+
RUN apt install -y bash \
912
build-essential \
1013
git \
1114
git-lfs \
1215
curl \
1316
ca-certificates \
1417
libsndfile1-dev \
1518
libgl1 \
16-
python3.9 \
17-
python3.9-dev \
19+
python3.10 \
1820
python3-pip \
19-
python3.9-venv && \
21+
python3.10-venv && \
2022
rm -rf /var/lib/apt/lists
2123

2224
# make sure to use venv
23-
RUN python3.9 -m venv /opt/venv
25+
RUN python3.10 -m venv /opt/venv
2426
ENV PATH="/opt/venv/bin:$PATH"
2527

2628
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
27-
RUN python3.9 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
28-
python3.9 -m uv pip install --no-cache-dir \
29+
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
30+
python3.10 -m uv pip install --no-cache-dir \
2931
torch \
3032
torchvision \
3133
torchaudio \
3234
invisible_watermark && \
33-
python3.9 -m pip install --no-cache-dir \
35+
python3.10 -m pip install --no-cache-dir \
3436
accelerate \
3537
datasets \
3638
hf-doc-builder \

0 commit comments

Comments
 (0)