From c1dae902719ea5145e5695825a8bec1b8d565020 Mon Sep 17 00:00:00 2001 From: Adhik Joshi Date: Sun, 25 Feb 2024 19:23:54 +0530 Subject: [PATCH 1/3] remove workflow --- .github/workflows/benchmark.yml | 52 --- .github/workflows/build_docker_images.yml | 52 --- .github/workflows/build_documentation.yml | 23 - .github/workflows/build_pr_documentation.yml | 18 - .github/workflows/nightly_tests.yml | 162 ------- .github/workflows/pr_dependency_test.yml | 32 -- .github/workflows/pr_flax_dependency_test.yml | 34 -- .github/workflows/pr_quality.yml | 49 -- .github/workflows/pr_test_fetcher.yml | 170 ------- .github/workflows/pr_test_peft_backend.yml | 65 --- .github/workflows/pr_tests.yml | 174 ------- .../workflows/pr_torch_dependency_test.yml | 32 -- .github/workflows/push_tests.yml | 427 ------------------ .github/workflows/push_tests_fast.yml | 115 ----- .github/workflows/push_tests_mps.yml | 72 --- .github/workflows/stale.yml | 27 -- .github/workflows/typos.yml | 14 - .github/workflows/upload_pr_documentation.yml | 16 - 18 files changed, 1534 deletions(-) delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/build_docker_images.yml delete mode 100644 .github/workflows/build_documentation.yml delete mode 100644 .github/workflows/build_pr_documentation.yml delete mode 100644 .github/workflows/nightly_tests.yml delete mode 100644 .github/workflows/pr_dependency_test.yml delete mode 100644 .github/workflows/pr_flax_dependency_test.yml delete mode 100644 .github/workflows/pr_quality.yml delete mode 100644 .github/workflows/pr_test_fetcher.yml delete mode 100644 .github/workflows/pr_test_peft_backend.yml delete mode 100644 .github/workflows/pr_tests.yml delete mode 100644 .github/workflows/pr_torch_dependency_test.yml delete mode 100644 .github/workflows/push_tests.yml delete mode 100644 .github/workflows/push_tests_fast.yml delete mode 100644 .github/workflows/push_tests_mps.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/typos.yml delete mode 100644 .github/workflows/upload_pr_documentation.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index a3f530d51b7b..000000000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Benchmarking tests - -on: - schedule: - - cron: "30 1 1,15 * *" # every 2 weeks on the 1st and the 15th of every month at 1:30 AM - -env: - DIFFUSERS_IS_CI: yes - HF_HOME: /mnt/cache - OMP_NUM_THREADS: 8 - MKL_NUM_THREADS: 8 - -jobs: - torch_pipelines_cuda_benchmark_tests: - name: Torch Core Pipelines CUDA Benchmarking Tests - strategy: - fail-fast: false - max-parallel: 1 - runs-on: [single-gpu, nvidia-gpu, a10, ci] - container: - image: diffusers/diffusers-pytorch-cuda - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/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 pip install -e .[quality,test] - python -m pip install pandas peft - - name: Environment - run: | - python utils/print_env.py - - name: Diffusers Benchmarking - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.DIFFUSERS_BOT_TOKEN }} - BASE_PATH: benchmark_outputs - run: | - export TOTAL_GPU_MEMORY=$(python -c "import torch; print(torch.cuda.get_device_properties(0).total_memory / (1024**3))") - cd benchmarks && mkdir ${BASE_PATH} && python run_all.py && python push_results.py - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: benchmark_test_reports - path: benchmarks/benchmark_outputs \ No newline at end of file diff --git a/.github/workflows/build_docker_images.yml b/.github/workflows/build_docker_images.yml deleted file mode 100644 index 937ad07496b9..000000000000 --- a/.github/workflows/build_docker_images.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build Docker images (nightly) - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" # every day at midnight - -concurrency: - group: docker-image-builds - cancel-in-progress: false - -env: - REGISTRY: diffusers - -jobs: - build-docker-images: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - strategy: - fail-fast: false - matrix: - image-name: - - diffusers-pytorch-cpu - - diffusers-pytorch-cuda - - diffusers-pytorch-compile-cuda - - diffusers-pytorch-xformers-cuda - - diffusers-flax-cpu - - diffusers-flax-tpu - - diffusers-onnxruntime-cpu - - diffusers-onnxruntime-cuda - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ env.REGISTRY }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - no-cache: true - context: ./docker/${{ matrix.image-name }} - push: true - tags: ${{ env.REGISTRY }}/${{ matrix.image-name }}:latest diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml deleted file mode 100644 index 05ea1b2122de..000000000000 --- a/.github/workflows/build_documentation.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build documentation - -on: - push: - branches: - - main - - doc-builder* - - v*-release - - v*-patch - -jobs: - build: - uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main - with: - commit_sha: ${{ github.sha }} - install_libgl1: true - package: diffusers - notebook_folder: diffusers_doc - languages: en ko zh ja pt - - secrets: - token: ${{ secrets.HUGGINGFACE_PUSH }} - hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml deleted file mode 100644 index 33f09b309d49..000000000000 --- a/.github/workflows/build_pr_documentation.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build PR Documentation - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - build: - uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main - with: - commit_sha: ${{ github.event.pull_request.head.sha }} - pr_number: ${{ github.event.number }} - install_libgl1: true - package: diffusers - languages: en ko zh ja pt diff --git a/.github/workflows/nightly_tests.yml b/.github/workflows/nightly_tests.yml deleted file mode 100644 index fb0ce92cb61c..000000000000 --- a/.github/workflows/nightly_tests.yml +++ /dev/null @@ -1,162 +0,0 @@ -name: Nightly tests on main - -on: - schedule: - - cron: "0 0 * * *" # every day at midnight - -env: - DIFFUSERS_IS_CI: yes - HF_HOME: /mnt/cache - OMP_NUM_THREADS: 8 - MKL_NUM_THREADS: 8 - PYTEST_TIMEOUT: 600 - RUN_SLOW: yes - RUN_NIGHTLY: yes - -jobs: - run_nightly_tests: - strategy: - fail-fast: false - matrix: - config: - - name: Nightly PyTorch CUDA tests on Ubuntu - framework: pytorch - runner: docker-gpu - image: diffusers/diffusers-pytorch-cuda - report: torch_cuda - - name: Nightly Flax TPU tests on Ubuntu - framework: flax - runner: docker-tpu - image: diffusers/diffusers-flax-tpu - report: flax_tpu - - name: Nightly ONNXRuntime CUDA tests on Ubuntu - framework: onnxruntime - runner: docker-gpu - image: diffusers/diffusers-onnxruntime-cuda - report: onnx_cuda - - name: ${{ matrix.config.name }} - - runs-on: ${{ matrix.config.runner }} - - container: - image: ${{ matrix.config.image }} - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ ${{ matrix.config.runner == 'docker-tpu' && '--privileged' || '--gpus 0'}} - - defaults: - run: - shell: bash - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: NVIDIA-SMI - if: ${{ matrix.config.runner == 'docker-gpu' }} - run: | - nvidia-smi - - - name: Install dependencies - run: | - python -m pip install -e .[quality,test] - python -m pip install -U git+https://github.com/huggingface/transformers - python -m pip install git+https://github.com/huggingface/accelerate - - - name: Environment - run: | - python utils/print_env.py - - - name: Run nightly PyTorch CUDA tests - if: ${{ matrix.config.framework == 'pytorch' }} - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "not Flax and not Onnx" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/ - - - name: Run nightly Flax TPU tests - if: ${{ matrix.config.framework == 'flax' }} - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 0 \ - -s -v -k "Flax" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/ - - - name: Run nightly ONNXRuntime CUDA tests - if: ${{ matrix.config.framework == 'onnxruntime' }} - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "Onnx" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/ - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.config.report }}_test_reports - path: reports - - run_nightly_tests_apple_m1: - name: Nightly PyTorch MPS tests on MacOS - runs-on: [ self-hosted, apple-m1 ] - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Clean checkout - shell: arch -arch arm64 bash {0} - run: | - git clean -fxd - - - name: Setup miniconda - uses: ./.github/actions/setup-miniconda - with: - python-version: 3.9 - - - name: Install dependencies - shell: arch -arch arm64 bash {0} - run: | - ${CONDA_RUN} python -m pip install --upgrade pip - ${CONDA_RUN} python -m pip install -e .[quality,test] - ${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu - ${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate - - - name: Environment - shell: arch -arch arm64 bash {0} - run: | - ${CONDA_RUN} python utils/print_env.py - - - name: Run nightly PyTorch tests on M1 (MPS) - shell: arch -arch arm64 bash {0} - env: - HF_HOME: /System/Volumes/Data/mnt/cache - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps tests/ - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_torch_mps_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: torch_mps_test_reports - path: reports diff --git a/.github/workflows/pr_dependency_test.yml b/.github/workflows/pr_dependency_test.yml deleted file mode 100644 index 102414076d81..000000000000 --- a/.github/workflows/pr_dependency_test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Run dependency tests - -on: - pull_request: - branches: - - main - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check_dependencies: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install pytest - - name: Check for soft dependencies - run: | - pytest tests/others/test_dependencies.py - \ No newline at end of file diff --git a/.github/workflows/pr_flax_dependency_test.yml b/.github/workflows/pr_flax_dependency_test.yml deleted file mode 100644 index d7d2a2d4c3d5..000000000000 --- a/.github/workflows/pr_flax_dependency_test.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Run Flax dependency tests - -on: - pull_request: - branches: - - main - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check_flax_dependencies: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install "jax[cpu]>=0.2.16,!=0.3.2" - pip install "flax>=0.4.1" - pip install "jaxlib>=0.1.65" - pip install pytest - - name: Check for soft dependencies - run: | - pytest tests/others/test_dependencies.py diff --git a/.github/workflows/pr_quality.yml b/.github/workflows/pr_quality.yml deleted file mode 100644 index c1b58018fce1..000000000000 --- a/.github/workflows/pr_quality.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Run code quality checks - -on: - pull_request: - branches: - - main - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check_code_quality: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install .[quality] - - name: Check quality - run: | - ruff check examples tests src utils scripts - ruff format examples tests src utils scripts --check - - check_repository_consistency: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install .[quality] - - name: Check quality - run: | - python utils/check_copies.py - python utils/check_dummies.py - make deps_table_check_updated diff --git a/.github/workflows/pr_test_fetcher.yml b/.github/workflows/pr_test_fetcher.yml deleted file mode 100644 index b82f8007aa74..000000000000 --- a/.github/workflows/pr_test_fetcher.yml +++ /dev/null @@ -1,170 +0,0 @@ -name: Fast tests for PRs - Test Fetcher - -on: workflow_dispatch - -env: - DIFFUSERS_IS_CI: yes - OMP_NUM_THREADS: 4 - MKL_NUM_THREADS: 4 - PYTEST_TIMEOUT: 60 - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - setup_pr_tests: - name: Setup PR Tests - runs-on: docker-cpu - container: - image: diffusers/diffusers-pytorch-cpu - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - defaults: - run: - shell: bash - outputs: - matrix: ${{ steps.set_matrix.outputs.matrix }} - test_map: ${{ steps.set_matrix.outputs.test_map }} - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - - name: Environment - run: | - python utils/print_env.py - echo $(git --version) - - name: Fetch Tests - run: | - python utils/tests_fetcher.py | tee test_preparation.txt - - name: Report fetched tests - uses: actions/upload-artifact@v3 - with: - name: test_fetched - path: test_preparation.txt - - id: set_matrix - name: Create Test Matrix - # The `keys` is used as GitHub actions matrix for jobs, i.e. `models`, `pipelines`, etc. - # The `test_map` is used to get the actual identified test files under each key. - # If no test to run (so no `test_map.json` file), create a dummy map (empty matrix will fail) - run: | - if [ -f test_map.json ]; then - keys=$(python3 -c 'import json; fp = open("test_map.json"); test_map = json.load(fp); fp.close(); d = list(test_map.keys()); print(json.dumps(d))') - test_map=$(python3 -c 'import json; fp = open("test_map.json"); test_map = json.load(fp); fp.close(); print(json.dumps(test_map))') - else - keys=$(python3 -c 'keys = ["dummy"]; print(keys)') - test_map=$(python3 -c 'test_map = {"dummy": []}; print(test_map)') - fi - echo $keys - echo $test_map - echo "matrix=$keys" >> $GITHUB_OUTPUT - echo "test_map=$test_map" >> $GITHUB_OUTPUT - - run_pr_tests: - name: Run PR Tests - needs: setup_pr_tests - if: contains(fromJson(needs.setup_pr_tests.outputs.matrix), 'dummy') != true - strategy: - fail-fast: false - max-parallel: 2 - matrix: - modules: ${{ fromJson(needs.setup_pr_tests.outputs.matrix) }} - runs-on: docker-cpu - container: - image: diffusers/diffusers-pytorch-cpu - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - defaults: - run: - shell: bash - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install accelerate - - - name: Environment - run: | - python utils/print_env.py - - - name: Run all selected tests on CPU - run: | - python -m pytest -n 2 --dist=loadfile -v --make-reports=${{ matrix.modules }}_tests_cpu ${{ fromJson(needs.setup_pr_tests.outputs.test_map)[matrix.modules] }} - - - name: Failure short reports - if: ${{ failure() }} - continue-on-error: true - run: | - cat reports/${{ matrix.modules }}_tests_cpu_stats.txt - cat reports/${{ matrix.modules }}_tests_cpu_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.modules }}_test_reports - path: reports - - run_staging_tests: - strategy: - fail-fast: false - matrix: - config: - - name: Hub tests for models, schedulers, and pipelines - framework: hub_tests_pytorch - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_hub - - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.runner }} - container: - image: ${{ matrix.config.image }} - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - defaults: - run: - shell: bash - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - - - name: Environment - run: | - python utils/print_env.py - - - name: Run Hub tests for models, schedulers, and pipelines on a staging env - if: ${{ matrix.config.framework == 'hub_tests_pytorch' }} - run: | - HUGGINGFACE_CO_STAGING=true python -m pytest \ - -m "is_staging_test" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: pr_${{ matrix.config.report }}_test_reports - path: reports diff --git a/.github/workflows/pr_test_peft_backend.yml b/.github/workflows/pr_test_peft_backend.yml deleted file mode 100644 index 8cc4eb6e59a9..000000000000 --- a/.github/workflows/pr_test_peft_backend.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Fast tests for PRs - PEFT backend - -on: - pull_request: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - DIFFUSERS_IS_CI: yes - OMP_NUM_THREADS: 4 - MKL_NUM_THREADS: 4 - PYTEST_TIMEOUT: 60 - -jobs: - run_fast_tests: - strategy: - fail-fast: false - matrix: - lib-versions: ["main", "latest"] - - - name: LoRA - ${{ matrix.lib-versions }} - - runs-on: docker-cpu - - container: - image: diffusers/diffusers-pytorch-cpu - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - defaults: - run: - shell: bash - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - if [ "${{ matrix.lib-versions }}" == "main" ]; then - python -m pip install -U git+https://github.com/huggingface/peft.git - python -m pip install -U git+https://github.com/huggingface/transformers.git - python -m pip install -U git+https://github.com/huggingface/accelerate.git - else - python -m pip install -U peft transformers accelerate - fi - - - name: Environment - run: | - python utils/print_env.py - - - name: Run fast PyTorch LoRA CPU tests with PEFT backend - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ - -s -v \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/lora/test_lora_layers_peft.py diff --git a/.github/workflows/pr_tests.yml b/.github/workflows/pr_tests.yml deleted file mode 100644 index 6693c0aa6964..000000000000 --- a/.github/workflows/pr_tests.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: Fast tests for PRs - -on: - pull_request: - branches: - - main - push: - branches: - - ci-* - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - DIFFUSERS_IS_CI: yes - OMP_NUM_THREADS: 4 - MKL_NUM_THREADS: 4 - PYTEST_TIMEOUT: 60 - -jobs: - run_fast_tests: - strategy: - fail-fast: false - matrix: - config: - - name: Fast PyTorch Pipeline CPU tests - framework: pytorch_pipelines - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_cpu_pipelines - - name: Fast PyTorch Models & Schedulers CPU tests - framework: pytorch_models - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_cpu_models_schedulers - - name: Fast Flax CPU tests - framework: flax - runner: docker-cpu - image: diffusers/diffusers-flax-cpu - report: flax_cpu - - name: PyTorch Example CPU tests - framework: pytorch_examples - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_example_cpu - - name: ${{ matrix.config.name }} - - runs-on: ${{ matrix.config.runner }} - - container: - image: ${{ matrix.config.image }} - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - defaults: - run: - shell: bash - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install accelerate - - - name: Environment - run: | - python utils/print_env.py - - - name: Run fast PyTorch Pipeline CPU tests - if: ${{ matrix.config.framework == 'pytorch_pipelines' }} - run: | - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "not Flax and not Onnx" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/pipelines - - - name: Run fast PyTorch Model Scheduler CPU tests - if: ${{ matrix.config.framework == 'pytorch_models' }} - run: | - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "not Flax and not Onnx and not Dependency" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/models tests/schedulers tests/others - - - name: Run fast Flax TPU tests - if: ${{ matrix.config.framework == 'flax' }} - run: | - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "Flax" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests - - - name: Run example PyTorch CPU tests - if: ${{ matrix.config.framework == 'pytorch_examples' }} - run: | - python -m pip install peft - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - --make-reports=tests_${{ matrix.config.report }} \ - examples - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: pr_${{ matrix.config.report }}_test_reports - path: reports - - run_staging_tests: - strategy: - fail-fast: false - matrix: - config: - - name: Hub tests for models, schedulers, and pipelines - framework: hub_tests_pytorch - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_hub - - name: ${{ matrix.config.name }} - - runs-on: ${{ matrix.config.runner }} - - container: - image: ${{ matrix.config.image }} - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - defaults: - run: - shell: bash - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - - - name: Environment - run: | - python utils/print_env.py - - - name: Run Hub tests for models, schedulers, and pipelines on a staging env - if: ${{ matrix.config.framework == 'hub_tests_pytorch' }} - run: | - HUGGINGFACE_CO_STAGING=true python -m pytest \ - -m "is_staging_test" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: pr_${{ matrix.config.report }}_test_reports - path: reports diff --git a/.github/workflows/pr_torch_dependency_test.yml b/.github/workflows/pr_torch_dependency_test.yml deleted file mode 100644 index 57a7a5c77c74..000000000000 --- a/.github/workflows/pr_torch_dependency_test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Run Torch dependency tests - -on: - pull_request: - branches: - - main - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check_torch_dependencies: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install torch torchvision torchaudio - pip install pytest - - name: Check for soft dependencies - run: | - pytest tests/others/test_dependencies.py diff --git a/.github/workflows/push_tests.yml b/.github/workflows/push_tests.yml deleted file mode 100644 index 312d3ec22791..000000000000 --- a/.github/workflows/push_tests.yml +++ /dev/null @@ -1,427 +0,0 @@ -name: Slow Tests on main - -on: - push: - branches: - - main - - -env: - DIFFUSERS_IS_CI: yes - HF_HOME: /mnt/cache - 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: docker-gpu - container: - image: diffusers/diffusers-pytorch-cpu # this is a CPU image, but we need it to fetch the matrix - options: --shm-size "16gb" --ipc host - 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: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - - - 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: - fail-fast: false - max-parallel: 1 - matrix: - module: ${{ fromJson(needs.setup_torch_cuda_pipeline_matrix.outputs.pipeline_test_matrix) }} - runs-on: docker-gpu - container: - image: diffusers/diffusers-pytorch-cuda - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/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 pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - - 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 - - torch_cuda_tests: - name: Torch CUDA Tests - runs-on: docker-gpu - container: - image: diffusers/diffusers-pytorch-cuda - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0 - defaults: - run: - shell: bash - strategy: - matrix: - module: [models, schedulers, lora, others] - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - - - name: Environment - run: | - python utils/print_env.py - - - name: Run slow PyTorch CUDA tests - 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_torch_cuda \ - tests/${{ matrix.module }} - - - name: Failure short reports - if: ${{ failure() }} - run: | - cat reports/tests_torch_cuda_stats.txt - cat reports/tests_torch_cuda_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: torch_cuda_test_reports - path: reports - - peft_cuda_tests: - name: PEFT CUDA Tests - runs-on: docker-gpu - container: - image: diffusers/diffusers-pytorch-cuda - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0 - defaults: - run: - shell: bash - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - python -m pip install git+https://github.com/huggingface/peft.git - - - name: Environment - run: | - python utils/print_env.py - - - name: Run slow PEFT CUDA tests - 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 and not PEFTLoRALoading" \ - --make-reports=tests_peft_cuda \ - tests/lora/ - - - name: Failure short reports - if: ${{ failure() }} - run: | - cat reports/tests_peft_cuda_stats.txt - cat reports/tests_peft_cuda_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: torch_peft_test_reports - path: reports - - flax_tpu_tests: - name: Flax TPU Tests - runs-on: docker-tpu - container: - image: diffusers/diffusers-flax-tpu - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --privileged - defaults: - run: - shell: bash - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - - - name: Environment - run: | - python utils/print_env.py - - - name: Run slow Flax TPU tests - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 0 \ - -s -v -k "Flax" \ - --make-reports=tests_flax_tpu \ - tests/ - - - name: Failure short reports - if: ${{ failure() }} - run: | - cat reports/tests_flax_tpu_stats.txt - cat reports/tests_flax_tpu_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: flax_tpu_test_reports - path: reports - - onnx_cuda_tests: - name: ONNX CUDA Tests - runs-on: docker-gpu - container: - image: diffusers/diffusers-onnxruntime-cuda - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0 - defaults: - run: - shell: bash - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - - - name: Environment - run: | - python utils/print_env.py - - - name: Run slow ONNXRuntime CUDA tests - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "Onnx" \ - --make-reports=tests_onnx_cuda \ - tests/ - - - name: Failure short reports - if: ${{ failure() }} - run: | - cat reports/tests_onnx_cuda_stats.txt - cat reports/tests_onnx_cuda_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: onnx_cuda_test_reports - path: reports - - run_torch_compile_tests: - name: PyTorch Compile CUDA tests - - runs-on: docker-gpu - - container: - image: diffusers/diffusers-pytorch-compile-cuda - options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: NVIDIA-SMI - run: | - nvidia-smi - - name: Install dependencies - run: | - python -m pip install -e .[quality,test,training] - - name: Environment - run: | - python utils/print_env.py - - name: Run example tests on GPU - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "compile" --make-reports=tests_torch_compile_cuda tests/ - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_torch_compile_cuda_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: torch_compile_test_reports - path: reports - - run_xformers_tests: - name: PyTorch xformers CUDA tests - - runs-on: docker-gpu - - container: - image: diffusers/diffusers-pytorch-xformers-cuda - options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: NVIDIA-SMI - run: | - nvidia-smi - - name: Install dependencies - run: | - python -m pip install -e .[quality,test,training] - - name: Environment - run: | - python utils/print_env.py - - name: Run example tests on GPU - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/ - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_torch_xformers_cuda_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: torch_xformers_test_reports - path: reports - - run_examples_tests: - name: Examples PyTorch CUDA tests on Ubuntu - - runs-on: docker-gpu - - container: - image: diffusers/diffusers-pytorch-cuda - options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: NVIDIA-SMI - run: | - nvidia-smi - - - name: Install dependencies - run: | - python -m pip install -e .[quality,test,training] - - - name: Environment - run: | - python utils/print_env.py - - - name: Run example tests on GPU - env: - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v --make-reports=examples_torch_cuda examples/ - - - name: Failure short reports - if: ${{ failure() }} - run: | - cat reports/examples_torch_cuda_stats.txt - cat reports/examples_torch_cuda_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: examples_test_reports - path: reports \ No newline at end of file diff --git a/.github/workflows/push_tests_fast.yml b/.github/workflows/push_tests_fast.yml deleted file mode 100644 index 2f69b00af982..000000000000 --- a/.github/workflows/push_tests_fast.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: Fast tests on main - -on: - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - DIFFUSERS_IS_CI: yes - HF_HOME: /mnt/cache - OMP_NUM_THREADS: 8 - MKL_NUM_THREADS: 8 - PYTEST_TIMEOUT: 600 - RUN_SLOW: no - -jobs: - run_fast_tests: - strategy: - fail-fast: false - matrix: - config: - - name: Fast PyTorch CPU tests on Ubuntu - framework: pytorch - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_cpu - - name: Fast Flax CPU tests on Ubuntu - framework: flax - runner: docker-cpu - image: diffusers/diffusers-flax-cpu - report: flax_cpu - - name: Fast ONNXRuntime CPU tests on Ubuntu - framework: onnxruntime - runner: docker-cpu - image: diffusers/diffusers-onnxruntime-cpu - report: onnx_cpu - - name: PyTorch Example CPU tests on Ubuntu - framework: pytorch_examples - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_example_cpu - - name: ${{ matrix.config.name }} - - runs-on: ${{ matrix.config.runner }} - - container: - image: ${{ matrix.config.image }} - options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ - - defaults: - run: - shell: bash - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Install dependencies - run: | - apt-get update && apt-get install libsndfile1-dev libgl1 -y - python -m pip install -e .[quality,test] - - - name: Environment - run: | - python utils/print_env.py - - - name: Run fast PyTorch CPU tests - if: ${{ matrix.config.framework == 'pytorch' }} - run: | - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "not Flax and not Onnx" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/ - - - name: Run fast Flax TPU tests - if: ${{ matrix.config.framework == 'flax' }} - run: | - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "Flax" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/ - - - name: Run fast ONNXRuntime CPU tests - if: ${{ matrix.config.framework == 'onnxruntime' }} - run: | - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - -s -v -k "Onnx" \ - --make-reports=tests_${{ matrix.config.report }} \ - tests/ - - - name: Run example PyTorch CPU tests - if: ${{ matrix.config.framework == 'pytorch_examples' }} - run: | - python -m pip install peft - python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ - --make-reports=tests_${{ matrix.config.report }} \ - examples - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_${{ matrix.config.report }}_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: pr_${{ matrix.config.report }}_test_reports - path: reports diff --git a/.github/workflows/push_tests_mps.yml b/.github/workflows/push_tests_mps.yml deleted file mode 100644 index bdea0b760b26..000000000000 --- a/.github/workflows/push_tests_mps.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Fast mps tests on main - -on: - push: - branches: - - main - -env: - DIFFUSERS_IS_CI: yes - HF_HOME: /mnt/cache - OMP_NUM_THREADS: 8 - MKL_NUM_THREADS: 8 - PYTEST_TIMEOUT: 600 - RUN_SLOW: no - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - run_fast_tests_apple_m1: - name: Fast PyTorch MPS tests on MacOS - runs-on: [ self-hosted, apple-m1 ] - - steps: - - name: Checkout diffusers - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Clean checkout - shell: arch -arch arm64 bash {0} - run: | - git clean -fxd - - - name: Setup miniconda - uses: ./.github/actions/setup-miniconda - with: - python-version: 3.9 - - - name: Install dependencies - shell: arch -arch arm64 bash {0} - run: | - ${CONDA_RUN} python -m pip install --upgrade pip - ${CONDA_RUN} python -m pip install -e .[quality,test] - ${CONDA_RUN} python -m pip install torch torchvision torchaudio - ${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate.git - ${CONDA_RUN} python -m pip install transformers --upgrade - - - name: Environment - shell: arch -arch arm64 bash {0} - run: | - ${CONDA_RUN} python utils/print_env.py - - - name: Run fast PyTorch tests on M1 (MPS) - shell: arch -arch arm64 bash {0} - env: - HF_HOME: /System/Volumes/Data/mnt/cache - HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} - run: | - ${CONDA_RUN} python -m pytest -n 0 -s -v --make-reports=tests_torch_mps tests/ - - - name: Failure short reports - if: ${{ failure() }} - run: cat reports/tests_torch_mps_failures_short.txt - - - name: Test suite reports artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: pr_torch_mps_test_reports - path: reports diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index ff609ee76946..000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Stale Bot - -on: - schedule: - - cron: "0 15 * * *" - -jobs: - close_stale_issues: - name: Close Stale Issues - if: github.repository == 'huggingface/diffusers' - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v2 - - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install requirements - run: | - pip install PyGithub - - name: Close stale issues - run: | - python utils/stale.py diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml deleted file mode 100644 index fbd051b4da0d..000000000000 --- a/.github/workflows/typos.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Check typos - -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: typos-action - uses: crate-ci/typos@v1.12.4 diff --git a/.github/workflows/upload_pr_documentation.yml b/.github/workflows/upload_pr_documentation.yml deleted file mode 100644 index fc102df8103e..000000000000 --- a/.github/workflows/upload_pr_documentation.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Upload PR Documentation - -on: - workflow_run: - workflows: ["Build PR Documentation"] - types: - - completed - -jobs: - build: - uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main - with: - package_name: diffusers - secrets: - hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} - comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} From 0dd19ec7b0d06a64f1e127f46b33e4d36aa85f94 Mon Sep 17 00:00:00 2001 From: Shauray Singh <39147312+shauray8@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:36:09 +0530 Subject: [PATCH 2/3] add torch utils, fixing hf import errors --- src/diffusers/utils/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/diffusers/utils/__init__.py b/src/diffusers/utils/__init__.py index 35aba10d7e58..ede464063181 100644 --- a/src/diffusers/utils/__init__.py +++ b/src/diffusers/utils/__init__.py @@ -106,6 +106,7 @@ convert_unet_state_dict_to_peft, ) +from .torch_utils import randn_tensor logger = get_logger(__name__) From 423162a7bccd809718d0d75394fe948502f75be7 Mon Sep 17 00:00:00 2001 From: Shauray Singh <39147312+shauray8@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:15:20 +0530 Subject: [PATCH 3/3] Update __init__.py --- src/diffusers/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffusers/utils/__init__.py b/src/diffusers/utils/__init__.py index 4e2f07f2ba89..0cb1a1dcc8c3 100644 --- a/src/diffusers/utils/__init__.py +++ b/src/diffusers/utils/__init__.py @@ -106,7 +106,7 @@ convert_state_dict_to_peft, convert_unet_state_dict_to_peft, ) - +from .torch_utils import randn_tensor logger = get_logger(__name__)