Skip to content

Add transfer control-CFG (cfg for control inputs) + smoke-test coverage#68

Merged
lfengad merged 1 commit into
mainfrom
add-curator-to-sft-jsonl
Jun 29, 2026
Merged

Add transfer control-CFG (cfg for control inputs) + smoke-test coverage#68
lfengad merged 1 commit into
mainfrom
add-curator-to-sft-jsonl

Conversation

@lfengad

@lfengad lfengad commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports the control-input CFG feature (from i4 commit f11349b) into the transfer inference path, reconciling with logic already synced into this repo, and adds CD smoke-test coverage for transfer inference.

  • omni_mot_model.py already carries the velocity_postprocess_builder hook — no model change needed.
  • transfer.py: add _build_no_control_inference_state and build_control_cfg_postprocess, wired through generate_samples_from_batch via velocity_postprocess_builder. Previously transfer.py passed control_guidance/control_guidance_interval directly, where they were silently dropped by **kwargs (control-CFG was a no-op).
  • args.py: add emphasize_control_in_prompt (TransferDataArgs/Overrides + _TRANSFER_SAMPLE_DEFAULTS) to match the ported prompt-emphasis logic.

Test coverage

Extends tests/nano_inference_smoke_test.py (the generator-inference-smoke CD job) to also run a video2video edge transfer with control_guidance=1.5 in the same Nano inference call:

  • Spec is built inline (_TRANSFER_SPEC, written to a temp file — not committed under inputs/), pulling the control video from the public NVIDIA/cosmos GitHub raw URL (same file the cookbook edge.json uses), downscaled for a fast smoke run (480p / 10 steps / single 29-frame chunk).
  • Validates transfer-specific attributes (edge control_path, control_guidance > 1, guidance > 1) and a non-degenerate output clip via a new _assert_video_has_content helper (frame count + pixel variation).

Verification

Verified end-to-end on a GB200 node with this repo's .venv:

  • README Nano edge transfer (control_guidance=1.5) → valid 121-frame 720p video; emphasize_control_in_prompt and the control-CFG path both run.
  • Inline smoke spec → status: success, control_guidance=1.5, guidance=3.0, non-degenerate output (frames=29, pixel std ≈ 68).

Note: the branch name predates this work; after rebase it carries only the transfer commit (the curator-to-SFT converter already merged as #62).

🤖 Generated with Claude Code

Port the control-input CFG feature from i4 commit f11349b into the transfer
inference path, reconciling with logic already synced into this repo:

- omni_mot_model.py already carries the velocity_postprocess_builder hook, so
  no model change was needed.
- transfer.py: add _build_no_control_inference_state and
  build_control_cfg_postprocess, and wire them through
  generate_samples_from_batch via velocity_postprocess_builder. Previously
  transfer.py passed control_guidance/control_guidance_interval directly, which
  were silently dropped by **kwargs (control-CFG was a no-op).
- args.py: add emphasize_control_in_prompt (TransferDataArgs/Overrides +
  _TRANSFER_SAMPLE_DEFAULTS) to match the ported prompt-emphasis logic.

Test: extend tests/nano_inference_smoke_test.py to cover transfer inference. The
existing throughput run keeps t2vs + policy + forward_dynamics; transfer is run
as a SEPARATE latency-preset call. Control-CFG runs an extra control-dropped
forward each step, which under throughput (data-parallel over samples, FSDP-
sharded) executes on only the transfer rank and deadlocks the cross-rank
allgather -- so transfer must use the latency preset (context/CFG parallel, all
ranks on one sample), matching the cookbook multi-GPU transfer recipe. The spec
is built inline (_TRANSFER_SPEC, written to a temp file) and pulls the control
video from the public NVIDIA/cosmos GitHub raw URL (same file the cookbook
edge.json uses), downscaled for a fast smoke run. Validates transfer-specific
attributes (edge control_path, control_guidance>1, guidance>1) and a
non-degenerate output clip via the new _assert_video_has_content helper.

Verified on a GB200 node: the README Nano edge transfer and the inline smoke
spec both generate valid, non-degenerate video; the latency-preset transfer
(4 ranks: cfgp=2, cp=2) completes and passes the test assertions, while the
throughput+mixed path reproduces the deadlock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lfengad lfengad force-pushed the add-curator-to-sft-jsonl branch from 682e0a5 to 7771d1d Compare June 29, 2026 11:04
@lfengad lfengad merged commit 469c102 into main Jun 29, 2026
8 checks passed
@lfengad lfengad deleted the add-curator-to-sft-jsonl branch June 29, 2026 12:38
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