Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fengzch-das
nunchaku
Commits
bac3bbe5
Commit
bac3bbe5
authored
Apr 12, 2025
by
muyangli
Browse files
speed up tests
parent
15beb039
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
22 deletions
+37
-22
.github/workflows/pr_test_linux.yaml
.github/workflows/pr_test_linux.yaml
+18
-3
tests/flux/test_flux_tools.py
tests/flux/test_flux_tools.py
+19
-19
No files found.
.github/workflows/pr_test_linux.yaml
View file @
bac3bbe5
...
@@ -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
:
9
0
timeout-minutes
:
12
0
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')
...
...
tests/flux/test_flux_tools.py
View file @
bac3bbe5
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment