Skip to content

Commit 9c4e201

Browse files
DN6sayakpaul
andauthored
[CI] Replace print_env step in CI with diffusers-cli env (#13662)
update Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
1 parent 9a2923d commit 9c4e201

11 files changed

Lines changed: 36 additions & 37 deletions

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uv pip install -r benchmarks/requirements.txt
4646
- name: Environment
4747
run: |
48-
python utils/print_env.py
48+
diffusers-cli env
4949
- name: Diffusers Benchmarking
5050
env:
5151
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}

.github/workflows/nightly_tests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
uv pip install pytest-reportlog
8282
- name: Environment
8383
run: |
84-
python utils/print_env.py
84+
diffusers-cli env
8585
- name: Pipeline CUDA Test
8686
env:
8787
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -135,7 +135,7 @@ jobs:
135135
uv pip uninstall accelerate && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
136136
uv pip install pytest-reportlog
137137
- name: Environment
138-
run: python utils/print_env.py
138+
run: diffusers-cli env
139139

140140
- name: Run nightly PyTorch CUDA tests for non-pipeline modules
141141
if: ${{ matrix.module != 'examples'}}
@@ -201,7 +201,7 @@ jobs:
201201
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
202202
- name: Environment
203203
run: |
204-
python utils/print_env.py
204+
diffusers-cli env
205205
- name: Run torch compile tests on GPU
206206
env:
207207
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -246,7 +246,7 @@ jobs:
246246
uv pip install pytest-reportlog
247247
- name: Environment
248248
run: |
249-
python utils/print_env.py
249+
diffusers-cli env
250250
- name: Selected Torch CUDA Test on big GPU
251251
env:
252252
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -297,7 +297,7 @@ jobs:
297297
298298
- name: Environment
299299
run: |
300-
python utils/print_env.py
300+
diffusers-cli env
301301
302302
- name: Run PyTorch CUDA tests
303303
env:
@@ -375,7 +375,7 @@ jobs:
375375
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
376376
- name: Environment
377377
run: |
378-
python utils/print_env.py
378+
diffusers-cli env
379379
- name: ${{ matrix.config.backend }} quantization tests on GPU
380380
env:
381381
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -425,7 +425,7 @@ jobs:
425425
uv pip install pytest-reportlog
426426
- name: Environment
427427
run: |
428-
python utils/print_env.py
428+
diffusers-cli env
429429
- name: Pipeline-level quantization tests on GPU
430430
env:
431431
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -541,7 +541,7 @@ jobs:
541541
# - name: Environment
542542
# shell: arch -arch arm64 bash {0}
543543
# run: |
544-
# ${CONDA_RUN} python utils/print_env.py
544+
# ${CONDA_RUN} diffusers-cli env
545545
# - name: Run nightly PyTorch tests on M1 (MPS)
546546
# shell: arch -arch arm64 bash {0}
547547
# env:
@@ -597,7 +597,7 @@ jobs:
597597
# - name: Environment
598598
# shell: arch -arch arm64 bash {0}
599599
# run: |
600-
# ${CONDA_RUN} python utils/print_env.py
600+
# ${CONDA_RUN} diffusers-cli env
601601
# - name: Run nightly PyTorch tests on M1 (MPS)
602602
# shell: arch -arch arm64 bash {0}
603603
# env:

.github/workflows/pr_modular_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
128128
- name: Environment
129129
run: |
130-
python utils/print_env.py
130+
diffusers-cli env
131131
132132
- name: Run fast PyTorch Pipeline CPU tests
133133
run: |

.github/workflows/pr_test_fetcher.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uv pip install -e ".[quality]"
4040
- name: Environment
4141
run: |
42-
python utils/print_env.py
42+
diffusers-cli env
4343
echo $(git --version)
4444
- name: Fetch Tests
4545
run: |
@@ -97,7 +97,7 @@ jobs:
9797
9898
- name: Environment
9999
run: |
100-
python utils/print_env.py
100+
diffusers-cli env
101101
102102
- name: Run all selected tests on CPU
103103
run: |
@@ -151,7 +151,7 @@ jobs:
151151
152152
- name: Environment
153153
run: |
154-
python utils/print_env.py
154+
diffusers-cli env
155155
156156
- name: Run Hub tests for models, schedulers, and pipelines on a staging env
157157
if: ${{ matrix.config.framework == 'hub_tests_pytorch' }}

.github/workflows/pr_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
124124
- name: Environment
125125
run: |
126-
python utils/print_env.py
126+
diffusers-cli env
127127
128128
- name: Run fast PyTorch Pipeline CPU tests
129129
if: ${{ matrix.config.framework == 'pytorch_pipelines' }}
@@ -199,7 +199,7 @@ jobs:
199199
200200
- name: Environment
201201
run: |
202-
python utils/print_env.py
202+
diffusers-cli env
203203
204204
- name: Run Hub tests for models, schedulers, and pipelines on a staging env
205205
if: ${{ matrix.config.framework == 'hub_tests_pytorch' }}
@@ -254,7 +254,7 @@ jobs:
254254
255255
- name: Environment
256256
run: |
257-
python utils/print_env.py
257+
diffusers-cli env
258258
259259
- name: Run fast PyTorch LoRA tests with PEFT
260260
run: |

.github/workflows/pr_tests_gpu.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
uv pip install -e ".[quality]"
9595
- name: Environment
9696
run: |
97-
python utils/print_env.py
97+
diffusers-cli env
9898
- name: Fetch Pipeline Matrix
9999
id: fetch_pipeline_matrix
100100
run: |
@@ -139,7 +139,7 @@ jobs:
139139
140140
- name: Environment
141141
run: |
142-
python utils/print_env.py
142+
diffusers-cli env
143143
- name: Extract tests
144144
id: extract_tests
145145
run: |
@@ -210,7 +210,7 @@ jobs:
210210
211211
- name: Environment
212212
run: |
213-
python utils/print_env.py
213+
diffusers-cli env
214214
215215
- name: Extract tests
216216
id: extract_tests
@@ -273,7 +273,7 @@ jobs:
273273
274274
- name: Environment
275275
run: |
276-
python utils/print_env.py
276+
diffusers-cli env
277277
278278
- name: Run example tests on GPU
279279
env:

.github/workflows/push_tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uv pip install -e ".[quality]"
4141
- name: Environment
4242
run: |
43-
python utils/print_env.py
43+
diffusers-cli env
4444
- name: Fetch Pipeline Matrix
4545
id: fetch_pipeline_matrix
4646
run: |
@@ -83,7 +83,7 @@ jobs:
8383
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
8484
- name: Environment
8585
run: |
86-
python utils/print_env.py
86+
diffusers-cli env
8787
- name: PyTorch CUDA checkpoint tests on Ubuntu
8888
env:
8989
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -137,7 +137,7 @@ jobs:
137137
138138
- name: Environment
139139
run: |
140-
python utils/print_env.py
140+
diffusers-cli env
141141
142142
- name: Run PyTorch CUDA tests
143143
env:
@@ -189,7 +189,7 @@ jobs:
189189
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
190190
- name: Environment
191191
run: |
192-
python utils/print_env.py
192+
diffusers-cli env
193193
- name: Run example tests on GPU
194194
env:
195195
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -231,7 +231,7 @@ jobs:
231231
uv pip install -e ".[quality,training]"
232232
- name: Environment
233233
run: |
234-
python utils/print_env.py
234+
diffusers-cli env
235235
- name: Run example tests on GPU
236236
env:
237237
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -272,7 +272,7 @@ jobs:
272272
273273
- name: Environment
274274
run: |
275-
python utils/print_env.py
275+
diffusers-cli env
276276
277277
- name: Run example tests on GPU
278278
env:

.github/workflows/push_tests_fast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
6868
- name: Environment
6969
run: |
70-
python utils/print_env.py
70+
diffusers-cli env
7171
7272
- name: Run fast PyTorch CPU tests
7373
if: ${{ matrix.config.framework == 'pytorch' }}

.github/workflows/push_tests_mps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Environment
5454
shell: arch -arch arm64 bash {0}
5555
run: |
56-
${CONDA_RUN} python utils/print_env.py
56+
${CONDA_RUN} diffusers-cli env
5757
5858
- name: Run fast PyTorch tests on M1 (MPS)
5959
shell: arch -arch arm64 bash {0}

.github/workflows/pypi_publish.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
run: |
4545
pip install -U transformers
4646
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
47-
python utils/print_env.py
4847
python -c "from diffusers import __version__; print(__version__)"
4948
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('fusing/unet-ldm-dummy-update'); pipe()"
5049
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('hf-internal-testing/tiny-stable-diffusion-pipe', safety_checker=None); pipe('ah suh du')"

0 commit comments

Comments
 (0)