Skip to content

Commit be358aa

Browse files
committed
[AnyFlow] tests: drop @slow integration test scaffolds for initial PR
.ai/skills/model-integration/SKILL.md is explicit: 'No integration / slow tests in the initial PR — don't add anything gated on @slow / RUN_SLOW=1 yet.' Our two integration test classes were shape-only assertions with TODOs for a future numeric reference, so dropping them loses no actual coverage — the relevant rollouts are covered by H200 bit-exact replay outside the pytest suite. Can land a follow-up PR after merge with proper numeric reference slices once the maintainer is comfortable enabling slow tests.
1 parent 27e16a2 commit be358aa

2 files changed

Lines changed: 2 additions & 95 deletions

File tree

tests/pipelines/anyflow/test_anyflow.py

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import gc
1615
import unittest
1716

1817
import torch
@@ -25,13 +24,7 @@
2524
FlowMapEulerDiscreteScheduler,
2625
)
2726

28-
from ...testing_utils import (
29-
backend_empty_cache,
30-
enable_full_determinism,
31-
require_torch_accelerator,
32-
slow,
33-
torch_device,
34-
)
27+
from ...testing_utils import enable_full_determinism
3528
from ..pipeline_params import TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_IMAGE_PARAMS, TEXT_TO_IMAGE_PARAMS
3629
from ..test_pipelines_common import PipelineTesterMixin
3730

@@ -140,43 +133,3 @@ def test_save_load_float16(self):
140133
@unittest.skip("AnyFlow's custom attention processor does not support sliced attention.")
141134
def test_attention_slicing_forward_pass(self):
142135
pass
143-
144-
145-
@slow
146-
@require_torch_accelerator
147-
class AnyFlowPipelineIntegrationTests(unittest.TestCase):
148-
"""End-to-end integration tests against released NVIDIA AnyFlow checkpoints. Run with ``RUN_SLOW=1``."""
149-
150-
prompt = "A cat walks on the grass, realistic style."
151-
152-
def setUp(self):
153-
super().setUp()
154-
gc.collect()
155-
backend_empty_cache(torch_device)
156-
157-
def tearDown(self):
158-
super().tearDown()
159-
gc.collect()
160-
backend_empty_cache(torch_device)
161-
162-
def test_anyflow_t2v_1_3b(self):
163-
pipe = AnyFlowPipeline.from_pretrained(
164-
"nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers",
165-
torch_dtype=torch.bfloat16,
166-
)
167-
pipe.to(torch_device)
168-
169-
generator = torch.Generator(device=torch_device).manual_seed(0)
170-
video = pipe(
171-
prompt=self.prompt,
172-
num_inference_steps=4,
173-
num_frames=33,
174-
height=480,
175-
width=832,
176-
generator=generator,
177-
output_type="pt",
178-
).frames
179-
180-
self.assertEqual(video[0].shape, (33, 3, 480, 832))
181-
# TODO: extend with a numeric reference slice once a GPU reference run is captured. The current
182-
# shape-only assertion guards against regressions in the sampling loop's frame count.

tests/pipelines/anyflow/test_anyflow_far.py

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import gc
1615
import unittest
1716

1817
import torch
@@ -25,13 +24,7 @@
2524
FlowMapEulerDiscreteScheduler,
2625
)
2726

28-
from ...testing_utils import (
29-
backend_empty_cache,
30-
enable_full_determinism,
31-
require_torch_accelerator,
32-
slow,
33-
torch_device,
34-
)
27+
from ...testing_utils import enable_full_determinism
3528
from ..pipeline_params import TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_IMAGE_PARAMS, TEXT_TO_IMAGE_PARAMS
3629
from ..test_pipelines_common import PipelineTesterMixin
3730

@@ -162,42 +155,3 @@ def test_attention_slicing_forward_pass(self):
162155
)
163156
def test_callback_inputs(self):
164157
pass
165-
166-
167-
@slow
168-
@require_torch_accelerator
169-
class AnyFlowFARPipelineIntegrationTests(unittest.TestCase):
170-
"""End-to-end integration tests against released NVIDIA AnyFlow-FAR checkpoints. Run with ``RUN_SLOW=1``."""
171-
172-
prompt = "A cat walks on the grass, realistic style."
173-
174-
def setUp(self):
175-
super().setUp()
176-
gc.collect()
177-
backend_empty_cache(torch_device)
178-
179-
def tearDown(self):
180-
super().tearDown()
181-
gc.collect()
182-
backend_empty_cache(torch_device)
183-
184-
def test_anyflow_far_t2v_1_3b(self):
185-
pipe = AnyFlowFARPipeline.from_pretrained(
186-
"nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers",
187-
torch_dtype=torch.bfloat16,
188-
)
189-
pipe.to(torch_device)
190-
191-
generator = torch.Generator(device=torch_device).manual_seed(0)
192-
video = pipe(
193-
prompt=self.prompt,
194-
num_inference_steps=4,
195-
num_frames=33,
196-
height=480,
197-
width=832,
198-
generator=generator,
199-
output_type="pt",
200-
).frames
201-
202-
self.assertEqual(video[0].shape, (33, 3, 480, 832))
203-
# TODO: extend with a numeric reference slice once a GPU reference run is captured.

0 commit comments

Comments
 (0)