Skip to content

Add multi-control transfer inference smoke test#77

Merged
foreverlms merged 2 commits into
mainfrom
liangf/multi-control-inference-smoke-test
Jul 2, 2026
Merged

Add multi-control transfer inference smoke test#77
foreverlms merged 2 commits into
mainfrom
liangf/multi-control-inference-smoke-test

Conversation

@lfengad

@lfengad lfengad commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

Adds test_nano_inference_multi_control_transfer to tests/nano_inference_smoke_test.py, giving the Cosmos3-Nano generator inference smoke test coverage for the multi-control transfer feature (two control hints blended by multi_control_two_way_attention).

It mirrors the existing single-control transfer run (same latency preset, 4 ranks → cfgp=2/cp=2), but the generated spec sets two hints (edge + blur) with per-hint weight and no control_path, so both controls are computed on the fly from a single vision_path (the pinned public robot_pouring.mp4 clip) and aggregated by the weighted N-pass multi-control attention.

What it verifies

  • Multi-control path executes: 2 hints → control_weights set → the network routes to multi_control_two_way_attention (both controls computed on the fly).
  • Process stays within expected invariants: the framework's multi-control runtime asserts (weights length == #controls, packing consistency, batch_size==1) must hold or the run exits non-zero → the test fails. Plus the test's own asserts: exactly one output; both edge and blur active with a weight and no control_path; vision_path set; control_guidance and guidance > 1.0.
  • Output is valid: non-degenerate vision.mp4 via the existing _assert_video_has_content (≥16 frames, finite pixels, pixel std > 3).

Smoke-level (output validity + path executed under asserts), not numeric goldens — consistent with the rest of the module.

Test

Runs on the same 8-GPU gate as test_nano_inference_omni:

pytest -s tests/nano_inference_smoke_test.py --num-gpus=8 --levels=2 -o addopts=

Verified end to end on a 4-rank latency run (exit 0; log shows both Computing edge control input on the fly and Computing blur control input on the fly; all assertions pass). Collection confirmed both tests register (MAX_GPUS=8).

🤖 Generated with Claude Code

lfengad and others added 2 commits July 2, 2026 01:32
Add `test_nano_inference_multi_control_transfer` to the Cosmos3-Nano
generator inference smoke test, mirroring the existing single-control
transfer run (latency preset, 4 ranks -> cfgp=2/cp=2).

The generated spec sets two control hints (edge + blur) with per-hint
weights and no control_path, so both controls are derived on the fly
from a single `vision_path` (the pinned public robot_pouring.mp4 clip)
and blended by `multi_control_two_way_attention` (N maskless SDPA passes
summed by weight). This exercises the multi-control path added in the
multi-control transfer inference feature.

Asserts: exactly one output; both edge and blur hints active with a
per-hint weight and no control_path; vision_path set; control_guidance
and guidance > 1.0; and a non-degenerate vision.mp4 (via the existing
_assert_video_has_content). Smoke-level (output validity + path executed
under the framework's multi-control runtime asserts), not numeric goldens.

Verified end to end on a 4-rank latency run (exit 0, both controls
computed on the fly, all assertions pass).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@foreverlms foreverlms merged commit ea63366 into main Jul 2, 2026
8 checks passed
@foreverlms foreverlms deleted the liangf/multi-control-inference-smoke-test branch July 2, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants