Commit bac3bbe5 authored by muyangli's avatar muyangli
Browse files

speed up tests

parent 15beb039
...@@ -84,12 +84,12 @@ jobs: ...@@ -84,12 +84,12 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -x -s tests/flux/test_flux_memory.py HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -x tests/flux/test_flux_memory.py
test-flux-other: test-flux-other:
needs: build needs: build
runs-on: self-hosted runs-on: self-hosted
timeout-minutes: 90 timeout-minutes: 120
if: ${{ github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true' }} if: ${{ github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true' }}
steps: steps:
...@@ -99,7 +99,22 @@ jobs: ...@@ -99,7 +99,22 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -x -s tests/flux --ignore=tests/flux/test_flux_memory.py HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -x tests/flux --ignore=tests/flux/test_flux_memory.py
test-sana:
needs: build
runs-on: self-hosted
timeout-minutes: 60
if: ${{ github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true' }}
steps:
- name: Run SANA tests
run: |
which python
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python
HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -x tests/sana
clean-up: clean-up:
if: always() && (github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true') if: always() && (github.event_name != 'issue_comment' || needs.check-comment.outputs.should_run == 'true')
......
...@@ -62,25 +62,25 @@ def test_flux_fill_dev(): ...@@ -62,25 +62,25 @@ def test_flux_fill_dev():
) )
@pytest.mark.skipif(is_turing(), reason="Skip tests due to using Turing GPUs") # @pytest.mark.skipif(is_turing(), reason="Skip tests due to using Turing GPUs")
def test_flux_dev_canny_lora(): # def test_flux_dev_canny_lora():
run_test( # run_test(
precision=get_precision(), # precision=get_precision(),
model_name="flux.1-dev", # model_name="flux.1-dev",
dataset_name="MJHQ-control", # dataset_name="MJHQ-control",
task="canny", # task="canny",
dtype=torch.bfloat16, # dtype=torch.bfloat16,
height=1024, # height=1024,
width=1024, # width=1024,
num_inference_steps=30, # num_inference_steps=30,
guidance_scale=30, # guidance_scale=30,
attention_impl="nunchaku-fp16", # attention_impl="nunchaku-fp16",
cpu_offload=False, # cpu_offload=False,
lora_names="canny", # lora_names="canny",
lora_strengths=0.85, # lora_strengths=0.85,
cache_threshold=0, # cache_threshold=0,
expected_lpips=0.081, # expected_lpips=0.081,
) # )
@pytest.mark.skipif(is_turing(), reason="Skip tests due to using Turing GPUs") @pytest.mark.skipif(is_turing(), reason="Skip tests due to using Turing GPUs")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment