[CI] Replace print_env step in CI with diffusers-cli env (#13662)

update

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
Dhruv Nair
2026-05-20 16:31:43 +05:30
committed by GitHub
parent 9a2923d501
commit 9c4e201dd1
11 changed files with 36 additions and 37 deletions

View File

@@ -45,7 +45,7 @@ jobs:
uv pip install -r benchmarks/requirements.txt
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Diffusers Benchmarking
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}

View File

@@ -81,7 +81,7 @@ jobs:
uv pip install pytest-reportlog
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Pipeline CUDA Test
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -135,7 +135,7 @@ jobs:
uv pip uninstall accelerate && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
uv pip install pytest-reportlog
- name: Environment
run: python utils/print_env.py
run: diffusers-cli env
- name: Run nightly PyTorch CUDA tests for non-pipeline modules
if: ${{ matrix.module != 'examples'}}
@@ -201,7 +201,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run torch compile tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -246,7 +246,7 @@ jobs:
uv pip install pytest-reportlog
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Selected Torch CUDA Test on big GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -297,7 +297,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run PyTorch CUDA tests
env:
@@ -375,7 +375,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: ${{ matrix.config.backend }} quantization tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -425,7 +425,7 @@ jobs:
uv pip install pytest-reportlog
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Pipeline-level quantization tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -541,7 +541,7 @@ jobs:
# - name: Environment
# shell: arch -arch arm64 bash {0}
# run: |
# ${CONDA_RUN} python utils/print_env.py
# ${CONDA_RUN} diffusers-cli env
# - name: Run nightly PyTorch tests on M1 (MPS)
# shell: arch -arch arm64 bash {0}
# env:
@@ -597,7 +597,7 @@ jobs:
# - name: Environment
# shell: arch -arch arm64 bash {0}
# run: |
# ${CONDA_RUN} python utils/print_env.py
# ${CONDA_RUN} diffusers-cli env
# - name: Run nightly PyTorch tests on M1 (MPS)
# shell: arch -arch arm64 bash {0}
# env:

View File

@@ -127,7 +127,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run fast PyTorch Pipeline CPU tests
run: |

View File

@@ -39,7 +39,7 @@ jobs:
uv pip install -e ".[quality]"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
echo $(git --version)
- name: Fetch Tests
run: |
@@ -97,7 +97,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run all selected tests on CPU
run: |
@@ -151,7 +151,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run Hub tests for models, schedulers, and pipelines on a staging env
if: ${{ matrix.config.framework == 'hub_tests_pytorch' }}

View File

@@ -123,7 +123,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run fast PyTorch Pipeline CPU tests
if: ${{ matrix.config.framework == 'pytorch_pipelines' }}
@@ -199,7 +199,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run Hub tests for models, schedulers, and pipelines on a staging env
if: ${{ matrix.config.framework == 'hub_tests_pytorch' }}
@@ -254,7 +254,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run fast PyTorch LoRA tests with PEFT
run: |

View File

@@ -94,7 +94,7 @@ jobs:
uv pip install -e ".[quality]"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Fetch Pipeline Matrix
id: fetch_pipeline_matrix
run: |
@@ -139,7 +139,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Extract tests
id: extract_tests
run: |
@@ -210,7 +210,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Extract tests
id: extract_tests
@@ -273,7 +273,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run example tests on GPU
env:

View File

@@ -40,7 +40,7 @@ jobs:
uv pip install -e ".[quality]"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Fetch Pipeline Matrix
id: fetch_pipeline_matrix
run: |
@@ -83,7 +83,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: PyTorch CUDA checkpoint tests on Ubuntu
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -137,7 +137,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run PyTorch CUDA tests
env:
@@ -189,7 +189,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run example tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -231,7 +231,7 @@ jobs:
uv pip install -e ".[quality,training]"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run example tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -272,7 +272,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run example tests on GPU
env:

View File

@@ -67,7 +67,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run fast PyTorch CPU tests
if: ${{ matrix.config.framework == 'pytorch' }}

View File

@@ -53,7 +53,7 @@ jobs:
- name: Environment
shell: arch -arch arm64 bash {0}
run: |
${CONDA_RUN} python utils/print_env.py
${CONDA_RUN} diffusers-cli env
- name: Run fast PyTorch tests on M1 (MPS)
shell: arch -arch arm64 bash {0}

View File

@@ -44,7 +44,6 @@ jobs:
run: |
pip install -U transformers
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
python utils/print_env.py
python -c "from diffusers import __version__; print(__version__)"
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('fusing/unet-ldm-dummy-update'); pipe()"
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('hf-internal-testing/tiny-stable-diffusion-pipe', safety_checker=None); pipe('ah suh du')"

View File

@@ -41,7 +41,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Fetch Pipeline Matrix
id: fetch_pipeline_matrix
run: |
@@ -84,7 +84,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Slow PyTorch CUDA checkpoint tests on Ubuntu
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -138,7 +138,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run PyTorch CUDA tests
env:
@@ -190,7 +190,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run PyTorch CUDA tests
env:
@@ -248,7 +248,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run torch compile tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -292,7 +292,7 @@ jobs:
uv pip uninstall tokenizers && uv pip install "tokenizers<=0.23.0"
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run example tests on GPU
env:
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
@@ -337,7 +337,7 @@ jobs:
- name: Environment
run: |
python utils/print_env.py
diffusers-cli env
- name: Run example tests on GPU
env: