Commit b96adb1
committed
Refactor Cosmos 2.5 model and tests for improved precision and functionality
- Added torchvision transforms import to the Cosmos 2.5 model for enhanced functionality.
- Updated max_size calculation in positional embedding classes to enforce strict behavior.
- Changed precision from bfloat16 to float32 in test cases to improve numerical stability.
- Tightened numerical difference assertions in tests to ensure higher accuracy in model outputs.
These changes enhance the model's robustness and ensure better alignment with reference implementations.1 parent bbfae59 commit b96adb1
File tree
2 files changed
+8
-9
lines changed- fastvideo
- models/dits
- tests/transformers
2 files changed
+8
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
579 | 581 | | |
580 | 582 | | |
581 | 583 | | |
582 | | - | |
| 584 | + | |
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
| |||
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
| |||
907 | 909 | | |
908 | 910 | | |
909 | 911 | | |
910 | | - | |
911 | 912 | | |
912 | 913 | | |
913 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
| 180 | + | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| |||
441 | 440 | | |
442 | 441 | | |
443 | 442 | | |
444 | | - | |
445 | | - | |
| 443 | + | |
| 444 | + | |
446 | 445 | | |
447 | 446 | | |
448 | 447 | | |
| |||
454 | 453 | | |
455 | 454 | | |
456 | 455 | | |
457 | | - | |
458 | | - | |
| 456 | + | |
459 | 457 | | |
460 | 458 | | |
461 | 459 | | |
| |||
0 commit comments