Commit 59cbb97
committed
[test] AnyFlow embedder tests: initialize ReplicatedLinear weights for CPU runs
FastVideo's ReplicatedLinear allocates weights via torch.empty and
relies on a downstream load_weights pass to populate them. CPU unit
tests bypass that pass, so weights start as NaN/Inf and the embedder
forward produces NaN everywhere. Add _init_uninitialized_weights that
Xavier-init's every >=2D param and zeros the rest before .eval().
Verified on GMI (gpu-h200-06 with 8x H200): all 43 tests pass.1 parent 5a5c085 commit 59cbb97
1 file changed
Lines changed: 20 additions & 0 deletions
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
45 | 63 | | |
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
49 | 67 | | |
50 | 68 | | |
| 69 | + | |
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
| |||
61 | 80 | | |
62 | 81 | | |
63 | 82 | | |
| 83 | + | |
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
| |||
0 commit comments