Skip to content

Fix correlated video-action inference noise - #89

Open
zjn20030811 wants to merge 1 commit into
dreamzero0:mainfrom
zjn20030811:fix/wam-core-correctness
Open

Fix correlated video-action inference noise#89
zjn20030811 wants to merge 1 commit into
dreamzero0:mainfrom
zjn20030811:fix/wam-core-correctness

Conversation

@zjn20030811

Copy link
Copy Markdown

Summary

  • draw video and action initialization noise from disjoint portions of one seeded random stream
  • keep seeded joint inference exactly reproducible
  • preserve the existing single-shape noise helper behavior

Why

Joint inference currently creates a new generator with the same seed for each modality. With the default Wan2.2 shapes, all 1,536 action-noise values are identical to the prefix of the video-noise stream (1,536/1,536). Training uses separate sequential randn_like draws, so inference starts from a different joint noise distribution.

Using one generator for both draws restores non-overlapping samples while retaining deterministic replay. In the focused default-shape check, prefix identity drops from 1,536/1,536 to 1/1,536; rerunning with the same seed reproduces both tensors exactly.

Testing

  • python -m pytest -q -p no:cacheprovider tests/test_noise_utils.py
  • Ruff checks on the new helper and test
  • Python bytecode compilation for the changed modules and test

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.

1 participant