Repository navigation
111 lines (106 loc) · 4.15 KB
/
Copy pathtest_inf2_diffusers.yml
File metadata and controls
111 lines (106 loc) · 4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Optimum neuron / Test INF2 Diffusers
on:
push:
branches: [ main ]
paths:
- 'pyproject.toml'
- 'optimum/commands/export/neuronx.py'
- 'optimum/exporters/**.py'
- 'optimum/neuron/cache/**.py'
- 'optimum/neuron/modeling_base.py'
- 'optimum/neuron/modeling_traced.py'
- 'optimum/neuron/modeling_diffusion.py'
- 'optimum/neuron/models/inference/flux/**.py'
- 'optimum/neuron/pipelines/diffusers/**.py'
- 'optimum/neuron/utils/**.py'
- 'tests/inference/diffusers/**.py'
- '.github/workflows/test_inf2_diffusers.yml'
pull_request:
branches: [ main ]
paths:
- 'pyproject.toml'
- 'optimum/commands/export/neuronx.py'
- 'optimum/exporters/**.py'
- 'optimum/neuron/cache/**.py'
- 'optimum/neuron/modeling_base.py'
- 'optimum/neuron/modeling_traced.py'
- 'optimum/neuron/modeling_diffusion.py'
- 'optimum/neuron/models/inference/flux/**.py'
- 'optimum/neuron/pipelines/diffusers/**.py'
- 'optimum/neuron/utils/**.py'
- 'tests/inference/diffusers/**.py'
- '.github/workflows/test_inf2_diffusers.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: true
jobs:
sanity:
name: Sanity
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Run sanity check
uses: ./.github/actions/sanity-check
with:
hf_token: ${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CACHE }}
diffusers-model-tests:
name: Run diffusers model tests
needs: sanity
runs-on:
group: aws-inf2-8xlarge
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Install Neuronx runtime
uses: ./.github/actions/install_neuronx_runtime
- name: Install cv2 dependencies
run: |
sudo apt-get install ffmpeg libsm6 libxext6 -y
sudo apt-get install -y --no-install-recommends libarchive13
- name: Setup virtual environment
uses: ./.github/actions/setup_venv
- name: Install diffusers dependencies
run: |
source aws_neuron_venv_pytorch/bin/activate
uv pip install ".[diffusers,diffusers-tests]"
- name: Run stable diffusion tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest tests/inference/diffusers/test_stable_diffusion.py
- name: Run pixart tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest tests/inference/diffusers/test_pixart.py
- name: Run flux tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest tests/inference/diffusers/test_flux.py --forked -q
diffusers-cache-cli-tests:
name: Run diffusers cache and CLI tests
needs: sanity
runs-on:
group: aws-inf2-8xlarge
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Install Neuronx runtime
uses: ./.github/actions/install_neuronx_runtime
- name: Install cv2 dependencies
run: |
sudo apt-get install ffmpeg libsm6 libxext6 -y
sudo apt-get install -y --no-install-recommends libarchive13
- name: Setup virtual environment
uses: ./.github/actions/setup_venv
- name: Install diffusers dependencies
run: |
source aws_neuron_venv_pytorch/bin/activate
uv pip install ".[diffusers,diffusers-tests]"
- name: Run cache tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest tests/inference/diffusers/test_cache.py
- name: Run cli export tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest tests/inference/diffusers/test_export_cli.py