mirror of
https://github.com/huggingface/diffusers.git
synced 2025-12-11 15:04:45 +08:00
Compare commits
47 Commits
memory-opt
...
shm-size
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
390d0879fe | ||
|
|
1fb8082af9 | ||
|
|
54e6f2d99e | ||
|
|
22326b4971 | ||
|
|
7cc0ba0070 | ||
|
|
e4bd3f5a05 | ||
|
|
25d0277911 | ||
|
|
14d7fe3f9e | ||
|
|
2f4e29d179 | ||
|
|
b28311d9e5 | ||
|
|
8a1020c91e | ||
|
|
2483c57c44 | ||
|
|
f18942b3e6 | ||
|
|
7021a35eeb | ||
|
|
e0455537c2 | ||
|
|
c61360099b | ||
|
|
b585832d4e | ||
|
|
963c73c229 | ||
|
|
09c595f212 | ||
|
|
b1c5030418 | ||
|
|
17e801ccb9 | ||
|
|
468008f6b7 | ||
|
|
10e7d39f58 | ||
|
|
49c01d4a4b | ||
|
|
f2e6c24df2 | ||
|
|
ce659bc586 | ||
|
|
615c12ab68 | ||
|
|
e34d9f1949 | ||
|
|
4106e3f182 | ||
|
|
1651c9a1a1 | ||
|
|
4bfdb34b36 | ||
|
|
3d4f987cc9 | ||
|
|
1feac0469b | ||
|
|
75e5cd046b | ||
|
|
865b6638f7 | ||
|
|
428c952289 | ||
|
|
d16c921346 | ||
|
|
c46380165a | ||
|
|
a6a89aa199 | ||
|
|
9e9a49ca24 | ||
|
|
b9c90f7e22 | ||
|
|
19fc3281c5 | ||
|
|
fe8f0c9a76 | ||
|
|
dc0bef11bd | ||
|
|
27ef43f043 | ||
|
|
5d5c61bd09 | ||
|
|
7c38bff847 |
100
.github/workflows/push_check.yml
vendored
Normal file
100
.github/workflows/push_check.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
name: Slow Test Memory Checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ shm-size ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
DIFFUSERS_IS_CI: yes
|
||||||
|
HF_HUB_ENABLE_HF_TRANSFER: 1
|
||||||
|
OMP_NUM_THREADS: 8
|
||||||
|
MKL_NUM_THREADS: 8
|
||||||
|
PYTEST_TIMEOUT: 600
|
||||||
|
RUN_SLOW: yes
|
||||||
|
PIPELINE_USAGE_CUTOFF: 50000
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup_torch_cuda_pipeline_matrix:
|
||||||
|
name: Setup Torch Pipelines CUDA Slow Tests Matrix
|
||||||
|
runs-on: [ self-hosted, intel-cpu, 8-cpu, ci ]
|
||||||
|
container:
|
||||||
|
image: diffusers/diffusers-pytorch-cpu
|
||||||
|
outputs:
|
||||||
|
pipeline_test_matrix: ${{ steps.fetch_pipeline_matrix.outputs.pipeline_test_matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout diffusers
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||||
|
python -m uv pip install -e [quality,test]
|
||||||
|
- name: Environment
|
||||||
|
run: |
|
||||||
|
python utils/print_env.py
|
||||||
|
- name: Fetch Pipeline Matrix
|
||||||
|
id: fetch_pipeline_matrix
|
||||||
|
run: |
|
||||||
|
matrix=$(python utils/fetch_torch_cuda_pipeline_test_matrix.py)
|
||||||
|
echo $matrix
|
||||||
|
echo "pipeline_test_matrix=$matrix" >> $GITHUB_OUTPUT
|
||||||
|
- name: Pipeline Tests Artifacts
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: test-pipelines.json
|
||||||
|
path: reports
|
||||||
|
|
||||||
|
torch_pipelines_cuda_tests:
|
||||||
|
name: Torch Pipelines CUDA Slow Tests
|
||||||
|
needs: setup_torch_cuda_pipeline_matrix
|
||||||
|
strategy:
|
||||||
|
max-parallel: 4
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
module: ${{ fromJson(needs.setup_torch_cuda_pipeline_matrix.outputs.pipeline_test_matrix) }}
|
||||||
|
runs-on: [single-gpu, nvidia-gpu, t4, ci]
|
||||||
|
container:
|
||||||
|
image: diffusers/diffusers-pytorch-cuda
|
||||||
|
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
|
||||||
|
steps:
|
||||||
|
- name: Checkout diffusers
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
- name: NVIDIA-SMI
|
||||||
|
run: |
|
||||||
|
nvidia-smi
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install libsndfile1-dev libgl1 -y
|
||||||
|
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||||
|
python -m uv pip install -e [quality,test]
|
||||||
|
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
|
||||||
|
python -m uv pip install hf_transfer
|
||||||
|
- name: Environment
|
||||||
|
run: |
|
||||||
|
python utils/print_env.py
|
||||||
|
- name: Slow PyTorch CUDA checkpoint tests on Ubuntu
|
||||||
|
env:
|
||||||
|
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
|
||||||
|
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
|
||||||
|
CUBLAS_WORKSPACE_CONFIG: :16:8
|
||||||
|
run: |
|
||||||
|
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
|
||||||
|
-s -v -k "not Flax and not Onnx" \
|
||||||
|
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
|
||||||
|
tests/pipelines/${{ matrix.module }}
|
||||||
|
- name: Failure short reports
|
||||||
|
if: ${{ failure() }}
|
||||||
|
run: |
|
||||||
|
cat reports/tests_pipeline_${{ matrix.module }}_cuda_stats.txt
|
||||||
|
cat reports/tests_pipeline_${{ matrix.module }}_cuda_failures_short.txt
|
||||||
|
|
||||||
|
- name: Test suite reports artifacts
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: pipeline_${{ matrix.module }}_test_reports
|
||||||
|
path: reports
|
||||||
@@ -76,7 +76,6 @@ def fetch_pipeline_modules_to_test():
|
|||||||
test_modules = []
|
test_modules = []
|
||||||
for pipeline_name in pipeline_objects:
|
for pipeline_name in pipeline_objects:
|
||||||
module = getattr(diffusers, pipeline_name)
|
module = getattr(diffusers, pipeline_name)
|
||||||
|
|
||||||
test_module = module.__module__.split(".")[-2].strip()
|
test_module = module.__module__.split(".")[-2].strip()
|
||||||
test_modules.append(test_module)
|
test_modules.append(test_module)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user