Cccccz commited on
Commit
37a82b7
·
verified ·
1 Parent(s): 2382de8

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. FlowCache/FlowCache4MAGI-1-dev-V1/config/sample/physicsiq.json +81 -0
  2. FlowCache/FlowCache4MAGI-1-dev-V1/config/sample/vbench.json +81 -0
  3. FlowCache/FlowCache4MAGI-1-dev-V1/config/single_run/flowcache_t2v.json +81 -0
  4. FlowCache/FlowCache4MAGI-1-dev-V1/config/single_run/flowcache_v2v.json +86 -0
  5. FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/magi/4.5B_base/inference_weight/model.safetensors.index.json +905 -0
  6. FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/magi/4.5B_distill/inference_weight.distill/model.safetensors.index.json +905 -0
  7. FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/t5/t5-v1_1-xxl/config.json +31 -0
  8. FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/t5/t5-v1_1-xxl/pytorch_model.bin.index.json +227 -0
  9. FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/t5/t5-v1_1-xxl/special_tokens_map.json +1 -0
  10. FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/vae/config.json +22 -0
  11. FlowCache/FlowCache4MAGI-1-dev-V1/inference/__init__.py +0 -0
  12. FlowCache/FlowCache4MAGI-1-dev-V1/logs/flowcache_vbench_20260520_102116.log +68 -0
  13. FlowCache/FlowCache4MAGI-1-dev-V1/logs/flowcache_vbench_20260520_103047.log +68 -0
  14. FlowCache/FlowCache4MAGI-1-dev-V1/scripts/metric.sh +5 -0
  15. FlowCache/FlowCache4MAGI-1-dev-V1/tools/plot_l1_rel.py +152 -0
  16. FlowCache/FlowCache4MAGI-1-dev-V1/tools/plot_residual_norms.py +142 -0
  17. FlowCache/FlowCache4MAGI-1-dev-V1/tools/video_metrics.py +108 -0
  18. FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/context_parallel.cpython-312.pyc +0 -0
  19. FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/pipeline_parallel.cpython-310.pyc +0 -0
  20. FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/pipeline_parallel.cpython-312.pyc +0 -0
  21. FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/tile_parallel.cpython-310.pyc +0 -0
  22. FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/tile_parallel.cpython-312.pyc +0 -0
  23. FlowCache/FlowCache4MAGI-1/inference/model/dit/__init__.py +18 -0
  24. FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/__init__.cpython-310.pyc +0 -0
  25. FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/__init__.cpython-312.pyc +0 -0
  26. FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_model.cpython-310.pyc +0 -0
  27. FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_model.cpython-312.pyc +0 -0
  28. FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_module.cpython-310.pyc +0 -0
  29. FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_module.cpython-312.pyc +0 -0
  30. FlowCache/FlowCache4MAGI-1/inference/model/dit/dit_model.py +733 -0
  31. FlowCache/FlowCache4MAGI-1/inference/model/dit/dit_module.py +1599 -0
  32. FlowCache/FlowCache4MAGI-1/inference/model/t5/__init__.py +17 -0
  33. FlowCache/FlowCache4MAGI-1/inference/model/t5/__pycache__/__init__.cpython-310.pyc +0 -0
  34. FlowCache/FlowCache4MAGI-1/inference/model/t5/__pycache__/t5_model.cpython-310.pyc +0 -0
  35. FlowCache/FlowCache4MAGI-1/inference/model/t5/t5_model.py +286 -0
  36. FlowCache/FlowCache4MAGI-1/inference/model/vae/__init__.py +18 -0
  37. FlowCache/FlowCache4MAGI-1/inference/model/vae/__pycache__/__init__.cpython-310.pyc +0 -0
  38. FlowCache/FlowCache4MAGI-1/inference/model/vae/__pycache__/vae_model.cpython-310.pyc +0 -0
  39. FlowCache/FlowCache4MAGI-1/inference/model/vae/__pycache__/vae_module.cpython-310.pyc +0 -0
  40. FlowCache/FlowCache4MAGI-1/inference/model/vae/vae_model.py +361 -0
  41. FlowCache/FlowCache4MAGI-1/inference/model/vae/vae_module.py +757 -0
  42. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/__init__.cpython-310.pyc +0 -0
  43. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/__init__.cpython-312.pyc +0 -0
  44. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/entry.cpython-310.pyc +0 -0
  45. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/entry.cpython-312.pyc +0 -0
  46. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/flowcache.cpython-310.pyc +0 -0
  47. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/flowcache.cpython-312.pyc +0 -0
  48. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/pipeline.cpython-310.pyc +0 -0
  49. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/pipeline.cpython-312.pyc +0 -0
  50. FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/prompt_process.cpython-310.pyc +0 -0
FlowCache/FlowCache4MAGI-1-dev-V1/config/sample/physicsiq.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_config": {
3
+ "model_name": "videodit_ardf",
4
+ "num_layers": 34,
5
+ "hidden_size": 3072,
6
+ "ffn_hidden_size": 12288,
7
+ "num_attention_heads": 24,
8
+ "num_query_groups": 8,
9
+ "kv_channels": 128,
10
+ "layernorm_epsilon": 1e-06,
11
+ "apply_layernorm_1p": true,
12
+ "x_rescale_factor": 1,
13
+ "half_channel_vae": false,
14
+ "params_dtype": "torch.bfloat16",
15
+ "patch_size": 2,
16
+ "t_patch_size": 1,
17
+ "in_channels": 16,
18
+ "out_channels": 16,
19
+ "cond_hidden_ratio": 0.25,
20
+ "caption_channels": 4096,
21
+ "caption_max_length": 800,
22
+ "xattn_cond_hidden_ratio": 1.0,
23
+ "cond_gating_ratio": 1.0,
24
+ "gated_linear_unit": false
25
+ },
26
+ "runtime_config": {
27
+ "cfg_number": 1,
28
+ "cfg_t_range": [
29
+ 0.0,
30
+ 0.0217,
31
+ 0.1,
32
+ 0.3,
33
+ 0.999
34
+ ],
35
+ "prev_chunk_scales": [
36
+ 1.5,
37
+ 1.5,
38
+ 1.5,
39
+ 1.0,
40
+ 1.0
41
+ ],
42
+ "text_scales": [
43
+ 7.5,
44
+ 7.5,
45
+ 7.5,
46
+ 0.0,
47
+ 0.0
48
+ ],
49
+ "noise2clean_kvrange": [],
50
+ "clean_chunk_kvrange": 1,
51
+ "clean_t": 0.9999,
52
+ "seed": 1234,
53
+ "num_frames": 120,
54
+ "video_size_h": 720,
55
+ "video_size_w": 1280,
56
+ "num_steps": 64,
57
+ "window_size": 4,
58
+ "fps": 24,
59
+ "chunk_width": 6,
60
+ "load": "/path/to/your/MAGI-1/checkpoint/4.5B_distill",
61
+ "t5_pretrained": "/path/to/your/t5/safetensor",
62
+ "t5_device": "cuda",
63
+ "vae_pretrained": "/path/to/your/vae/checkpoint",
64
+ "scale_factor": 0.18215,
65
+ "temporal_downsample_factor": 4
66
+ },
67
+ "engine_config": {
68
+ "distributed_backend": "nccl",
69
+ "distributed_timeout_minutes": 15,
70
+ "pp_size": 1,
71
+ "cp_size": 1,
72
+ "cp_strategy": "none",
73
+ "ulysses_overlap_degree": 1,
74
+ "fp8_quant": false,
75
+ "distill_nearly_clean_chunk_threshold": 0.3,
76
+ "shortcut_mode": "8,16,16",
77
+ "distill": true,
78
+ "kv_offload": true,
79
+ "enable_cuda_graph": false
80
+ }
81
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/config/sample/vbench.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_config": {
3
+ "model_name": "videodit_ardf",
4
+ "num_layers": 34,
5
+ "hidden_size": 3072,
6
+ "ffn_hidden_size": 12288,
7
+ "num_attention_heads": 24,
8
+ "num_query_groups": 8,
9
+ "kv_channels": 128,
10
+ "layernorm_epsilon": 1e-06,
11
+ "apply_layernorm_1p": true,
12
+ "x_rescale_factor": 1,
13
+ "half_channel_vae": false,
14
+ "params_dtype": "torch.bfloat16",
15
+ "patch_size": 2,
16
+ "t_patch_size": 1,
17
+ "in_channels": 16,
18
+ "out_channels": 16,
19
+ "cond_hidden_ratio": 0.25,
20
+ "caption_channels": 4096,
21
+ "caption_max_length": 800,
22
+ "xattn_cond_hidden_ratio": 1.0,
23
+ "cond_gating_ratio": 1.0,
24
+ "gated_linear_unit": false
25
+ },
26
+ "runtime_config": {
27
+ "cfg_number": 1,
28
+ "cfg_t_range": [
29
+ 0.0,
30
+ 0.0217,
31
+ 0.1,
32
+ 0.3,
33
+ 0.999
34
+ ],
35
+ "prev_chunk_scales": [
36
+ 1.5,
37
+ 1.5,
38
+ 1.5,
39
+ 1.0,
40
+ 1.0
41
+ ],
42
+ "text_scales": [
43
+ 7.5,
44
+ 7.5,
45
+ 7.5,
46
+ 0.0,
47
+ 0.0
48
+ ],
49
+ "noise2clean_kvrange": [],
50
+ "clean_chunk_kvrange": 1,
51
+ "clean_t": 0.9999,
52
+ "seed": 1234,
53
+ "num_frames": 240,
54
+ "video_size_h": 720,
55
+ "video_size_w": 720,
56
+ "num_steps": 16,
57
+ "window_size": 4,
58
+ "fps": 24,
59
+ "chunk_width": 6,
60
+ "load": "/path/to/your/MAGI-1/checkpoint/4.5B_distill",
61
+ "t5_pretrained": "/path/to/your/t5/safetensor",
62
+ "t5_device": "cuda",
63
+ "vae_pretrained": "/path/to/your/vae/checkpoint",
64
+ "scale_factor": 0.18215,
65
+ "temporal_downsample_factor": 4
66
+ },
67
+ "engine_config": {
68
+ "distributed_backend": "nccl",
69
+ "distributed_timeout_minutes": 15,
70
+ "pp_size": 1,
71
+ "cp_size": 1,
72
+ "cp_strategy": "none",
73
+ "ulysses_overlap_degree": 1,
74
+ "fp8_quant": false,
75
+ "distill_nearly_clean_chunk_threshold": 0.3,
76
+ "shortcut_mode": "8,16,16",
77
+ "distill": true,
78
+ "kv_offload": true,
79
+ "enable_cuda_graph": false
80
+ }
81
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/config/single_run/flowcache_t2v.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_config": {
3
+ "model_name": "videodit_ardf",
4
+ "num_layers": 34,
5
+ "hidden_size": 3072,
6
+ "ffn_hidden_size": 12288,
7
+ "num_attention_heads": 24,
8
+ "num_query_groups": 8,
9
+ "kv_channels": 128,
10
+ "layernorm_epsilon": 1e-06,
11
+ "apply_layernorm_1p": true,
12
+ "x_rescale_factor": 1,
13
+ "half_channel_vae": false,
14
+ "params_dtype": "torch.bfloat16",
15
+ "patch_size": 2,
16
+ "t_patch_size": 1,
17
+ "in_channels": 16,
18
+ "out_channels": 16,
19
+ "cond_hidden_ratio": 0.25,
20
+ "caption_channels": 4096,
21
+ "caption_max_length": 800,
22
+ "xattn_cond_hidden_ratio": 1.0,
23
+ "cond_gating_ratio": 1.0,
24
+ "gated_linear_unit": false
25
+ },
26
+ "runtime_config": {
27
+ "cfg_number": 1,
28
+ "cfg_t_range": [
29
+ 0.0,
30
+ 0.0217,
31
+ 0.1,
32
+ 0.3,
33
+ 0.999
34
+ ],
35
+ "prev_chunk_scales": [
36
+ 1.5,
37
+ 1.5,
38
+ 1.5,
39
+ 1.0,
40
+ 1.0
41
+ ],
42
+ "text_scales": [
43
+ 7.5,
44
+ 7.5,
45
+ 7.5,
46
+ 0.0,
47
+ 0.0
48
+ ],
49
+ "noise2clean_kvrange": [],
50
+ "clean_chunk_kvrange": 1,
51
+ "clean_t": 0.9999,
52
+ "seed": 1234,
53
+ "num_frames": 240,
54
+ "video_size_h": 720,
55
+ "video_size_w": 720,
56
+ "num_steps": 64,
57
+ "window_size": 4,
58
+ "fps": 24,
59
+ "chunk_width": 6,
60
+ "load": "./downloads/4.5B_distill",
61
+ "t5_pretrained": "./downloads/t5_pretrained",
62
+ "t5_device": "cuda",
63
+ "vae_pretrained": "./downloads/vae",
64
+ "scale_factor": 0.18215,
65
+ "temporal_downsample_factor": 4
66
+ },
67
+ "engine_config": {
68
+ "distributed_backend": "nccl",
69
+ "distributed_timeout_minutes": 15,
70
+ "pp_size": 1,
71
+ "cp_size": 1,
72
+ "cp_strategy": "none",
73
+ "ulysses_overlap_degree": 1,
74
+ "fp8_quant": false,
75
+ "distill_nearly_clean_chunk_threshold": 0.3,
76
+ "shortcut_mode": "8,16,16",
77
+ "distill": true,
78
+ "kv_offload": false,
79
+ "enable_cuda_graph": false
80
+ }
81
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/config/single_run/flowcache_v2v.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_config": {
3
+ "model_name": "videodit_ardf",
4
+ "num_layers": 34,
5
+ "hidden_size": 3072,
6
+ "ffn_hidden_size": 12288,
7
+ "num_attention_heads": 24,
8
+ "num_query_groups": 8,
9
+ "kv_channels": 128,
10
+ "layernorm_epsilon": 1e-06,
11
+ "apply_layernorm_1p": true,
12
+ "x_rescale_factor": 1,
13
+ "half_channel_vae": false,
14
+ "params_dtype": "torch.bfloat16",
15
+ "patch_size": 2,
16
+ "t_patch_size": 1,
17
+ "in_channels": 16,
18
+ "out_channels": 16,
19
+ "cond_hidden_ratio": 0.25,
20
+ "caption_channels": 4096,
21
+ "caption_max_length": 800,
22
+ "xattn_cond_hidden_ratio": 1.0,
23
+ "cond_gating_ratio": 1.0,
24
+ "gated_linear_unit": false
25
+ },
26
+ "runtime_config": {
27
+ "cfg_number": 1,
28
+ "cfg_t_range": [
29
+ 0.0,
30
+ 0.0217,
31
+ 0.1,
32
+ 0.3,
33
+ 0.999
34
+ ],
35
+ "prev_chunk_scales": [
36
+ 1.5,
37
+ 1.5,
38
+ 1.5,
39
+ 1.0,
40
+ 1.0
41
+ ],
42
+ "text_scales": [
43
+ 7.5,
44
+ 7.5,
45
+ 7.5,
46
+ 0.0,
47
+ 0.0
48
+ ],
49
+ "noise2clean_kvrange": [
50
+ 5,
51
+ 4,
52
+ 3,
53
+ 2
54
+ ],
55
+ "clean_chunk_kvrange": 1,
56
+ "clean_t": 0.9999,
57
+ "seed": 1234,
58
+ "num_frames": 120,
59
+ "video_size_h": 720,
60
+ "video_size_w": 1280,
61
+ "num_steps": 8,
62
+ "window_size": 4,
63
+ "fps": 24,
64
+ "chunk_width": 6,
65
+ "load": "/path/to/your/MAGI-1/checkpoint/4.5B_distill",
66
+ "t5_pretrained": "/path/to/your/t5/safetensor",
67
+ "t5_device": "cuda",
68
+ "vae_pretrained": "/path/to/your/vae/checkpoint",
69
+ "scale_factor": 0.18215,
70
+ "temporal_downsample_factor": 4
71
+ },
72
+ "engine_config": {
73
+ "distributed_backend": "nccl",
74
+ "distributed_timeout_minutes": 15,
75
+ "pp_size": 1,
76
+ "cp_size": 1,
77
+ "cp_strategy": "none",
78
+ "ulysses_overlap_degree": 1,
79
+ "fp8_quant": false,
80
+ "distill_nearly_clean_chunk_threshold": 0.3,
81
+ "shortcut_mode": "8,16,16",
82
+ "distill": true,
83
+ "kv_offload": false,
84
+ "enable_cuda_graph": false
85
+ }
86
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/magi/4.5B_base/inference_weight/model.safetensors.index.json ADDED
@@ -0,0 +1,905 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 8961059904
4
+ },
5
+ "weight_map": {
6
+ "final_linear.linear.weight": "model-00001-of-00002.safetensors",
7
+ "rope.bands": "model-00001-of-00002.safetensors",
8
+ "t_embedder.mlp.0.bias": "model-00001-of-00002.safetensors",
9
+ "t_embedder.mlp.0.weight": "model-00001-of-00002.safetensors",
10
+ "t_embedder.mlp.2.bias": "model-00001-of-00002.safetensors",
11
+ "t_embedder.mlp.2.weight": "model-00001-of-00002.safetensors",
12
+ "videodit_blocks.final_layernorm.bias": "model-00001-of-00002.safetensors",
13
+ "videodit_blocks.final_layernorm.weight": "model-00001-of-00002.safetensors",
14
+ "videodit_blocks.layers.0.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
15
+ "videodit_blocks.layers.0.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
16
+ "videodit_blocks.layers.0.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
17
+ "videodit_blocks.layers.0.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
18
+ "videodit_blocks.layers.0.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
19
+ "videodit_blocks.layers.0.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
20
+ "videodit_blocks.layers.0.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
21
+ "videodit_blocks.layers.0.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
22
+ "videodit_blocks.layers.0.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
23
+ "videodit_blocks.layers.0.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
24
+ "videodit_blocks.layers.0.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
25
+ "videodit_blocks.layers.0.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
26
+ "videodit_blocks.layers.0.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
27
+ "videodit_blocks.layers.0.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
28
+ "videodit_blocks.layers.0.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
29
+ "videodit_blocks.layers.0.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
30
+ "videodit_blocks.layers.0.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
31
+ "videodit_blocks.layers.0.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
32
+ "videodit_blocks.layers.0.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
33
+ "videodit_blocks.layers.0.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
34
+ "videodit_blocks.layers.0.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
35
+ "videodit_blocks.layers.0.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
36
+ "videodit_blocks.layers.0.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
37
+ "videodit_blocks.layers.0.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
38
+ "videodit_blocks.layers.0.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
39
+ "videodit_blocks.layers.0.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
40
+ "videodit_blocks.layers.1.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
41
+ "videodit_blocks.layers.1.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
42
+ "videodit_blocks.layers.1.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
43
+ "videodit_blocks.layers.1.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
44
+ "videodit_blocks.layers.1.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
45
+ "videodit_blocks.layers.1.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
46
+ "videodit_blocks.layers.1.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
47
+ "videodit_blocks.layers.1.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
48
+ "videodit_blocks.layers.1.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
49
+ "videodit_blocks.layers.1.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
50
+ "videodit_blocks.layers.1.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
51
+ "videodit_blocks.layers.1.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
52
+ "videodit_blocks.layers.1.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
53
+ "videodit_blocks.layers.1.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
54
+ "videodit_blocks.layers.1.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
55
+ "videodit_blocks.layers.1.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
56
+ "videodit_blocks.layers.1.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
57
+ "videodit_blocks.layers.1.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
58
+ "videodit_blocks.layers.1.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
59
+ "videodit_blocks.layers.1.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
60
+ "videodit_blocks.layers.1.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
61
+ "videodit_blocks.layers.1.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
62
+ "videodit_blocks.layers.1.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
63
+ "videodit_blocks.layers.1.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
64
+ "videodit_blocks.layers.1.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
65
+ "videodit_blocks.layers.1.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
66
+ "videodit_blocks.layers.10.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
67
+ "videodit_blocks.layers.10.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
68
+ "videodit_blocks.layers.10.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
69
+ "videodit_blocks.layers.10.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
70
+ "videodit_blocks.layers.10.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
71
+ "videodit_blocks.layers.10.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
72
+ "videodit_blocks.layers.10.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
73
+ "videodit_blocks.layers.10.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
74
+ "videodit_blocks.layers.10.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
75
+ "videodit_blocks.layers.10.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
76
+ "videodit_blocks.layers.10.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
77
+ "videodit_blocks.layers.10.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
78
+ "videodit_blocks.layers.10.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
79
+ "videodit_blocks.layers.10.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
80
+ "videodit_blocks.layers.10.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
81
+ "videodit_blocks.layers.10.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
82
+ "videodit_blocks.layers.10.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
83
+ "videodit_blocks.layers.10.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
84
+ "videodit_blocks.layers.10.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
85
+ "videodit_blocks.layers.10.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
86
+ "videodit_blocks.layers.10.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
87
+ "videodit_blocks.layers.10.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
88
+ "videodit_blocks.layers.10.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
89
+ "videodit_blocks.layers.10.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
90
+ "videodit_blocks.layers.10.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
91
+ "videodit_blocks.layers.10.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
92
+ "videodit_blocks.layers.11.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
93
+ "videodit_blocks.layers.11.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
94
+ "videodit_blocks.layers.11.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
95
+ "videodit_blocks.layers.11.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
96
+ "videodit_blocks.layers.11.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
97
+ "videodit_blocks.layers.11.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
98
+ "videodit_blocks.layers.11.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
99
+ "videodit_blocks.layers.11.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
100
+ "videodit_blocks.layers.11.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
101
+ "videodit_blocks.layers.11.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
102
+ "videodit_blocks.layers.11.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
103
+ "videodit_blocks.layers.11.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
104
+ "videodit_blocks.layers.11.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
105
+ "videodit_blocks.layers.11.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
106
+ "videodit_blocks.layers.11.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
107
+ "videodit_blocks.layers.11.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
108
+ "videodit_blocks.layers.11.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
109
+ "videodit_blocks.layers.11.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
110
+ "videodit_blocks.layers.11.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
111
+ "videodit_blocks.layers.11.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
112
+ "videodit_blocks.layers.11.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
113
+ "videodit_blocks.layers.11.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
114
+ "videodit_blocks.layers.11.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
115
+ "videodit_blocks.layers.11.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
116
+ "videodit_blocks.layers.11.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
117
+ "videodit_blocks.layers.11.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
118
+ "videodit_blocks.layers.12.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
119
+ "videodit_blocks.layers.12.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
120
+ "videodit_blocks.layers.12.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
121
+ "videodit_blocks.layers.12.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
122
+ "videodit_blocks.layers.12.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
123
+ "videodit_blocks.layers.12.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
124
+ "videodit_blocks.layers.12.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
125
+ "videodit_blocks.layers.12.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
126
+ "videodit_blocks.layers.12.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
127
+ "videodit_blocks.layers.12.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
128
+ "videodit_blocks.layers.12.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
129
+ "videodit_blocks.layers.12.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
130
+ "videodit_blocks.layers.12.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
131
+ "videodit_blocks.layers.12.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
132
+ "videodit_blocks.layers.12.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
133
+ "videodit_blocks.layers.12.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
134
+ "videodit_blocks.layers.12.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
135
+ "videodit_blocks.layers.12.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
136
+ "videodit_blocks.layers.12.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
137
+ "videodit_blocks.layers.12.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
138
+ "videodit_blocks.layers.12.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
139
+ "videodit_blocks.layers.12.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
140
+ "videodit_blocks.layers.12.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
141
+ "videodit_blocks.layers.12.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
142
+ "videodit_blocks.layers.12.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
143
+ "videodit_blocks.layers.12.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
144
+ "videodit_blocks.layers.13.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
145
+ "videodit_blocks.layers.13.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
146
+ "videodit_blocks.layers.13.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
147
+ "videodit_blocks.layers.13.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
148
+ "videodit_blocks.layers.13.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
149
+ "videodit_blocks.layers.13.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
150
+ "videodit_blocks.layers.13.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
151
+ "videodit_blocks.layers.13.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
152
+ "videodit_blocks.layers.13.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
153
+ "videodit_blocks.layers.13.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
154
+ "videodit_blocks.layers.13.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
155
+ "videodit_blocks.layers.13.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
156
+ "videodit_blocks.layers.13.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
157
+ "videodit_blocks.layers.13.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
158
+ "videodit_blocks.layers.13.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
159
+ "videodit_blocks.layers.13.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
160
+ "videodit_blocks.layers.13.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
161
+ "videodit_blocks.layers.13.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
162
+ "videodit_blocks.layers.13.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
163
+ "videodit_blocks.layers.13.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
164
+ "videodit_blocks.layers.13.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
165
+ "videodit_blocks.layers.13.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
166
+ "videodit_blocks.layers.13.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
167
+ "videodit_blocks.layers.13.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
168
+ "videodit_blocks.layers.13.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
169
+ "videodit_blocks.layers.13.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
170
+ "videodit_blocks.layers.14.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
171
+ "videodit_blocks.layers.14.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
172
+ "videodit_blocks.layers.14.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
173
+ "videodit_blocks.layers.14.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
174
+ "videodit_blocks.layers.14.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
175
+ "videodit_blocks.layers.14.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
176
+ "videodit_blocks.layers.14.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
177
+ "videodit_blocks.layers.14.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
178
+ "videodit_blocks.layers.14.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
179
+ "videodit_blocks.layers.14.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
180
+ "videodit_blocks.layers.14.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
181
+ "videodit_blocks.layers.14.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
182
+ "videodit_blocks.layers.14.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
183
+ "videodit_blocks.layers.14.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
184
+ "videodit_blocks.layers.14.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
185
+ "videodit_blocks.layers.14.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
186
+ "videodit_blocks.layers.14.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
187
+ "videodit_blocks.layers.14.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
188
+ "videodit_blocks.layers.14.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
189
+ "videodit_blocks.layers.14.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
190
+ "videodit_blocks.layers.14.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
191
+ "videodit_blocks.layers.14.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
192
+ "videodit_blocks.layers.14.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
193
+ "videodit_blocks.layers.14.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
194
+ "videodit_blocks.layers.14.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
195
+ "videodit_blocks.layers.14.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
196
+ "videodit_blocks.layers.15.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
197
+ "videodit_blocks.layers.15.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
198
+ "videodit_blocks.layers.15.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
199
+ "videodit_blocks.layers.15.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
200
+ "videodit_blocks.layers.15.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
201
+ "videodit_blocks.layers.15.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
202
+ "videodit_blocks.layers.15.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
203
+ "videodit_blocks.layers.15.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
204
+ "videodit_blocks.layers.15.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
205
+ "videodit_blocks.layers.15.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
206
+ "videodit_blocks.layers.15.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
207
+ "videodit_blocks.layers.15.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
208
+ "videodit_blocks.layers.15.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
209
+ "videodit_blocks.layers.15.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
210
+ "videodit_blocks.layers.15.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
211
+ "videodit_blocks.layers.15.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
212
+ "videodit_blocks.layers.15.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
213
+ "videodit_blocks.layers.15.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
214
+ "videodit_blocks.layers.15.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
215
+ "videodit_blocks.layers.15.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
216
+ "videodit_blocks.layers.15.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
217
+ "videodit_blocks.layers.15.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
218
+ "videodit_blocks.layers.15.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
219
+ "videodit_blocks.layers.15.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
220
+ "videodit_blocks.layers.15.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
221
+ "videodit_blocks.layers.15.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
222
+ "videodit_blocks.layers.16.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
223
+ "videodit_blocks.layers.16.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
224
+ "videodit_blocks.layers.16.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
225
+ "videodit_blocks.layers.16.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
226
+ "videodit_blocks.layers.16.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
227
+ "videodit_blocks.layers.16.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
228
+ "videodit_blocks.layers.16.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
229
+ "videodit_blocks.layers.16.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
230
+ "videodit_blocks.layers.16.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
231
+ "videodit_blocks.layers.16.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
232
+ "videodit_blocks.layers.16.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
233
+ "videodit_blocks.layers.16.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
234
+ "videodit_blocks.layers.16.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
235
+ "videodit_blocks.layers.16.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
236
+ "videodit_blocks.layers.16.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
237
+ "videodit_blocks.layers.16.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
238
+ "videodit_blocks.layers.16.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
239
+ "videodit_blocks.layers.16.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
240
+ "videodit_blocks.layers.16.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
241
+ "videodit_blocks.layers.16.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
242
+ "videodit_blocks.layers.16.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
243
+ "videodit_blocks.layers.16.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
244
+ "videodit_blocks.layers.16.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
245
+ "videodit_blocks.layers.16.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
246
+ "videodit_blocks.layers.16.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
247
+ "videodit_blocks.layers.16.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
248
+ "videodit_blocks.layers.17.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
249
+ "videodit_blocks.layers.17.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
250
+ "videodit_blocks.layers.17.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
251
+ "videodit_blocks.layers.17.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
252
+ "videodit_blocks.layers.17.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
253
+ "videodit_blocks.layers.17.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
254
+ "videodit_blocks.layers.17.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
255
+ "videodit_blocks.layers.17.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
256
+ "videodit_blocks.layers.17.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
257
+ "videodit_blocks.layers.17.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
258
+ "videodit_blocks.layers.17.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
259
+ "videodit_blocks.layers.17.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
260
+ "videodit_blocks.layers.17.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
261
+ "videodit_blocks.layers.17.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
262
+ "videodit_blocks.layers.17.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
263
+ "videodit_blocks.layers.17.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
264
+ "videodit_blocks.layers.17.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
265
+ "videodit_blocks.layers.17.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
266
+ "videodit_blocks.layers.17.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
267
+ "videodit_blocks.layers.17.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
268
+ "videodit_blocks.layers.17.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
269
+ "videodit_blocks.layers.17.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
270
+ "videodit_blocks.layers.17.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
271
+ "videodit_blocks.layers.17.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
272
+ "videodit_blocks.layers.17.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
273
+ "videodit_blocks.layers.17.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
274
+ "videodit_blocks.layers.18.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
275
+ "videodit_blocks.layers.18.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
276
+ "videodit_blocks.layers.18.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
277
+ "videodit_blocks.layers.18.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
278
+ "videodit_blocks.layers.18.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
279
+ "videodit_blocks.layers.18.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
280
+ "videodit_blocks.layers.18.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
281
+ "videodit_blocks.layers.18.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
282
+ "videodit_blocks.layers.18.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
283
+ "videodit_blocks.layers.18.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
284
+ "videodit_blocks.layers.18.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
285
+ "videodit_blocks.layers.18.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
286
+ "videodit_blocks.layers.18.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
287
+ "videodit_blocks.layers.18.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
288
+ "videodit_blocks.layers.18.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
289
+ "videodit_blocks.layers.18.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
290
+ "videodit_blocks.layers.18.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
291
+ "videodit_blocks.layers.18.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
292
+ "videodit_blocks.layers.18.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
293
+ "videodit_blocks.layers.18.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
294
+ "videodit_blocks.layers.18.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
295
+ "videodit_blocks.layers.18.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
296
+ "videodit_blocks.layers.18.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
297
+ "videodit_blocks.layers.18.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
298
+ "videodit_blocks.layers.18.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
299
+ "videodit_blocks.layers.18.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
300
+ "videodit_blocks.layers.19.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
301
+ "videodit_blocks.layers.19.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
302
+ "videodit_blocks.layers.19.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
303
+ "videodit_blocks.layers.19.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
304
+ "videodit_blocks.layers.19.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
305
+ "videodit_blocks.layers.19.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
306
+ "videodit_blocks.layers.19.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
307
+ "videodit_blocks.layers.19.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
308
+ "videodit_blocks.layers.19.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
309
+ "videodit_blocks.layers.19.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
310
+ "videodit_blocks.layers.19.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
311
+ "videodit_blocks.layers.19.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
312
+ "videodit_blocks.layers.19.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
313
+ "videodit_blocks.layers.19.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
314
+ "videodit_blocks.layers.19.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
315
+ "videodit_blocks.layers.19.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
316
+ "videodit_blocks.layers.19.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
317
+ "videodit_blocks.layers.19.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
318
+ "videodit_blocks.layers.19.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
319
+ "videodit_blocks.layers.19.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
320
+ "videodit_blocks.layers.19.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
321
+ "videodit_blocks.layers.19.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
322
+ "videodit_blocks.layers.19.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
323
+ "videodit_blocks.layers.19.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
324
+ "videodit_blocks.layers.19.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
325
+ "videodit_blocks.layers.19.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
326
+ "videodit_blocks.layers.2.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
327
+ "videodit_blocks.layers.2.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
328
+ "videodit_blocks.layers.2.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
329
+ "videodit_blocks.layers.2.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
330
+ "videodit_blocks.layers.2.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
331
+ "videodit_blocks.layers.2.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
332
+ "videodit_blocks.layers.2.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
333
+ "videodit_blocks.layers.2.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
334
+ "videodit_blocks.layers.2.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
335
+ "videodit_blocks.layers.2.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
336
+ "videodit_blocks.layers.2.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
337
+ "videodit_blocks.layers.2.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
338
+ "videodit_blocks.layers.2.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
339
+ "videodit_blocks.layers.2.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
340
+ "videodit_blocks.layers.2.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
341
+ "videodit_blocks.layers.2.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
342
+ "videodit_blocks.layers.2.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
343
+ "videodit_blocks.layers.2.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
344
+ "videodit_blocks.layers.2.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
345
+ "videodit_blocks.layers.2.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
346
+ "videodit_blocks.layers.2.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
347
+ "videodit_blocks.layers.2.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
348
+ "videodit_blocks.layers.2.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
349
+ "videodit_blocks.layers.2.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
350
+ "videodit_blocks.layers.2.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
351
+ "videodit_blocks.layers.2.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
352
+ "videodit_blocks.layers.20.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
353
+ "videodit_blocks.layers.20.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
354
+ "videodit_blocks.layers.20.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
355
+ "videodit_blocks.layers.20.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
356
+ "videodit_blocks.layers.20.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
357
+ "videodit_blocks.layers.20.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
358
+ "videodit_blocks.layers.20.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
359
+ "videodit_blocks.layers.20.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
360
+ "videodit_blocks.layers.20.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
361
+ "videodit_blocks.layers.20.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
362
+ "videodit_blocks.layers.20.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
363
+ "videodit_blocks.layers.20.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
364
+ "videodit_blocks.layers.20.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
365
+ "videodit_blocks.layers.20.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
366
+ "videodit_blocks.layers.20.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
367
+ "videodit_blocks.layers.20.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
368
+ "videodit_blocks.layers.20.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
369
+ "videodit_blocks.layers.20.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
370
+ "videodit_blocks.layers.20.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
371
+ "videodit_blocks.layers.20.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
372
+ "videodit_blocks.layers.20.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
373
+ "videodit_blocks.layers.20.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
374
+ "videodit_blocks.layers.20.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
375
+ "videodit_blocks.layers.20.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
376
+ "videodit_blocks.layers.20.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
377
+ "videodit_blocks.layers.20.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
378
+ "videodit_blocks.layers.21.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
379
+ "videodit_blocks.layers.21.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
380
+ "videodit_blocks.layers.21.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
381
+ "videodit_blocks.layers.21.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
382
+ "videodit_blocks.layers.21.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
383
+ "videodit_blocks.layers.21.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
384
+ "videodit_blocks.layers.21.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
385
+ "videodit_blocks.layers.21.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
386
+ "videodit_blocks.layers.21.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
387
+ "videodit_blocks.layers.21.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
388
+ "videodit_blocks.layers.21.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
389
+ "videodit_blocks.layers.21.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
390
+ "videodit_blocks.layers.21.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
391
+ "videodit_blocks.layers.21.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
392
+ "videodit_blocks.layers.21.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
393
+ "videodit_blocks.layers.21.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
394
+ "videodit_blocks.layers.21.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
395
+ "videodit_blocks.layers.21.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
396
+ "videodit_blocks.layers.21.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
397
+ "videodit_blocks.layers.21.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
398
+ "videodit_blocks.layers.21.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
399
+ "videodit_blocks.layers.21.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
400
+ "videodit_blocks.layers.21.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
401
+ "videodit_blocks.layers.21.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
402
+ "videodit_blocks.layers.21.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
403
+ "videodit_blocks.layers.21.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
404
+ "videodit_blocks.layers.22.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
405
+ "videodit_blocks.layers.22.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
406
+ "videodit_blocks.layers.22.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
407
+ "videodit_blocks.layers.22.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
408
+ "videodit_blocks.layers.22.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
409
+ "videodit_blocks.layers.22.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
410
+ "videodit_blocks.layers.22.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
411
+ "videodit_blocks.layers.22.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
412
+ "videodit_blocks.layers.22.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
413
+ "videodit_blocks.layers.22.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
414
+ "videodit_blocks.layers.22.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
415
+ "videodit_blocks.layers.22.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
416
+ "videodit_blocks.layers.22.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
417
+ "videodit_blocks.layers.22.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
418
+ "videodit_blocks.layers.22.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
419
+ "videodit_blocks.layers.22.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
420
+ "videodit_blocks.layers.22.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
421
+ "videodit_blocks.layers.22.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
422
+ "videodit_blocks.layers.22.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
423
+ "videodit_blocks.layers.22.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
424
+ "videodit_blocks.layers.22.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
425
+ "videodit_blocks.layers.22.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
426
+ "videodit_blocks.layers.22.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
427
+ "videodit_blocks.layers.22.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
428
+ "videodit_blocks.layers.22.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
429
+ "videodit_blocks.layers.22.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
430
+ "videodit_blocks.layers.23.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
431
+ "videodit_blocks.layers.23.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
432
+ "videodit_blocks.layers.23.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
433
+ "videodit_blocks.layers.23.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
434
+ "videodit_blocks.layers.23.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
435
+ "videodit_blocks.layers.23.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
436
+ "videodit_blocks.layers.23.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
437
+ "videodit_blocks.layers.23.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
438
+ "videodit_blocks.layers.23.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
439
+ "videodit_blocks.layers.23.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
440
+ "videodit_blocks.layers.23.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
441
+ "videodit_blocks.layers.23.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
442
+ "videodit_blocks.layers.23.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
443
+ "videodit_blocks.layers.23.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
444
+ "videodit_blocks.layers.23.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
445
+ "videodit_blocks.layers.23.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
446
+ "videodit_blocks.layers.23.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
447
+ "videodit_blocks.layers.23.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
448
+ "videodit_blocks.layers.23.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
449
+ "videodit_blocks.layers.23.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
450
+ "videodit_blocks.layers.23.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
451
+ "videodit_blocks.layers.23.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
452
+ "videodit_blocks.layers.23.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
453
+ "videodit_blocks.layers.23.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
454
+ "videodit_blocks.layers.23.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
455
+ "videodit_blocks.layers.23.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
456
+ "videodit_blocks.layers.24.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
457
+ "videodit_blocks.layers.24.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
458
+ "videodit_blocks.layers.24.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
459
+ "videodit_blocks.layers.24.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
460
+ "videodit_blocks.layers.24.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
461
+ "videodit_blocks.layers.24.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
462
+ "videodit_blocks.layers.24.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
463
+ "videodit_blocks.layers.24.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
464
+ "videodit_blocks.layers.24.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
465
+ "videodit_blocks.layers.24.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
466
+ "videodit_blocks.layers.24.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
467
+ "videodit_blocks.layers.24.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
468
+ "videodit_blocks.layers.24.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
469
+ "videodit_blocks.layers.24.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
470
+ "videodit_blocks.layers.24.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
471
+ "videodit_blocks.layers.24.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
472
+ "videodit_blocks.layers.24.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
473
+ "videodit_blocks.layers.24.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
474
+ "videodit_blocks.layers.24.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
475
+ "videodit_blocks.layers.24.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
476
+ "videodit_blocks.layers.24.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
477
+ "videodit_blocks.layers.24.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
478
+ "videodit_blocks.layers.24.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
479
+ "videodit_blocks.layers.24.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
480
+ "videodit_blocks.layers.24.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
481
+ "videodit_blocks.layers.24.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
482
+ "videodit_blocks.layers.25.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
483
+ "videodit_blocks.layers.25.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
484
+ "videodit_blocks.layers.25.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
485
+ "videodit_blocks.layers.25.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
486
+ "videodit_blocks.layers.25.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
487
+ "videodit_blocks.layers.25.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
488
+ "videodit_blocks.layers.25.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
489
+ "videodit_blocks.layers.25.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
490
+ "videodit_blocks.layers.25.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
491
+ "videodit_blocks.layers.25.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
492
+ "videodit_blocks.layers.25.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
493
+ "videodit_blocks.layers.25.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
494
+ "videodit_blocks.layers.25.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
495
+ "videodit_blocks.layers.25.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
496
+ "videodit_blocks.layers.25.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
497
+ "videodit_blocks.layers.25.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
498
+ "videodit_blocks.layers.25.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
499
+ "videodit_blocks.layers.25.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
500
+ "videodit_blocks.layers.25.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
501
+ "videodit_blocks.layers.25.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
502
+ "videodit_blocks.layers.25.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
503
+ "videodit_blocks.layers.25.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
504
+ "videodit_blocks.layers.25.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
505
+ "videodit_blocks.layers.25.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
506
+ "videodit_blocks.layers.25.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
507
+ "videodit_blocks.layers.25.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
508
+ "videodit_blocks.layers.26.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
509
+ "videodit_blocks.layers.26.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
510
+ "videodit_blocks.layers.26.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
511
+ "videodit_blocks.layers.26.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
512
+ "videodit_blocks.layers.26.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
513
+ "videodit_blocks.layers.26.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
514
+ "videodit_blocks.layers.26.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
515
+ "videodit_blocks.layers.26.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
516
+ "videodit_blocks.layers.26.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
517
+ "videodit_blocks.layers.26.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
518
+ "videodit_blocks.layers.26.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
519
+ "videodit_blocks.layers.26.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
520
+ "videodit_blocks.layers.26.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
521
+ "videodit_blocks.layers.26.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
522
+ "videodit_blocks.layers.26.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
523
+ "videodit_blocks.layers.26.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
524
+ "videodit_blocks.layers.26.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
525
+ "videodit_blocks.layers.26.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
526
+ "videodit_blocks.layers.26.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
527
+ "videodit_blocks.layers.26.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
528
+ "videodit_blocks.layers.26.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
529
+ "videodit_blocks.layers.26.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
530
+ "videodit_blocks.layers.26.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
531
+ "videodit_blocks.layers.26.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
532
+ "videodit_blocks.layers.26.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
533
+ "videodit_blocks.layers.26.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
534
+ "videodit_blocks.layers.27.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
535
+ "videodit_blocks.layers.27.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
536
+ "videodit_blocks.layers.27.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
537
+ "videodit_blocks.layers.27.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
538
+ "videodit_blocks.layers.27.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
539
+ "videodit_blocks.layers.27.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
540
+ "videodit_blocks.layers.27.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
541
+ "videodit_blocks.layers.27.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
542
+ "videodit_blocks.layers.27.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
543
+ "videodit_blocks.layers.27.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
544
+ "videodit_blocks.layers.27.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
545
+ "videodit_blocks.layers.27.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
546
+ "videodit_blocks.layers.27.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
547
+ "videodit_blocks.layers.27.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
548
+ "videodit_blocks.layers.27.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
549
+ "videodit_blocks.layers.27.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
550
+ "videodit_blocks.layers.27.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
551
+ "videodit_blocks.layers.27.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
552
+ "videodit_blocks.layers.27.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
553
+ "videodit_blocks.layers.27.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
554
+ "videodit_blocks.layers.27.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
555
+ "videodit_blocks.layers.27.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
556
+ "videodit_blocks.layers.27.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
557
+ "videodit_blocks.layers.27.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
558
+ "videodit_blocks.layers.27.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
559
+ "videodit_blocks.layers.27.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
560
+ "videodit_blocks.layers.28.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
561
+ "videodit_blocks.layers.28.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
562
+ "videodit_blocks.layers.28.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
563
+ "videodit_blocks.layers.28.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
564
+ "videodit_blocks.layers.28.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
565
+ "videodit_blocks.layers.28.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
566
+ "videodit_blocks.layers.28.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
567
+ "videodit_blocks.layers.28.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
568
+ "videodit_blocks.layers.28.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
569
+ "videodit_blocks.layers.28.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
570
+ "videodit_blocks.layers.28.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
571
+ "videodit_blocks.layers.28.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
572
+ "videodit_blocks.layers.28.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
573
+ "videodit_blocks.layers.28.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
574
+ "videodit_blocks.layers.28.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
575
+ "videodit_blocks.layers.28.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
576
+ "videodit_blocks.layers.28.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
577
+ "videodit_blocks.layers.28.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
578
+ "videodit_blocks.layers.28.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
579
+ "videodit_blocks.layers.28.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
580
+ "videodit_blocks.layers.28.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
581
+ "videodit_blocks.layers.28.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
582
+ "videodit_blocks.layers.28.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
583
+ "videodit_blocks.layers.28.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
584
+ "videodit_blocks.layers.28.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
585
+ "videodit_blocks.layers.28.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
586
+ "videodit_blocks.layers.29.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
587
+ "videodit_blocks.layers.29.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
588
+ "videodit_blocks.layers.29.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
589
+ "videodit_blocks.layers.29.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
590
+ "videodit_blocks.layers.29.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
591
+ "videodit_blocks.layers.29.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
592
+ "videodit_blocks.layers.29.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
593
+ "videodit_blocks.layers.29.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
594
+ "videodit_blocks.layers.29.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
595
+ "videodit_blocks.layers.29.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
596
+ "videodit_blocks.layers.29.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
597
+ "videodit_blocks.layers.29.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
598
+ "videodit_blocks.layers.29.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
599
+ "videodit_blocks.layers.29.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
600
+ "videodit_blocks.layers.29.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
601
+ "videodit_blocks.layers.29.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
602
+ "videodit_blocks.layers.29.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
603
+ "videodit_blocks.layers.29.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
604
+ "videodit_blocks.layers.29.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
605
+ "videodit_blocks.layers.29.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
606
+ "videodit_blocks.layers.29.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
607
+ "videodit_blocks.layers.29.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
608
+ "videodit_blocks.layers.29.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
609
+ "videodit_blocks.layers.29.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
610
+ "videodit_blocks.layers.29.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
611
+ "videodit_blocks.layers.29.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
612
+ "videodit_blocks.layers.3.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
613
+ "videodit_blocks.layers.3.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
614
+ "videodit_blocks.layers.3.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
615
+ "videodit_blocks.layers.3.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
616
+ "videodit_blocks.layers.3.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
617
+ "videodit_blocks.layers.3.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
618
+ "videodit_blocks.layers.3.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
619
+ "videodit_blocks.layers.3.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
620
+ "videodit_blocks.layers.3.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
621
+ "videodit_blocks.layers.3.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
622
+ "videodit_blocks.layers.3.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
623
+ "videodit_blocks.layers.3.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
624
+ "videodit_blocks.layers.3.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
625
+ "videodit_blocks.layers.3.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
626
+ "videodit_blocks.layers.3.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
627
+ "videodit_blocks.layers.3.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
628
+ "videodit_blocks.layers.3.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
629
+ "videodit_blocks.layers.3.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
630
+ "videodit_blocks.layers.3.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
631
+ "videodit_blocks.layers.3.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
632
+ "videodit_blocks.layers.3.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
633
+ "videodit_blocks.layers.3.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
634
+ "videodit_blocks.layers.3.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
635
+ "videodit_blocks.layers.3.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
636
+ "videodit_blocks.layers.3.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
637
+ "videodit_blocks.layers.3.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
638
+ "videodit_blocks.layers.30.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
639
+ "videodit_blocks.layers.30.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
640
+ "videodit_blocks.layers.30.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
641
+ "videodit_blocks.layers.30.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
642
+ "videodit_blocks.layers.30.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
643
+ "videodit_blocks.layers.30.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
644
+ "videodit_blocks.layers.30.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
645
+ "videodit_blocks.layers.30.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
646
+ "videodit_blocks.layers.30.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
647
+ "videodit_blocks.layers.30.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
648
+ "videodit_blocks.layers.30.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
649
+ "videodit_blocks.layers.30.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
650
+ "videodit_blocks.layers.30.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
651
+ "videodit_blocks.layers.30.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
652
+ "videodit_blocks.layers.30.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
653
+ "videodit_blocks.layers.30.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
654
+ "videodit_blocks.layers.30.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
655
+ "videodit_blocks.layers.30.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
656
+ "videodit_blocks.layers.30.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
657
+ "videodit_blocks.layers.30.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
658
+ "videodit_blocks.layers.30.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
659
+ "videodit_blocks.layers.30.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
660
+ "videodit_blocks.layers.30.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
661
+ "videodit_blocks.layers.30.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
662
+ "videodit_blocks.layers.30.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
663
+ "videodit_blocks.layers.30.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
664
+ "videodit_blocks.layers.31.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
665
+ "videodit_blocks.layers.31.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
666
+ "videodit_blocks.layers.31.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
667
+ "videodit_blocks.layers.31.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
668
+ "videodit_blocks.layers.31.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
669
+ "videodit_blocks.layers.31.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
670
+ "videodit_blocks.layers.31.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
671
+ "videodit_blocks.layers.31.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
672
+ "videodit_blocks.layers.31.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
673
+ "videodit_blocks.layers.31.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
674
+ "videodit_blocks.layers.31.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
675
+ "videodit_blocks.layers.31.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
676
+ "videodit_blocks.layers.31.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
677
+ "videodit_blocks.layers.31.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
678
+ "videodit_blocks.layers.31.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
679
+ "videodit_blocks.layers.31.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
680
+ "videodit_blocks.layers.31.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
681
+ "videodit_blocks.layers.31.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
682
+ "videodit_blocks.layers.31.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
683
+ "videodit_blocks.layers.31.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
684
+ "videodit_blocks.layers.31.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
685
+ "videodit_blocks.layers.31.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
686
+ "videodit_blocks.layers.31.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
687
+ "videodit_blocks.layers.31.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
688
+ "videodit_blocks.layers.31.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
689
+ "videodit_blocks.layers.31.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
690
+ "videodit_blocks.layers.32.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
691
+ "videodit_blocks.layers.32.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
692
+ "videodit_blocks.layers.32.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
693
+ "videodit_blocks.layers.32.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
694
+ "videodit_blocks.layers.32.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
695
+ "videodit_blocks.layers.32.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
696
+ "videodit_blocks.layers.32.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
697
+ "videodit_blocks.layers.32.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
698
+ "videodit_blocks.layers.32.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
699
+ "videodit_blocks.layers.32.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
700
+ "videodit_blocks.layers.32.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
701
+ "videodit_blocks.layers.32.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
702
+ "videodit_blocks.layers.32.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
703
+ "videodit_blocks.layers.32.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
704
+ "videodit_blocks.layers.32.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
705
+ "videodit_blocks.layers.32.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
706
+ "videodit_blocks.layers.32.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
707
+ "videodit_blocks.layers.32.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
708
+ "videodit_blocks.layers.32.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
709
+ "videodit_blocks.layers.32.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
710
+ "videodit_blocks.layers.32.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
711
+ "videodit_blocks.layers.32.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
712
+ "videodit_blocks.layers.32.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
713
+ "videodit_blocks.layers.32.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
714
+ "videodit_blocks.layers.32.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
715
+ "videodit_blocks.layers.32.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
716
+ "videodit_blocks.layers.33.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
717
+ "videodit_blocks.layers.33.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
718
+ "videodit_blocks.layers.33.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
719
+ "videodit_blocks.layers.33.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
720
+ "videodit_blocks.layers.33.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
721
+ "videodit_blocks.layers.33.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
722
+ "videodit_blocks.layers.33.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
723
+ "videodit_blocks.layers.33.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
724
+ "videodit_blocks.layers.33.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
725
+ "videodit_blocks.layers.33.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
726
+ "videodit_blocks.layers.33.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
727
+ "videodit_blocks.layers.33.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
728
+ "videodit_blocks.layers.33.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
729
+ "videodit_blocks.layers.33.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
730
+ "videodit_blocks.layers.33.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
731
+ "videodit_blocks.layers.33.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
732
+ "videodit_blocks.layers.33.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
733
+ "videodit_blocks.layers.33.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
734
+ "videodit_blocks.layers.33.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
735
+ "videodit_blocks.layers.33.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
736
+ "videodit_blocks.layers.33.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
737
+ "videodit_blocks.layers.33.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
738
+ "videodit_blocks.layers.33.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
739
+ "videodit_blocks.layers.33.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
740
+ "videodit_blocks.layers.33.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
741
+ "videodit_blocks.layers.33.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
742
+ "videodit_blocks.layers.4.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
743
+ "videodit_blocks.layers.4.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
744
+ "videodit_blocks.layers.4.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
745
+ "videodit_blocks.layers.4.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
746
+ "videodit_blocks.layers.4.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
747
+ "videodit_blocks.layers.4.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
748
+ "videodit_blocks.layers.4.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
749
+ "videodit_blocks.layers.4.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
750
+ "videodit_blocks.layers.4.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
751
+ "videodit_blocks.layers.4.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
752
+ "videodit_blocks.layers.4.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
753
+ "videodit_blocks.layers.4.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
754
+ "videodit_blocks.layers.4.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
755
+ "videodit_blocks.layers.4.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
756
+ "videodit_blocks.layers.4.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
757
+ "videodit_blocks.layers.4.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
758
+ "videodit_blocks.layers.4.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
759
+ "videodit_blocks.layers.4.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
760
+ "videodit_blocks.layers.4.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
761
+ "videodit_blocks.layers.4.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
762
+ "videodit_blocks.layers.4.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
763
+ "videodit_blocks.layers.4.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
764
+ "videodit_blocks.layers.4.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
765
+ "videodit_blocks.layers.4.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
766
+ "videodit_blocks.layers.4.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
767
+ "videodit_blocks.layers.4.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
768
+ "videodit_blocks.layers.5.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
769
+ "videodit_blocks.layers.5.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
770
+ "videodit_blocks.layers.5.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
771
+ "videodit_blocks.layers.5.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
772
+ "videodit_blocks.layers.5.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
773
+ "videodit_blocks.layers.5.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
774
+ "videodit_blocks.layers.5.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
775
+ "videodit_blocks.layers.5.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
776
+ "videodit_blocks.layers.5.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
777
+ "videodit_blocks.layers.5.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
778
+ "videodit_blocks.layers.5.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
779
+ "videodit_blocks.layers.5.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
780
+ "videodit_blocks.layers.5.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
781
+ "videodit_blocks.layers.5.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
782
+ "videodit_blocks.layers.5.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
783
+ "videodit_blocks.layers.5.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
784
+ "videodit_blocks.layers.5.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
785
+ "videodit_blocks.layers.5.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
786
+ "videodit_blocks.layers.5.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
787
+ "videodit_blocks.layers.5.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
788
+ "videodit_blocks.layers.5.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
789
+ "videodit_blocks.layers.5.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
790
+ "videodit_blocks.layers.5.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
791
+ "videodit_blocks.layers.5.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
792
+ "videodit_blocks.layers.5.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
793
+ "videodit_blocks.layers.5.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
794
+ "videodit_blocks.layers.6.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
795
+ "videodit_blocks.layers.6.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
796
+ "videodit_blocks.layers.6.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
797
+ "videodit_blocks.layers.6.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
798
+ "videodit_blocks.layers.6.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
799
+ "videodit_blocks.layers.6.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
800
+ "videodit_blocks.layers.6.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
801
+ "videodit_blocks.layers.6.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
802
+ "videodit_blocks.layers.6.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
803
+ "videodit_blocks.layers.6.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
804
+ "videodit_blocks.layers.6.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
805
+ "videodit_blocks.layers.6.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
806
+ "videodit_blocks.layers.6.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
807
+ "videodit_blocks.layers.6.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
808
+ "videodit_blocks.layers.6.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
809
+ "videodit_blocks.layers.6.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
810
+ "videodit_blocks.layers.6.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
811
+ "videodit_blocks.layers.6.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
812
+ "videodit_blocks.layers.6.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
813
+ "videodit_blocks.layers.6.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
814
+ "videodit_blocks.layers.6.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
815
+ "videodit_blocks.layers.6.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
816
+ "videodit_blocks.layers.6.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
817
+ "videodit_blocks.layers.6.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
818
+ "videodit_blocks.layers.6.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
819
+ "videodit_blocks.layers.6.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
820
+ "videodit_blocks.layers.7.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
821
+ "videodit_blocks.layers.7.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
822
+ "videodit_blocks.layers.7.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
823
+ "videodit_blocks.layers.7.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
824
+ "videodit_blocks.layers.7.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
825
+ "videodit_blocks.layers.7.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
826
+ "videodit_blocks.layers.7.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
827
+ "videodit_blocks.layers.7.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
828
+ "videodit_blocks.layers.7.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
829
+ "videodit_blocks.layers.7.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
830
+ "videodit_blocks.layers.7.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
831
+ "videodit_blocks.layers.7.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
832
+ "videodit_blocks.layers.7.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
833
+ "videodit_blocks.layers.7.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
834
+ "videodit_blocks.layers.7.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
835
+ "videodit_blocks.layers.7.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
836
+ "videodit_blocks.layers.7.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
837
+ "videodit_blocks.layers.7.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
838
+ "videodit_blocks.layers.7.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
839
+ "videodit_blocks.layers.7.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
840
+ "videodit_blocks.layers.7.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
841
+ "videodit_blocks.layers.7.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
842
+ "videodit_blocks.layers.7.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
843
+ "videodit_blocks.layers.7.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
844
+ "videodit_blocks.layers.7.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
845
+ "videodit_blocks.layers.7.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
846
+ "videodit_blocks.layers.8.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
847
+ "videodit_blocks.layers.8.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
848
+ "videodit_blocks.layers.8.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
849
+ "videodit_blocks.layers.8.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
850
+ "videodit_blocks.layers.8.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
851
+ "videodit_blocks.layers.8.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
852
+ "videodit_blocks.layers.8.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
853
+ "videodit_blocks.layers.8.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
854
+ "videodit_blocks.layers.8.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
855
+ "videodit_blocks.layers.8.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
856
+ "videodit_blocks.layers.8.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
857
+ "videodit_blocks.layers.8.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
858
+ "videodit_blocks.layers.8.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
859
+ "videodit_blocks.layers.8.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
860
+ "videodit_blocks.layers.8.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
861
+ "videodit_blocks.layers.8.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
862
+ "videodit_blocks.layers.8.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
863
+ "videodit_blocks.layers.8.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
864
+ "videodit_blocks.layers.8.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
865
+ "videodit_blocks.layers.8.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
866
+ "videodit_blocks.layers.8.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
867
+ "videodit_blocks.layers.8.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
868
+ "videodit_blocks.layers.8.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
869
+ "videodit_blocks.layers.8.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
870
+ "videodit_blocks.layers.8.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
871
+ "videodit_blocks.layers.8.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
872
+ "videodit_blocks.layers.9.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
873
+ "videodit_blocks.layers.9.ada_modulate_layer.proj.0.weight": "model-00001-of-00002.safetensors",
874
+ "videodit_blocks.layers.9.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
875
+ "videodit_blocks.layers.9.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
876
+ "videodit_blocks.layers.9.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
877
+ "videodit_blocks.layers.9.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
878
+ "videodit_blocks.layers.9.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
879
+ "videodit_blocks.layers.9.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
880
+ "videodit_blocks.layers.9.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
881
+ "videodit_blocks.layers.9.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
882
+ "videodit_blocks.layers.9.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
883
+ "videodit_blocks.layers.9.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
884
+ "videodit_blocks.layers.9.self_attention.linear_kv_xattn.weight": "model-00001-of-00002.safetensors",
885
+ "videodit_blocks.layers.9.self_attention.linear_proj.weight": "model-00001-of-00002.safetensors",
886
+ "videodit_blocks.layers.9.self_attention.linear_qkv.k.weight": "model-00002-of-00002.safetensors",
887
+ "videodit_blocks.layers.9.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
888
+ "videodit_blocks.layers.9.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
889
+ "videodit_blocks.layers.9.self_attention.linear_qkv.q.weight": "model-00002-of-00002.safetensors",
890
+ "videodit_blocks.layers.9.self_attention.linear_qkv.qx.weight": "model-00002-of-00002.safetensors",
891
+ "videodit_blocks.layers.9.self_attention.linear_qkv.v.weight": "model-00002-of-00002.safetensors",
892
+ "videodit_blocks.layers.9.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
893
+ "videodit_blocks.layers.9.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
894
+ "videodit_blocks.layers.9.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
895
+ "videodit_blocks.layers.9.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
896
+ "videodit_blocks.layers.9.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
897
+ "videodit_blocks.layers.9.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
898
+ "x_embedder.weight": "model-00001-of-00002.safetensors",
899
+ "y_embedder.null_caption_embedding": "model-00001-of-00002.safetensors",
900
+ "y_embedder.y_proj_adaln.0.bias": "model-00001-of-00002.safetensors",
901
+ "y_embedder.y_proj_adaln.0.weight": "model-00001-of-00002.safetensors",
902
+ "y_embedder.y_proj_xattn.0.bias": "model-00001-of-00002.safetensors",
903
+ "y_embedder.y_proj_xattn.0.weight": "model-00001-of-00002.safetensors"
904
+ }
905
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/magi/4.5B_distill/inference_weight.distill/model.safetensors.index.json ADDED
@@ -0,0 +1,905 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 8961059904
4
+ },
5
+ "weight_map": {
6
+ "final_linear.linear.weight": "model-00001-of-00002.safetensors",
7
+ "rope.bands": "model-00001-of-00002.safetensors",
8
+ "t_embedder.mlp.0.bias": "model-00001-of-00002.safetensors",
9
+ "t_embedder.mlp.0.weight": "model-00001-of-00002.safetensors",
10
+ "t_embedder.mlp.2.bias": "model-00001-of-00002.safetensors",
11
+ "t_embedder.mlp.2.weight": "model-00001-of-00002.safetensors",
12
+ "videodit_blocks.final_layernorm.bias": "model-00001-of-00002.safetensors",
13
+ "videodit_blocks.final_layernorm.weight": "model-00001-of-00002.safetensors",
14
+ "videodit_blocks.layers.0.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
15
+ "videodit_blocks.layers.0.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
16
+ "videodit_blocks.layers.0.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
17
+ "videodit_blocks.layers.0.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
18
+ "videodit_blocks.layers.0.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
19
+ "videodit_blocks.layers.0.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
20
+ "videodit_blocks.layers.0.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
21
+ "videodit_blocks.layers.0.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
22
+ "videodit_blocks.layers.0.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
23
+ "videodit_blocks.layers.0.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
24
+ "videodit_blocks.layers.0.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
25
+ "videodit_blocks.layers.0.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
26
+ "videodit_blocks.layers.0.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
27
+ "videodit_blocks.layers.0.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
28
+ "videodit_blocks.layers.0.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
29
+ "videodit_blocks.layers.0.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
30
+ "videodit_blocks.layers.0.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
31
+ "videodit_blocks.layers.0.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
32
+ "videodit_blocks.layers.0.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
33
+ "videodit_blocks.layers.0.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
34
+ "videodit_blocks.layers.0.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
35
+ "videodit_blocks.layers.0.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
36
+ "videodit_blocks.layers.0.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
37
+ "videodit_blocks.layers.0.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
38
+ "videodit_blocks.layers.0.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
39
+ "videodit_blocks.layers.0.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
40
+ "videodit_blocks.layers.1.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
41
+ "videodit_blocks.layers.1.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
42
+ "videodit_blocks.layers.1.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
43
+ "videodit_blocks.layers.1.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
44
+ "videodit_blocks.layers.1.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
45
+ "videodit_blocks.layers.1.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
46
+ "videodit_blocks.layers.1.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
47
+ "videodit_blocks.layers.1.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
48
+ "videodit_blocks.layers.1.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
49
+ "videodit_blocks.layers.1.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
50
+ "videodit_blocks.layers.1.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
51
+ "videodit_blocks.layers.1.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
52
+ "videodit_blocks.layers.1.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
53
+ "videodit_blocks.layers.1.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
54
+ "videodit_blocks.layers.1.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
55
+ "videodit_blocks.layers.1.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
56
+ "videodit_blocks.layers.1.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
57
+ "videodit_blocks.layers.1.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
58
+ "videodit_blocks.layers.1.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
59
+ "videodit_blocks.layers.1.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
60
+ "videodit_blocks.layers.1.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
61
+ "videodit_blocks.layers.1.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
62
+ "videodit_blocks.layers.1.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
63
+ "videodit_blocks.layers.1.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
64
+ "videodit_blocks.layers.1.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
65
+ "videodit_blocks.layers.1.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
66
+ "videodit_blocks.layers.10.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
67
+ "videodit_blocks.layers.10.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
68
+ "videodit_blocks.layers.10.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
69
+ "videodit_blocks.layers.10.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
70
+ "videodit_blocks.layers.10.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
71
+ "videodit_blocks.layers.10.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
72
+ "videodit_blocks.layers.10.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
73
+ "videodit_blocks.layers.10.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
74
+ "videodit_blocks.layers.10.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
75
+ "videodit_blocks.layers.10.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
76
+ "videodit_blocks.layers.10.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
77
+ "videodit_blocks.layers.10.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
78
+ "videodit_blocks.layers.10.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
79
+ "videodit_blocks.layers.10.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
80
+ "videodit_blocks.layers.10.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
81
+ "videodit_blocks.layers.10.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
82
+ "videodit_blocks.layers.10.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
83
+ "videodit_blocks.layers.10.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
84
+ "videodit_blocks.layers.10.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
85
+ "videodit_blocks.layers.10.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
86
+ "videodit_blocks.layers.10.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
87
+ "videodit_blocks.layers.10.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
88
+ "videodit_blocks.layers.10.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
89
+ "videodit_blocks.layers.10.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
90
+ "videodit_blocks.layers.10.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
91
+ "videodit_blocks.layers.10.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
92
+ "videodit_blocks.layers.11.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
93
+ "videodit_blocks.layers.11.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
94
+ "videodit_blocks.layers.11.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
95
+ "videodit_blocks.layers.11.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
96
+ "videodit_blocks.layers.11.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
97
+ "videodit_blocks.layers.11.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
98
+ "videodit_blocks.layers.11.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
99
+ "videodit_blocks.layers.11.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
100
+ "videodit_blocks.layers.11.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
101
+ "videodit_blocks.layers.11.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
102
+ "videodit_blocks.layers.11.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
103
+ "videodit_blocks.layers.11.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
104
+ "videodit_blocks.layers.11.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
105
+ "videodit_blocks.layers.11.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
106
+ "videodit_blocks.layers.11.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
107
+ "videodit_blocks.layers.11.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
108
+ "videodit_blocks.layers.11.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
109
+ "videodit_blocks.layers.11.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
110
+ "videodit_blocks.layers.11.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
111
+ "videodit_blocks.layers.11.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
112
+ "videodit_blocks.layers.11.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
113
+ "videodit_blocks.layers.11.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
114
+ "videodit_blocks.layers.11.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
115
+ "videodit_blocks.layers.11.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
116
+ "videodit_blocks.layers.11.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
117
+ "videodit_blocks.layers.11.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
118
+ "videodit_blocks.layers.12.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
119
+ "videodit_blocks.layers.12.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
120
+ "videodit_blocks.layers.12.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
121
+ "videodit_blocks.layers.12.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
122
+ "videodit_blocks.layers.12.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
123
+ "videodit_blocks.layers.12.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
124
+ "videodit_blocks.layers.12.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
125
+ "videodit_blocks.layers.12.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
126
+ "videodit_blocks.layers.12.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
127
+ "videodit_blocks.layers.12.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
128
+ "videodit_blocks.layers.12.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
129
+ "videodit_blocks.layers.12.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
130
+ "videodit_blocks.layers.12.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
131
+ "videodit_blocks.layers.12.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
132
+ "videodit_blocks.layers.12.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
133
+ "videodit_blocks.layers.12.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
134
+ "videodit_blocks.layers.12.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
135
+ "videodit_blocks.layers.12.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
136
+ "videodit_blocks.layers.12.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
137
+ "videodit_blocks.layers.12.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
138
+ "videodit_blocks.layers.12.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
139
+ "videodit_blocks.layers.12.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
140
+ "videodit_blocks.layers.12.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
141
+ "videodit_blocks.layers.12.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
142
+ "videodit_blocks.layers.12.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
143
+ "videodit_blocks.layers.12.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
144
+ "videodit_blocks.layers.13.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
145
+ "videodit_blocks.layers.13.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
146
+ "videodit_blocks.layers.13.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
147
+ "videodit_blocks.layers.13.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
148
+ "videodit_blocks.layers.13.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
149
+ "videodit_blocks.layers.13.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
150
+ "videodit_blocks.layers.13.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
151
+ "videodit_blocks.layers.13.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
152
+ "videodit_blocks.layers.13.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
153
+ "videodit_blocks.layers.13.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
154
+ "videodit_blocks.layers.13.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
155
+ "videodit_blocks.layers.13.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
156
+ "videodit_blocks.layers.13.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
157
+ "videodit_blocks.layers.13.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
158
+ "videodit_blocks.layers.13.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
159
+ "videodit_blocks.layers.13.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
160
+ "videodit_blocks.layers.13.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
161
+ "videodit_blocks.layers.13.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
162
+ "videodit_blocks.layers.13.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
163
+ "videodit_blocks.layers.13.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
164
+ "videodit_blocks.layers.13.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
165
+ "videodit_blocks.layers.13.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
166
+ "videodit_blocks.layers.13.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
167
+ "videodit_blocks.layers.13.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
168
+ "videodit_blocks.layers.13.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
169
+ "videodit_blocks.layers.13.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
170
+ "videodit_blocks.layers.14.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
171
+ "videodit_blocks.layers.14.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
172
+ "videodit_blocks.layers.14.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
173
+ "videodit_blocks.layers.14.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
174
+ "videodit_blocks.layers.14.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
175
+ "videodit_blocks.layers.14.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
176
+ "videodit_blocks.layers.14.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
177
+ "videodit_blocks.layers.14.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
178
+ "videodit_blocks.layers.14.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
179
+ "videodit_blocks.layers.14.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
180
+ "videodit_blocks.layers.14.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
181
+ "videodit_blocks.layers.14.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
182
+ "videodit_blocks.layers.14.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
183
+ "videodit_blocks.layers.14.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
184
+ "videodit_blocks.layers.14.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
185
+ "videodit_blocks.layers.14.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
186
+ "videodit_blocks.layers.14.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
187
+ "videodit_blocks.layers.14.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
188
+ "videodit_blocks.layers.14.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
189
+ "videodit_blocks.layers.14.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
190
+ "videodit_blocks.layers.14.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
191
+ "videodit_blocks.layers.14.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
192
+ "videodit_blocks.layers.14.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
193
+ "videodit_blocks.layers.14.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
194
+ "videodit_blocks.layers.14.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
195
+ "videodit_blocks.layers.14.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
196
+ "videodit_blocks.layers.15.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
197
+ "videodit_blocks.layers.15.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
198
+ "videodit_blocks.layers.15.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
199
+ "videodit_blocks.layers.15.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
200
+ "videodit_blocks.layers.15.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
201
+ "videodit_blocks.layers.15.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
202
+ "videodit_blocks.layers.15.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
203
+ "videodit_blocks.layers.15.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
204
+ "videodit_blocks.layers.15.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
205
+ "videodit_blocks.layers.15.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
206
+ "videodit_blocks.layers.15.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
207
+ "videodit_blocks.layers.15.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
208
+ "videodit_blocks.layers.15.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
209
+ "videodit_blocks.layers.15.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
210
+ "videodit_blocks.layers.15.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
211
+ "videodit_blocks.layers.15.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
212
+ "videodit_blocks.layers.15.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
213
+ "videodit_blocks.layers.15.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
214
+ "videodit_blocks.layers.15.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
215
+ "videodit_blocks.layers.15.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
216
+ "videodit_blocks.layers.15.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
217
+ "videodit_blocks.layers.15.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
218
+ "videodit_blocks.layers.15.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
219
+ "videodit_blocks.layers.15.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
220
+ "videodit_blocks.layers.15.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
221
+ "videodit_blocks.layers.15.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
222
+ "videodit_blocks.layers.16.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
223
+ "videodit_blocks.layers.16.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
224
+ "videodit_blocks.layers.16.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
225
+ "videodit_blocks.layers.16.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
226
+ "videodit_blocks.layers.16.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
227
+ "videodit_blocks.layers.16.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
228
+ "videodit_blocks.layers.16.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
229
+ "videodit_blocks.layers.16.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
230
+ "videodit_blocks.layers.16.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
231
+ "videodit_blocks.layers.16.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
232
+ "videodit_blocks.layers.16.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
233
+ "videodit_blocks.layers.16.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
234
+ "videodit_blocks.layers.16.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
235
+ "videodit_blocks.layers.16.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
236
+ "videodit_blocks.layers.16.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
237
+ "videodit_blocks.layers.16.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
238
+ "videodit_blocks.layers.16.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
239
+ "videodit_blocks.layers.16.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
240
+ "videodit_blocks.layers.16.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
241
+ "videodit_blocks.layers.16.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
242
+ "videodit_blocks.layers.16.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
243
+ "videodit_blocks.layers.16.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
244
+ "videodit_blocks.layers.16.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
245
+ "videodit_blocks.layers.16.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
246
+ "videodit_blocks.layers.16.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
247
+ "videodit_blocks.layers.16.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
248
+ "videodit_blocks.layers.17.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
249
+ "videodit_blocks.layers.17.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
250
+ "videodit_blocks.layers.17.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
251
+ "videodit_blocks.layers.17.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
252
+ "videodit_blocks.layers.17.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
253
+ "videodit_blocks.layers.17.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
254
+ "videodit_blocks.layers.17.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
255
+ "videodit_blocks.layers.17.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
256
+ "videodit_blocks.layers.17.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
257
+ "videodit_blocks.layers.17.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
258
+ "videodit_blocks.layers.17.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
259
+ "videodit_blocks.layers.17.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
260
+ "videodit_blocks.layers.17.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
261
+ "videodit_blocks.layers.17.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
262
+ "videodit_blocks.layers.17.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
263
+ "videodit_blocks.layers.17.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
264
+ "videodit_blocks.layers.17.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
265
+ "videodit_blocks.layers.17.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
266
+ "videodit_blocks.layers.17.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
267
+ "videodit_blocks.layers.17.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
268
+ "videodit_blocks.layers.17.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
269
+ "videodit_blocks.layers.17.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
270
+ "videodit_blocks.layers.17.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
271
+ "videodit_blocks.layers.17.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
272
+ "videodit_blocks.layers.17.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
273
+ "videodit_blocks.layers.17.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
274
+ "videodit_blocks.layers.18.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
275
+ "videodit_blocks.layers.18.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
276
+ "videodit_blocks.layers.18.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
277
+ "videodit_blocks.layers.18.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
278
+ "videodit_blocks.layers.18.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
279
+ "videodit_blocks.layers.18.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
280
+ "videodit_blocks.layers.18.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
281
+ "videodit_blocks.layers.18.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
282
+ "videodit_blocks.layers.18.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
283
+ "videodit_blocks.layers.18.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
284
+ "videodit_blocks.layers.18.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
285
+ "videodit_blocks.layers.18.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
286
+ "videodit_blocks.layers.18.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
287
+ "videodit_blocks.layers.18.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
288
+ "videodit_blocks.layers.18.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
289
+ "videodit_blocks.layers.18.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
290
+ "videodit_blocks.layers.18.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
291
+ "videodit_blocks.layers.18.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
292
+ "videodit_blocks.layers.18.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
293
+ "videodit_blocks.layers.18.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
294
+ "videodit_blocks.layers.18.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
295
+ "videodit_blocks.layers.18.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
296
+ "videodit_blocks.layers.18.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
297
+ "videodit_blocks.layers.18.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
298
+ "videodit_blocks.layers.18.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
299
+ "videodit_blocks.layers.18.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
300
+ "videodit_blocks.layers.19.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
301
+ "videodit_blocks.layers.19.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
302
+ "videodit_blocks.layers.19.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
303
+ "videodit_blocks.layers.19.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
304
+ "videodit_blocks.layers.19.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
305
+ "videodit_blocks.layers.19.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
306
+ "videodit_blocks.layers.19.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
307
+ "videodit_blocks.layers.19.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
308
+ "videodit_blocks.layers.19.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
309
+ "videodit_blocks.layers.19.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
310
+ "videodit_blocks.layers.19.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
311
+ "videodit_blocks.layers.19.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
312
+ "videodit_blocks.layers.19.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
313
+ "videodit_blocks.layers.19.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
314
+ "videodit_blocks.layers.19.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
315
+ "videodit_blocks.layers.19.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
316
+ "videodit_blocks.layers.19.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
317
+ "videodit_blocks.layers.19.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
318
+ "videodit_blocks.layers.19.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
319
+ "videodit_blocks.layers.19.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
320
+ "videodit_blocks.layers.19.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
321
+ "videodit_blocks.layers.19.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
322
+ "videodit_blocks.layers.19.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
323
+ "videodit_blocks.layers.19.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
324
+ "videodit_blocks.layers.19.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
325
+ "videodit_blocks.layers.19.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
326
+ "videodit_blocks.layers.2.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
327
+ "videodit_blocks.layers.2.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
328
+ "videodit_blocks.layers.2.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
329
+ "videodit_blocks.layers.2.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
330
+ "videodit_blocks.layers.2.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
331
+ "videodit_blocks.layers.2.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
332
+ "videodit_blocks.layers.2.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
333
+ "videodit_blocks.layers.2.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
334
+ "videodit_blocks.layers.2.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
335
+ "videodit_blocks.layers.2.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
336
+ "videodit_blocks.layers.2.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
337
+ "videodit_blocks.layers.2.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
338
+ "videodit_blocks.layers.2.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
339
+ "videodit_blocks.layers.2.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
340
+ "videodit_blocks.layers.2.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
341
+ "videodit_blocks.layers.2.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
342
+ "videodit_blocks.layers.2.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
343
+ "videodit_blocks.layers.2.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
344
+ "videodit_blocks.layers.2.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
345
+ "videodit_blocks.layers.2.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
346
+ "videodit_blocks.layers.2.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
347
+ "videodit_blocks.layers.2.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
348
+ "videodit_blocks.layers.2.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
349
+ "videodit_blocks.layers.2.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
350
+ "videodit_blocks.layers.2.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
351
+ "videodit_blocks.layers.2.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
352
+ "videodit_blocks.layers.20.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
353
+ "videodit_blocks.layers.20.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
354
+ "videodit_blocks.layers.20.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
355
+ "videodit_blocks.layers.20.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
356
+ "videodit_blocks.layers.20.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
357
+ "videodit_blocks.layers.20.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
358
+ "videodit_blocks.layers.20.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
359
+ "videodit_blocks.layers.20.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
360
+ "videodit_blocks.layers.20.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
361
+ "videodit_blocks.layers.20.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
362
+ "videodit_blocks.layers.20.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
363
+ "videodit_blocks.layers.20.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
364
+ "videodit_blocks.layers.20.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
365
+ "videodit_blocks.layers.20.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
366
+ "videodit_blocks.layers.20.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
367
+ "videodit_blocks.layers.20.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
368
+ "videodit_blocks.layers.20.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
369
+ "videodit_blocks.layers.20.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
370
+ "videodit_blocks.layers.20.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
371
+ "videodit_blocks.layers.20.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
372
+ "videodit_blocks.layers.20.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
373
+ "videodit_blocks.layers.20.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
374
+ "videodit_blocks.layers.20.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
375
+ "videodit_blocks.layers.20.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
376
+ "videodit_blocks.layers.20.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
377
+ "videodit_blocks.layers.20.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
378
+ "videodit_blocks.layers.21.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
379
+ "videodit_blocks.layers.21.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
380
+ "videodit_blocks.layers.21.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
381
+ "videodit_blocks.layers.21.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
382
+ "videodit_blocks.layers.21.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
383
+ "videodit_blocks.layers.21.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
384
+ "videodit_blocks.layers.21.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
385
+ "videodit_blocks.layers.21.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
386
+ "videodit_blocks.layers.21.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
387
+ "videodit_blocks.layers.21.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
388
+ "videodit_blocks.layers.21.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
389
+ "videodit_blocks.layers.21.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
390
+ "videodit_blocks.layers.21.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
391
+ "videodit_blocks.layers.21.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
392
+ "videodit_blocks.layers.21.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
393
+ "videodit_blocks.layers.21.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
394
+ "videodit_blocks.layers.21.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
395
+ "videodit_blocks.layers.21.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
396
+ "videodit_blocks.layers.21.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
397
+ "videodit_blocks.layers.21.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
398
+ "videodit_blocks.layers.21.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
399
+ "videodit_blocks.layers.21.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
400
+ "videodit_blocks.layers.21.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
401
+ "videodit_blocks.layers.21.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
402
+ "videodit_blocks.layers.21.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
403
+ "videodit_blocks.layers.21.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
404
+ "videodit_blocks.layers.22.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
405
+ "videodit_blocks.layers.22.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
406
+ "videodit_blocks.layers.22.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
407
+ "videodit_blocks.layers.22.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
408
+ "videodit_blocks.layers.22.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
409
+ "videodit_blocks.layers.22.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
410
+ "videodit_blocks.layers.22.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
411
+ "videodit_blocks.layers.22.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
412
+ "videodit_blocks.layers.22.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
413
+ "videodit_blocks.layers.22.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
414
+ "videodit_blocks.layers.22.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
415
+ "videodit_blocks.layers.22.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
416
+ "videodit_blocks.layers.22.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
417
+ "videodit_blocks.layers.22.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
418
+ "videodit_blocks.layers.22.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
419
+ "videodit_blocks.layers.22.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
420
+ "videodit_blocks.layers.22.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
421
+ "videodit_blocks.layers.22.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
422
+ "videodit_blocks.layers.22.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
423
+ "videodit_blocks.layers.22.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
424
+ "videodit_blocks.layers.22.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
425
+ "videodit_blocks.layers.22.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
426
+ "videodit_blocks.layers.22.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
427
+ "videodit_blocks.layers.22.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
428
+ "videodit_blocks.layers.22.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
429
+ "videodit_blocks.layers.22.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
430
+ "videodit_blocks.layers.23.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
431
+ "videodit_blocks.layers.23.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
432
+ "videodit_blocks.layers.23.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
433
+ "videodit_blocks.layers.23.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
434
+ "videodit_blocks.layers.23.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
435
+ "videodit_blocks.layers.23.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
436
+ "videodit_blocks.layers.23.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
437
+ "videodit_blocks.layers.23.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
438
+ "videodit_blocks.layers.23.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
439
+ "videodit_blocks.layers.23.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
440
+ "videodit_blocks.layers.23.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
441
+ "videodit_blocks.layers.23.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
442
+ "videodit_blocks.layers.23.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
443
+ "videodit_blocks.layers.23.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
444
+ "videodit_blocks.layers.23.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
445
+ "videodit_blocks.layers.23.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
446
+ "videodit_blocks.layers.23.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
447
+ "videodit_blocks.layers.23.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
448
+ "videodit_blocks.layers.23.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
449
+ "videodit_blocks.layers.23.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
450
+ "videodit_blocks.layers.23.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
451
+ "videodit_blocks.layers.23.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
452
+ "videodit_blocks.layers.23.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
453
+ "videodit_blocks.layers.23.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
454
+ "videodit_blocks.layers.23.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
455
+ "videodit_blocks.layers.23.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
456
+ "videodit_blocks.layers.24.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
457
+ "videodit_blocks.layers.24.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
458
+ "videodit_blocks.layers.24.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
459
+ "videodit_blocks.layers.24.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
460
+ "videodit_blocks.layers.24.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
461
+ "videodit_blocks.layers.24.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
462
+ "videodit_blocks.layers.24.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
463
+ "videodit_blocks.layers.24.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
464
+ "videodit_blocks.layers.24.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
465
+ "videodit_blocks.layers.24.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
466
+ "videodit_blocks.layers.24.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
467
+ "videodit_blocks.layers.24.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
468
+ "videodit_blocks.layers.24.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
469
+ "videodit_blocks.layers.24.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
470
+ "videodit_blocks.layers.24.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
471
+ "videodit_blocks.layers.24.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
472
+ "videodit_blocks.layers.24.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
473
+ "videodit_blocks.layers.24.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
474
+ "videodit_blocks.layers.24.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
475
+ "videodit_blocks.layers.24.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
476
+ "videodit_blocks.layers.24.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
477
+ "videodit_blocks.layers.24.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
478
+ "videodit_blocks.layers.24.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
479
+ "videodit_blocks.layers.24.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
480
+ "videodit_blocks.layers.24.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
481
+ "videodit_blocks.layers.24.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
482
+ "videodit_blocks.layers.25.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
483
+ "videodit_blocks.layers.25.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
484
+ "videodit_blocks.layers.25.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
485
+ "videodit_blocks.layers.25.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
486
+ "videodit_blocks.layers.25.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
487
+ "videodit_blocks.layers.25.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
488
+ "videodit_blocks.layers.25.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
489
+ "videodit_blocks.layers.25.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
490
+ "videodit_blocks.layers.25.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
491
+ "videodit_blocks.layers.25.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
492
+ "videodit_blocks.layers.25.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
493
+ "videodit_blocks.layers.25.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
494
+ "videodit_blocks.layers.25.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
495
+ "videodit_blocks.layers.25.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
496
+ "videodit_blocks.layers.25.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
497
+ "videodit_blocks.layers.25.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
498
+ "videodit_blocks.layers.25.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
499
+ "videodit_blocks.layers.25.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
500
+ "videodit_blocks.layers.25.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
501
+ "videodit_blocks.layers.25.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
502
+ "videodit_blocks.layers.25.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
503
+ "videodit_blocks.layers.25.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
504
+ "videodit_blocks.layers.25.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
505
+ "videodit_blocks.layers.25.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
506
+ "videodit_blocks.layers.25.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
507
+ "videodit_blocks.layers.25.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
508
+ "videodit_blocks.layers.26.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
509
+ "videodit_blocks.layers.26.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
510
+ "videodit_blocks.layers.26.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
511
+ "videodit_blocks.layers.26.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
512
+ "videodit_blocks.layers.26.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
513
+ "videodit_blocks.layers.26.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
514
+ "videodit_blocks.layers.26.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
515
+ "videodit_blocks.layers.26.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
516
+ "videodit_blocks.layers.26.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
517
+ "videodit_blocks.layers.26.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
518
+ "videodit_blocks.layers.26.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
519
+ "videodit_blocks.layers.26.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
520
+ "videodit_blocks.layers.26.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
521
+ "videodit_blocks.layers.26.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
522
+ "videodit_blocks.layers.26.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
523
+ "videodit_blocks.layers.26.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
524
+ "videodit_blocks.layers.26.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
525
+ "videodit_blocks.layers.26.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
526
+ "videodit_blocks.layers.26.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
527
+ "videodit_blocks.layers.26.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
528
+ "videodit_blocks.layers.26.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
529
+ "videodit_blocks.layers.26.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
530
+ "videodit_blocks.layers.26.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
531
+ "videodit_blocks.layers.26.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
532
+ "videodit_blocks.layers.26.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
533
+ "videodit_blocks.layers.26.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
534
+ "videodit_blocks.layers.27.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
535
+ "videodit_blocks.layers.27.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
536
+ "videodit_blocks.layers.27.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
537
+ "videodit_blocks.layers.27.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
538
+ "videodit_blocks.layers.27.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
539
+ "videodit_blocks.layers.27.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
540
+ "videodit_blocks.layers.27.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
541
+ "videodit_blocks.layers.27.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
542
+ "videodit_blocks.layers.27.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
543
+ "videodit_blocks.layers.27.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
544
+ "videodit_blocks.layers.27.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
545
+ "videodit_blocks.layers.27.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
546
+ "videodit_blocks.layers.27.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
547
+ "videodit_blocks.layers.27.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
548
+ "videodit_blocks.layers.27.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
549
+ "videodit_blocks.layers.27.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
550
+ "videodit_blocks.layers.27.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
551
+ "videodit_blocks.layers.27.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
552
+ "videodit_blocks.layers.27.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
553
+ "videodit_blocks.layers.27.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
554
+ "videodit_blocks.layers.27.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
555
+ "videodit_blocks.layers.27.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
556
+ "videodit_blocks.layers.27.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
557
+ "videodit_blocks.layers.27.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
558
+ "videodit_blocks.layers.27.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
559
+ "videodit_blocks.layers.27.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
560
+ "videodit_blocks.layers.28.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
561
+ "videodit_blocks.layers.28.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
562
+ "videodit_blocks.layers.28.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
563
+ "videodit_blocks.layers.28.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
564
+ "videodit_blocks.layers.28.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
565
+ "videodit_blocks.layers.28.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
566
+ "videodit_blocks.layers.28.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
567
+ "videodit_blocks.layers.28.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
568
+ "videodit_blocks.layers.28.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
569
+ "videodit_blocks.layers.28.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
570
+ "videodit_blocks.layers.28.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
571
+ "videodit_blocks.layers.28.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
572
+ "videodit_blocks.layers.28.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
573
+ "videodit_blocks.layers.28.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
574
+ "videodit_blocks.layers.28.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
575
+ "videodit_blocks.layers.28.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
576
+ "videodit_blocks.layers.28.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
577
+ "videodit_blocks.layers.28.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
578
+ "videodit_blocks.layers.28.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
579
+ "videodit_blocks.layers.28.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
580
+ "videodit_blocks.layers.28.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
581
+ "videodit_blocks.layers.28.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
582
+ "videodit_blocks.layers.28.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
583
+ "videodit_blocks.layers.28.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
584
+ "videodit_blocks.layers.28.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
585
+ "videodit_blocks.layers.28.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
586
+ "videodit_blocks.layers.29.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
587
+ "videodit_blocks.layers.29.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
588
+ "videodit_blocks.layers.29.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
589
+ "videodit_blocks.layers.29.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
590
+ "videodit_blocks.layers.29.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
591
+ "videodit_blocks.layers.29.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
592
+ "videodit_blocks.layers.29.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
593
+ "videodit_blocks.layers.29.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
594
+ "videodit_blocks.layers.29.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
595
+ "videodit_blocks.layers.29.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
596
+ "videodit_blocks.layers.29.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
597
+ "videodit_blocks.layers.29.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
598
+ "videodit_blocks.layers.29.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
599
+ "videodit_blocks.layers.29.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
600
+ "videodit_blocks.layers.29.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
601
+ "videodit_blocks.layers.29.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
602
+ "videodit_blocks.layers.29.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
603
+ "videodit_blocks.layers.29.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
604
+ "videodit_blocks.layers.29.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
605
+ "videodit_blocks.layers.29.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
606
+ "videodit_blocks.layers.29.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
607
+ "videodit_blocks.layers.29.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
608
+ "videodit_blocks.layers.29.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
609
+ "videodit_blocks.layers.29.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
610
+ "videodit_blocks.layers.29.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
611
+ "videodit_blocks.layers.29.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
612
+ "videodit_blocks.layers.3.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
613
+ "videodit_blocks.layers.3.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
614
+ "videodit_blocks.layers.3.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
615
+ "videodit_blocks.layers.3.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
616
+ "videodit_blocks.layers.3.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
617
+ "videodit_blocks.layers.3.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
618
+ "videodit_blocks.layers.3.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
619
+ "videodit_blocks.layers.3.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
620
+ "videodit_blocks.layers.3.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
621
+ "videodit_blocks.layers.3.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
622
+ "videodit_blocks.layers.3.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
623
+ "videodit_blocks.layers.3.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
624
+ "videodit_blocks.layers.3.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
625
+ "videodit_blocks.layers.3.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
626
+ "videodit_blocks.layers.3.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
627
+ "videodit_blocks.layers.3.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
628
+ "videodit_blocks.layers.3.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
629
+ "videodit_blocks.layers.3.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
630
+ "videodit_blocks.layers.3.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
631
+ "videodit_blocks.layers.3.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
632
+ "videodit_blocks.layers.3.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
633
+ "videodit_blocks.layers.3.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
634
+ "videodit_blocks.layers.3.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
635
+ "videodit_blocks.layers.3.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
636
+ "videodit_blocks.layers.3.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
637
+ "videodit_blocks.layers.3.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
638
+ "videodit_blocks.layers.30.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
639
+ "videodit_blocks.layers.30.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
640
+ "videodit_blocks.layers.30.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
641
+ "videodit_blocks.layers.30.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
642
+ "videodit_blocks.layers.30.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
643
+ "videodit_blocks.layers.30.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
644
+ "videodit_blocks.layers.30.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
645
+ "videodit_blocks.layers.30.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
646
+ "videodit_blocks.layers.30.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
647
+ "videodit_blocks.layers.30.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
648
+ "videodit_blocks.layers.30.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
649
+ "videodit_blocks.layers.30.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
650
+ "videodit_blocks.layers.30.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
651
+ "videodit_blocks.layers.30.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
652
+ "videodit_blocks.layers.30.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
653
+ "videodit_blocks.layers.30.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
654
+ "videodit_blocks.layers.30.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
655
+ "videodit_blocks.layers.30.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
656
+ "videodit_blocks.layers.30.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
657
+ "videodit_blocks.layers.30.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
658
+ "videodit_blocks.layers.30.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
659
+ "videodit_blocks.layers.30.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
660
+ "videodit_blocks.layers.30.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
661
+ "videodit_blocks.layers.30.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
662
+ "videodit_blocks.layers.30.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
663
+ "videodit_blocks.layers.30.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
664
+ "videodit_blocks.layers.31.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
665
+ "videodit_blocks.layers.31.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
666
+ "videodit_blocks.layers.31.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
667
+ "videodit_blocks.layers.31.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
668
+ "videodit_blocks.layers.31.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
669
+ "videodit_blocks.layers.31.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
670
+ "videodit_blocks.layers.31.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
671
+ "videodit_blocks.layers.31.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
672
+ "videodit_blocks.layers.31.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
673
+ "videodit_blocks.layers.31.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
674
+ "videodit_blocks.layers.31.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
675
+ "videodit_blocks.layers.31.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
676
+ "videodit_blocks.layers.31.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
677
+ "videodit_blocks.layers.31.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
678
+ "videodit_blocks.layers.31.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
679
+ "videodit_blocks.layers.31.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
680
+ "videodit_blocks.layers.31.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
681
+ "videodit_blocks.layers.31.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
682
+ "videodit_blocks.layers.31.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
683
+ "videodit_blocks.layers.31.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
684
+ "videodit_blocks.layers.31.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
685
+ "videodit_blocks.layers.31.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
686
+ "videodit_blocks.layers.31.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
687
+ "videodit_blocks.layers.31.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
688
+ "videodit_blocks.layers.31.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
689
+ "videodit_blocks.layers.31.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
690
+ "videodit_blocks.layers.32.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
691
+ "videodit_blocks.layers.32.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
692
+ "videodit_blocks.layers.32.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
693
+ "videodit_blocks.layers.32.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
694
+ "videodit_blocks.layers.32.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
695
+ "videodit_blocks.layers.32.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
696
+ "videodit_blocks.layers.32.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
697
+ "videodit_blocks.layers.32.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
698
+ "videodit_blocks.layers.32.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
699
+ "videodit_blocks.layers.32.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
700
+ "videodit_blocks.layers.32.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
701
+ "videodit_blocks.layers.32.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
702
+ "videodit_blocks.layers.32.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
703
+ "videodit_blocks.layers.32.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
704
+ "videodit_blocks.layers.32.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
705
+ "videodit_blocks.layers.32.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
706
+ "videodit_blocks.layers.32.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
707
+ "videodit_blocks.layers.32.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
708
+ "videodit_blocks.layers.32.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
709
+ "videodit_blocks.layers.32.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
710
+ "videodit_blocks.layers.32.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
711
+ "videodit_blocks.layers.32.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
712
+ "videodit_blocks.layers.32.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
713
+ "videodit_blocks.layers.32.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
714
+ "videodit_blocks.layers.32.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
715
+ "videodit_blocks.layers.32.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
716
+ "videodit_blocks.layers.33.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
717
+ "videodit_blocks.layers.33.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
718
+ "videodit_blocks.layers.33.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
719
+ "videodit_blocks.layers.33.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
720
+ "videodit_blocks.layers.33.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
721
+ "videodit_blocks.layers.33.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
722
+ "videodit_blocks.layers.33.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
723
+ "videodit_blocks.layers.33.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
724
+ "videodit_blocks.layers.33.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
725
+ "videodit_blocks.layers.33.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
726
+ "videodit_blocks.layers.33.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
727
+ "videodit_blocks.layers.33.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
728
+ "videodit_blocks.layers.33.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
729
+ "videodit_blocks.layers.33.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
730
+ "videodit_blocks.layers.33.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
731
+ "videodit_blocks.layers.33.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
732
+ "videodit_blocks.layers.33.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
733
+ "videodit_blocks.layers.33.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
734
+ "videodit_blocks.layers.33.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
735
+ "videodit_blocks.layers.33.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
736
+ "videodit_blocks.layers.33.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
737
+ "videodit_blocks.layers.33.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
738
+ "videodit_blocks.layers.33.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
739
+ "videodit_blocks.layers.33.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
740
+ "videodit_blocks.layers.33.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
741
+ "videodit_blocks.layers.33.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
742
+ "videodit_blocks.layers.4.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
743
+ "videodit_blocks.layers.4.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
744
+ "videodit_blocks.layers.4.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
745
+ "videodit_blocks.layers.4.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
746
+ "videodit_blocks.layers.4.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
747
+ "videodit_blocks.layers.4.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
748
+ "videodit_blocks.layers.4.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
749
+ "videodit_blocks.layers.4.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
750
+ "videodit_blocks.layers.4.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
751
+ "videodit_blocks.layers.4.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
752
+ "videodit_blocks.layers.4.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
753
+ "videodit_blocks.layers.4.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
754
+ "videodit_blocks.layers.4.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
755
+ "videodit_blocks.layers.4.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
756
+ "videodit_blocks.layers.4.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
757
+ "videodit_blocks.layers.4.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
758
+ "videodit_blocks.layers.4.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
759
+ "videodit_blocks.layers.4.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
760
+ "videodit_blocks.layers.4.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
761
+ "videodit_blocks.layers.4.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
762
+ "videodit_blocks.layers.4.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
763
+ "videodit_blocks.layers.4.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
764
+ "videodit_blocks.layers.4.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
765
+ "videodit_blocks.layers.4.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
766
+ "videodit_blocks.layers.4.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
767
+ "videodit_blocks.layers.4.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
768
+ "videodit_blocks.layers.5.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
769
+ "videodit_blocks.layers.5.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
770
+ "videodit_blocks.layers.5.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
771
+ "videodit_blocks.layers.5.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
772
+ "videodit_blocks.layers.5.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
773
+ "videodit_blocks.layers.5.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
774
+ "videodit_blocks.layers.5.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
775
+ "videodit_blocks.layers.5.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
776
+ "videodit_blocks.layers.5.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
777
+ "videodit_blocks.layers.5.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
778
+ "videodit_blocks.layers.5.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
779
+ "videodit_blocks.layers.5.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
780
+ "videodit_blocks.layers.5.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
781
+ "videodit_blocks.layers.5.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
782
+ "videodit_blocks.layers.5.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
783
+ "videodit_blocks.layers.5.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
784
+ "videodit_blocks.layers.5.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
785
+ "videodit_blocks.layers.5.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
786
+ "videodit_blocks.layers.5.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
787
+ "videodit_blocks.layers.5.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
788
+ "videodit_blocks.layers.5.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
789
+ "videodit_blocks.layers.5.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
790
+ "videodit_blocks.layers.5.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
791
+ "videodit_blocks.layers.5.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
792
+ "videodit_blocks.layers.5.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
793
+ "videodit_blocks.layers.5.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
794
+ "videodit_blocks.layers.6.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
795
+ "videodit_blocks.layers.6.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
796
+ "videodit_blocks.layers.6.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
797
+ "videodit_blocks.layers.6.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
798
+ "videodit_blocks.layers.6.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
799
+ "videodit_blocks.layers.6.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
800
+ "videodit_blocks.layers.6.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
801
+ "videodit_blocks.layers.6.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
802
+ "videodit_blocks.layers.6.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
803
+ "videodit_blocks.layers.6.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
804
+ "videodit_blocks.layers.6.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
805
+ "videodit_blocks.layers.6.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
806
+ "videodit_blocks.layers.6.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
807
+ "videodit_blocks.layers.6.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
808
+ "videodit_blocks.layers.6.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
809
+ "videodit_blocks.layers.6.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
810
+ "videodit_blocks.layers.6.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
811
+ "videodit_blocks.layers.6.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
812
+ "videodit_blocks.layers.6.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
813
+ "videodit_blocks.layers.6.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
814
+ "videodit_blocks.layers.6.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
815
+ "videodit_blocks.layers.6.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
816
+ "videodit_blocks.layers.6.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
817
+ "videodit_blocks.layers.6.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
818
+ "videodit_blocks.layers.6.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
819
+ "videodit_blocks.layers.6.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
820
+ "videodit_blocks.layers.7.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
821
+ "videodit_blocks.layers.7.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
822
+ "videodit_blocks.layers.7.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
823
+ "videodit_blocks.layers.7.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
824
+ "videodit_blocks.layers.7.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
825
+ "videodit_blocks.layers.7.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
826
+ "videodit_blocks.layers.7.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
827
+ "videodit_blocks.layers.7.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
828
+ "videodit_blocks.layers.7.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
829
+ "videodit_blocks.layers.7.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
830
+ "videodit_blocks.layers.7.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
831
+ "videodit_blocks.layers.7.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
832
+ "videodit_blocks.layers.7.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
833
+ "videodit_blocks.layers.7.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
834
+ "videodit_blocks.layers.7.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
835
+ "videodit_blocks.layers.7.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
836
+ "videodit_blocks.layers.7.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
837
+ "videodit_blocks.layers.7.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
838
+ "videodit_blocks.layers.7.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
839
+ "videodit_blocks.layers.7.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
840
+ "videodit_blocks.layers.7.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
841
+ "videodit_blocks.layers.7.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
842
+ "videodit_blocks.layers.7.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
843
+ "videodit_blocks.layers.7.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
844
+ "videodit_blocks.layers.7.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
845
+ "videodit_blocks.layers.7.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
846
+ "videodit_blocks.layers.8.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
847
+ "videodit_blocks.layers.8.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
848
+ "videodit_blocks.layers.8.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
849
+ "videodit_blocks.layers.8.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
850
+ "videodit_blocks.layers.8.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
851
+ "videodit_blocks.layers.8.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
852
+ "videodit_blocks.layers.8.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
853
+ "videodit_blocks.layers.8.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
854
+ "videodit_blocks.layers.8.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
855
+ "videodit_blocks.layers.8.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
856
+ "videodit_blocks.layers.8.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
857
+ "videodit_blocks.layers.8.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
858
+ "videodit_blocks.layers.8.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
859
+ "videodit_blocks.layers.8.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
860
+ "videodit_blocks.layers.8.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
861
+ "videodit_blocks.layers.8.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
862
+ "videodit_blocks.layers.8.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
863
+ "videodit_blocks.layers.8.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
864
+ "videodit_blocks.layers.8.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
865
+ "videodit_blocks.layers.8.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
866
+ "videodit_blocks.layers.8.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
867
+ "videodit_blocks.layers.8.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
868
+ "videodit_blocks.layers.8.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
869
+ "videodit_blocks.layers.8.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
870
+ "videodit_blocks.layers.8.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
871
+ "videodit_blocks.layers.8.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
872
+ "videodit_blocks.layers.9.ada_modulate_layer.proj.0.bias": "model-00002-of-00002.safetensors",
873
+ "videodit_blocks.layers.9.ada_modulate_layer.proj.0.weight": "model-00002-of-00002.safetensors",
874
+ "videodit_blocks.layers.9.mlp.layer_norm.bias": "model-00002-of-00002.safetensors",
875
+ "videodit_blocks.layers.9.mlp.layer_norm.weight": "model-00002-of-00002.safetensors",
876
+ "videodit_blocks.layers.9.mlp.linear_fc1.weight": "model-00001-of-00002.safetensors",
877
+ "videodit_blocks.layers.9.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
878
+ "videodit_blocks.layers.9.mlp_post_norm.bias": "model-00002-of-00002.safetensors",
879
+ "videodit_blocks.layers.9.mlp_post_norm.weight": "model-00002-of-00002.safetensors",
880
+ "videodit_blocks.layers.9.self_attention.k_layernorm.bias": "model-00002-of-00002.safetensors",
881
+ "videodit_blocks.layers.9.self_attention.k_layernorm.weight": "model-00002-of-00002.safetensors",
882
+ "videodit_blocks.layers.9.self_attention.k_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
883
+ "videodit_blocks.layers.9.self_attention.k_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
884
+ "videodit_blocks.layers.9.self_attention.linear_kv_xattn.weight": "model-00002-of-00002.safetensors",
885
+ "videodit_blocks.layers.9.self_attention.linear_proj.weight": "model-00002-of-00002.safetensors",
886
+ "videodit_blocks.layers.9.self_attention.linear_qkv.k.weight": "model-00001-of-00002.safetensors",
887
+ "videodit_blocks.layers.9.self_attention.linear_qkv.layer_norm.bias": "model-00002-of-00002.safetensors",
888
+ "videodit_blocks.layers.9.self_attention.linear_qkv.layer_norm.weight": "model-00002-of-00002.safetensors",
889
+ "videodit_blocks.layers.9.self_attention.linear_qkv.q.weight": "model-00001-of-00002.safetensors",
890
+ "videodit_blocks.layers.9.self_attention.linear_qkv.qx.weight": "model-00001-of-00002.safetensors",
891
+ "videodit_blocks.layers.9.self_attention.linear_qkv.v.weight": "model-00001-of-00002.safetensors",
892
+ "videodit_blocks.layers.9.self_attention.q_layernorm.bias": "model-00002-of-00002.safetensors",
893
+ "videodit_blocks.layers.9.self_attention.q_layernorm.weight": "model-00002-of-00002.safetensors",
894
+ "videodit_blocks.layers.9.self_attention.q_layernorm_xattn.bias": "model-00002-of-00002.safetensors",
895
+ "videodit_blocks.layers.9.self_attention.q_layernorm_xattn.weight": "model-00002-of-00002.safetensors",
896
+ "videodit_blocks.layers.9.self_attn_post_norm.bias": "model-00002-of-00002.safetensors",
897
+ "videodit_blocks.layers.9.self_attn_post_norm.weight": "model-00002-of-00002.safetensors",
898
+ "x_embedder.weight": "model-00001-of-00002.safetensors",
899
+ "y_embedder.null_caption_embedding": "model-00001-of-00002.safetensors",
900
+ "y_embedder.y_proj_adaln.0.bias": "model-00001-of-00002.safetensors",
901
+ "y_embedder.y_proj_adaln.0.weight": "model-00001-of-00002.safetensors",
902
+ "y_embedder.y_proj_xattn.0.bias": "model-00001-of-00002.safetensors",
903
+ "y_embedder.y_proj_xattn.0.weight": "model-00001-of-00002.safetensors"
904
+ }
905
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/t5/t5-v1_1-xxl/config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/t5-v1_1-xxl",
3
+ "architectures": [
4
+ "T5EncoderModel"
5
+ ],
6
+ "d_ff": 10240,
7
+ "d_kv": 64,
8
+ "d_model": 4096,
9
+ "decoder_start_token_id": 0,
10
+ "dense_act_fn": "gelu_new",
11
+ "dropout_rate": 0.1,
12
+ "eos_token_id": 1,
13
+ "feed_forward_proj": "gated-gelu",
14
+ "initializer_factor": 1.0,
15
+ "is_encoder_decoder": true,
16
+ "is_gated_act": true,
17
+ "layer_norm_epsilon": 1e-06,
18
+ "model_type": "t5",
19
+ "num_decoder_layers": 24,
20
+ "num_heads": 64,
21
+ "num_layers": 24,
22
+ "output_past": true,
23
+ "pad_token_id": 0,
24
+ "relative_attention_max_distance": 128,
25
+ "relative_attention_num_buckets": 32,
26
+ "tie_word_embeddings": false,
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.21.1",
29
+ "use_cache": true,
30
+ "vocab_size": 32128
31
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/t5/t5-v1_1-xxl/pytorch_model.bin.index.json ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 19575627776
4
+ },
5
+ "weight_map": {
6
+ "encoder.block.0.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
7
+ "encoder.block.0.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
8
+ "encoder.block.0.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
9
+ "encoder.block.0.layer.0.SelfAttention.relative_attention_bias.weight": "pytorch_model-00001-of-00002.bin",
10
+ "encoder.block.0.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
11
+ "encoder.block.0.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
12
+ "encoder.block.0.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
13
+ "encoder.block.0.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
14
+ "encoder.block.0.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
15
+ "encoder.block.0.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
16
+ "encoder.block.1.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
17
+ "encoder.block.1.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
18
+ "encoder.block.1.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
19
+ "encoder.block.1.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
20
+ "encoder.block.1.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
21
+ "encoder.block.1.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
22
+ "encoder.block.1.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
23
+ "encoder.block.1.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
24
+ "encoder.block.1.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
25
+ "encoder.block.10.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
26
+ "encoder.block.10.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
27
+ "encoder.block.10.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
28
+ "encoder.block.10.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
29
+ "encoder.block.10.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
30
+ "encoder.block.10.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
31
+ "encoder.block.10.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
32
+ "encoder.block.10.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
33
+ "encoder.block.10.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
34
+ "encoder.block.11.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
35
+ "encoder.block.11.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
36
+ "encoder.block.11.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
37
+ "encoder.block.11.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
38
+ "encoder.block.11.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
39
+ "encoder.block.11.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
40
+ "encoder.block.11.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
41
+ "encoder.block.11.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
42
+ "encoder.block.11.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
43
+ "encoder.block.12.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
44
+ "encoder.block.12.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
45
+ "encoder.block.12.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
46
+ "encoder.block.12.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
47
+ "encoder.block.12.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
48
+ "encoder.block.12.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
49
+ "encoder.block.12.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
50
+ "encoder.block.12.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
51
+ "encoder.block.12.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
52
+ "encoder.block.13.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
53
+ "encoder.block.13.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
54
+ "encoder.block.13.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
55
+ "encoder.block.13.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
56
+ "encoder.block.13.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
57
+ "encoder.block.13.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
58
+ "encoder.block.13.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
59
+ "encoder.block.13.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
60
+ "encoder.block.13.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
61
+ "encoder.block.14.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
62
+ "encoder.block.14.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
63
+ "encoder.block.14.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
64
+ "encoder.block.14.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
65
+ "encoder.block.14.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
66
+ "encoder.block.14.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
67
+ "encoder.block.14.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
68
+ "encoder.block.14.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
69
+ "encoder.block.14.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
70
+ "encoder.block.15.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
71
+ "encoder.block.15.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
72
+ "encoder.block.15.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
73
+ "encoder.block.15.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
74
+ "encoder.block.15.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
75
+ "encoder.block.15.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
76
+ "encoder.block.15.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
77
+ "encoder.block.15.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
78
+ "encoder.block.15.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
79
+ "encoder.block.16.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
80
+ "encoder.block.16.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
81
+ "encoder.block.16.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
82
+ "encoder.block.16.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
83
+ "encoder.block.16.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
84
+ "encoder.block.16.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
85
+ "encoder.block.16.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
86
+ "encoder.block.16.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
87
+ "encoder.block.16.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
88
+ "encoder.block.17.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
89
+ "encoder.block.17.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
90
+ "encoder.block.17.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
91
+ "encoder.block.17.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
92
+ "encoder.block.17.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
93
+ "encoder.block.17.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
94
+ "encoder.block.17.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
95
+ "encoder.block.17.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
96
+ "encoder.block.17.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
97
+ "encoder.block.18.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
98
+ "encoder.block.18.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
99
+ "encoder.block.18.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
100
+ "encoder.block.18.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
101
+ "encoder.block.18.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
102
+ "encoder.block.18.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
103
+ "encoder.block.18.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
104
+ "encoder.block.18.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
105
+ "encoder.block.18.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
106
+ "encoder.block.19.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
107
+ "encoder.block.19.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
108
+ "encoder.block.19.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
109
+ "encoder.block.19.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
110
+ "encoder.block.19.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
111
+ "encoder.block.19.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
112
+ "encoder.block.19.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
113
+ "encoder.block.19.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
114
+ "encoder.block.19.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
115
+ "encoder.block.2.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
116
+ "encoder.block.2.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
117
+ "encoder.block.2.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
118
+ "encoder.block.2.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
119
+ "encoder.block.2.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
120
+ "encoder.block.2.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
121
+ "encoder.block.2.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
122
+ "encoder.block.2.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
123
+ "encoder.block.2.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
124
+ "encoder.block.20.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
125
+ "encoder.block.20.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
126
+ "encoder.block.20.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
127
+ "encoder.block.20.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
128
+ "encoder.block.20.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
129
+ "encoder.block.20.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
130
+ "encoder.block.20.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
131
+ "encoder.block.20.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
132
+ "encoder.block.20.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
133
+ "encoder.block.21.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
134
+ "encoder.block.21.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
135
+ "encoder.block.21.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
136
+ "encoder.block.21.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
137
+ "encoder.block.21.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
138
+ "encoder.block.21.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
139
+ "encoder.block.21.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
140
+ "encoder.block.21.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
141
+ "encoder.block.21.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
142
+ "encoder.block.22.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
143
+ "encoder.block.22.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
144
+ "encoder.block.22.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
145
+ "encoder.block.22.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
146
+ "encoder.block.22.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
147
+ "encoder.block.22.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
148
+ "encoder.block.22.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
149
+ "encoder.block.22.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
150
+ "encoder.block.22.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
151
+ "encoder.block.23.layer.0.SelfAttention.k.weight": "pytorch_model-00002-of-00002.bin",
152
+ "encoder.block.23.layer.0.SelfAttention.o.weight": "pytorch_model-00002-of-00002.bin",
153
+ "encoder.block.23.layer.0.SelfAttention.q.weight": "pytorch_model-00002-of-00002.bin",
154
+ "encoder.block.23.layer.0.SelfAttention.v.weight": "pytorch_model-00002-of-00002.bin",
155
+ "encoder.block.23.layer.0.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
156
+ "encoder.block.23.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00002-of-00002.bin",
157
+ "encoder.block.23.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00002-of-00002.bin",
158
+ "encoder.block.23.layer.1.DenseReluDense.wo.weight": "pytorch_model-00002-of-00002.bin",
159
+ "encoder.block.23.layer.1.layer_norm.weight": "pytorch_model-00002-of-00002.bin",
160
+ "encoder.block.3.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
161
+ "encoder.block.3.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
162
+ "encoder.block.3.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
163
+ "encoder.block.3.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
164
+ "encoder.block.3.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
165
+ "encoder.block.3.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
166
+ "encoder.block.3.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
167
+ "encoder.block.3.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
168
+ "encoder.block.3.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
169
+ "encoder.block.4.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
170
+ "encoder.block.4.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
171
+ "encoder.block.4.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
172
+ "encoder.block.4.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
173
+ "encoder.block.4.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
174
+ "encoder.block.4.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
175
+ "encoder.block.4.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
176
+ "encoder.block.4.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
177
+ "encoder.block.4.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
178
+ "encoder.block.5.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
179
+ "encoder.block.5.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
180
+ "encoder.block.5.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
181
+ "encoder.block.5.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
182
+ "encoder.block.5.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
183
+ "encoder.block.5.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
184
+ "encoder.block.5.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
185
+ "encoder.block.5.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
186
+ "encoder.block.5.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
187
+ "encoder.block.6.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
188
+ "encoder.block.6.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
189
+ "encoder.block.6.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
190
+ "encoder.block.6.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
191
+ "encoder.block.6.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
192
+ "encoder.block.6.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
193
+ "encoder.block.6.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
194
+ "encoder.block.6.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
195
+ "encoder.block.6.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
196
+ "encoder.block.7.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
197
+ "encoder.block.7.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
198
+ "encoder.block.7.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
199
+ "encoder.block.7.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
200
+ "encoder.block.7.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
201
+ "encoder.block.7.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
202
+ "encoder.block.7.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
203
+ "encoder.block.7.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
204
+ "encoder.block.7.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
205
+ "encoder.block.8.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
206
+ "encoder.block.8.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
207
+ "encoder.block.8.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
208
+ "encoder.block.8.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
209
+ "encoder.block.8.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
210
+ "encoder.block.8.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
211
+ "encoder.block.8.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
212
+ "encoder.block.8.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
213
+ "encoder.block.8.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
214
+ "encoder.block.9.layer.0.SelfAttention.k.weight": "pytorch_model-00001-of-00002.bin",
215
+ "encoder.block.9.layer.0.SelfAttention.o.weight": "pytorch_model-00001-of-00002.bin",
216
+ "encoder.block.9.layer.0.SelfAttention.q.weight": "pytorch_model-00001-of-00002.bin",
217
+ "encoder.block.9.layer.0.SelfAttention.v.weight": "pytorch_model-00001-of-00002.bin",
218
+ "encoder.block.9.layer.0.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
219
+ "encoder.block.9.layer.1.DenseReluDense.wi_0.weight": "pytorch_model-00001-of-00002.bin",
220
+ "encoder.block.9.layer.1.DenseReluDense.wi_1.weight": "pytorch_model-00001-of-00002.bin",
221
+ "encoder.block.9.layer.1.DenseReluDense.wo.weight": "pytorch_model-00001-of-00002.bin",
222
+ "encoder.block.9.layer.1.layer_norm.weight": "pytorch_model-00001-of-00002.bin",
223
+ "encoder.embed_tokens.weight": "pytorch_model-00001-of-00002.bin",
224
+ "encoder.final_layer_norm.weight": "pytorch_model-00002-of-00002.bin",
225
+ "shared.weight": "pytorch_model-00001-of-00002.bin"
226
+ }
227
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/t5/t5-v1_1-xxl/special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "additional_special_tokens": ["<extra_id_0>", "<extra_id_1>", "<extra_id_2>", "<extra_id_3>", "<extra_id_4>", "<extra_id_5>", "<extra_id_6>", "<extra_id_7>", "<extra_id_8>", "<extra_id_9>", "<extra_id_10>", "<extra_id_11>", "<extra_id_12>", "<extra_id_13>", "<extra_id_14>", "<extra_id_15>", "<extra_id_16>", "<extra_id_17>", "<extra_id_18>", "<extra_id_19>", "<extra_id_20>", "<extra_id_21>", "<extra_id_22>", "<extra_id_23>", "<extra_id_24>", "<extra_id_25>", "<extra_id_26>", "<extra_id_27>", "<extra_id_28>", "<extra_id_29>", "<extra_id_30>", "<extra_id_31>", "<extra_id_32>", "<extra_id_33>", "<extra_id_34>", "<extra_id_35>", "<extra_id_36>", "<extra_id_37>", "<extra_id_38>", "<extra_id_39>", "<extra_id_40>", "<extra_id_41>", "<extra_id_42>", "<extra_id_43>", "<extra_id_44>", "<extra_id_45>", "<extra_id_46>", "<extra_id_47>", "<extra_id_48>", "<extra_id_49>", "<extra_id_50>", "<extra_id_51>", "<extra_id_52>", "<extra_id_53>", "<extra_id_54>", "<extra_id_55>", "<extra_id_56>", "<extra_id_57>", "<extra_id_58>", "<extra_id_59>", "<extra_id_60>", "<extra_id_61>", "<extra_id_62>", "<extra_id_63>", "<extra_id_64>", "<extra_id_65>", "<extra_id_66>", "<extra_id_67>", "<extra_id_68>", "<extra_id_69>", "<extra_id_70>", "<extra_id_71>", "<extra_id_72>", "<extra_id_73>", "<extra_id_74>", "<extra_id_75>", "<extra_id_76>", "<extra_id_77>", "<extra_id_78>", "<extra_id_79>", "<extra_id_80>", "<extra_id_81>", "<extra_id_82>", "<extra_id_83>", "<extra_id_84>", "<extra_id_85>", "<extra_id_86>", "<extra_id_87>", "<extra_id_88>", "<extra_id_89>", "<extra_id_90>", "<extra_id_91>", "<extra_id_92>", "<extra_id_93>", "<extra_id_94>", "<extra_id_95>", "<extra_id_96>", "<extra_id_97>", "<extra_id_98>", "<extra_id_99>"]}
FlowCache/FlowCache4MAGI-1-dev-V1/downloads/_hf_raw/ckpt/vae/config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "ViTVAE",
3
+ "_diffusers_version": "0.28.2",
4
+ "ddconfig": {
5
+ "conv_last_layer": true,
6
+ "depth": 24,
7
+ "double_z": true,
8
+ "embed_dim": 1024,
9
+ "in_chans": 3,
10
+ "ln_in_attn": true,
11
+ "mlp_ratio": 4,
12
+ "norm_code": false,
13
+ "num_heads": 16,
14
+ "patch_length": 4,
15
+ "patch_size": 8,
16
+ "qkv_bias": true,
17
+ "video_length": 16,
18
+ "video_size": 256,
19
+ "z_chans": 16
20
+ },
21
+ "model_type": "vit"
22
+ }
FlowCache/FlowCache4MAGI-1-dev-V1/inference/__init__.py ADDED
File without changes
FlowCache/FlowCache4MAGI-1-dev-V1/logs/flowcache_vbench_20260520_102116.log ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 🚀 Starting multi-GPU benchmark sampling
2
+ 🎮 GPUs: 1,3,4,6
3
+ 🔢 Total dimensions to process: 3
4
+ 📋 Dimensions: overall_consistency subject_consistency scene
5
+ 🔍 Processing dimension: overall_consistency
6
+ Loaded configuration from: yaml_config/sample/flowcache_vbench.yaml.tmp
7
+ Traceback (most recent call last):
8
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 403, in <module>
9
+ main()
10
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 371, in main
11
+ setup_save_path(config)
12
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 357, in setup_save_path
13
+ os.makedirs(config["save_path"], exist_ok=True)
14
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
15
+ makedirs(head, exist_ok=exist_ok)
16
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
17
+ makedirs(head, exist_ok=exist_ok)
18
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
19
+ makedirs(head, exist_ok=exist_ok)
20
+ [Previous line repeated 2 more times]
21
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 225, in makedirs
22
+ mkdir(name, mode)
23
+ PermissionError: [Errno 13] Permission denied: '/path'
24
+ ✅ Completed: overall_consistency
25
+ ---
26
+ 🔍 Processing dimension: subject_consistency
27
+ Loaded configuration from: yaml_config/sample/flowcache_vbench.yaml.tmp
28
+ Traceback (most recent call last):
29
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 403, in <module>
30
+ main()
31
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 371, in main
32
+ setup_save_path(config)
33
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 357, in setup_save_path
34
+ os.makedirs(config["save_path"], exist_ok=True)
35
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
36
+ makedirs(head, exist_ok=exist_ok)
37
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
38
+ makedirs(head, exist_ok=exist_ok)
39
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
40
+ makedirs(head, exist_ok=exist_ok)
41
+ [Previous line repeated 2 more times]
42
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 225, in makedirs
43
+ mkdir(name, mode)
44
+ PermissionError: [Errno 13] Permission denied: '/path'
45
+ ✅ Completed: subject_consistency
46
+ ---
47
+ 🔍 Processing dimension: scene
48
+ Loaded configuration from: yaml_config/sample/flowcache_vbench.yaml.tmp
49
+ Traceback (most recent call last):
50
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 403, in <module>
51
+ main()
52
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 371, in main
53
+ setup_save_path(config)
54
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 357, in setup_save_path
55
+ os.makedirs(config["save_path"], exist_ok=True)
56
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
57
+ makedirs(head, exist_ok=exist_ok)
58
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
59
+ makedirs(head, exist_ok=exist_ok)
60
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
61
+ makedirs(head, exist_ok=exist_ok)
62
+ [Previous line repeated 2 more times]
63
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 225, in makedirs
64
+ mkdir(name, mode)
65
+ PermissionError: [Errno 13] Permission denied: '/path'
66
+ ✅ Completed: scene
67
+ ---
68
+ 🎉 All sampling tasks completed.
FlowCache/FlowCache4MAGI-1-dev-V1/logs/flowcache_vbench_20260520_103047.log ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 🚀 Starting multi-GPU benchmark sampling
2
+ 🎮 GPUs: 1,3,4,6
3
+ 🔢 Total dimensions to process: 3
4
+ 📋 Dimensions: overall_consistency subject_consistency scene
5
+ 🔍 Processing dimension: overall_consistency
6
+ Loaded configuration from: yaml_config/sample/flowcache_vbench.yaml.tmp
7
+ Traceback (most recent call last):
8
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 403, in <module>
9
+ main()
10
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 371, in main
11
+ setup_save_path(config)
12
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 357, in setup_save_path
13
+ os.makedirs(config["save_path"], exist_ok=True)
14
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
15
+ makedirs(head, exist_ok=exist_ok)
16
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
17
+ makedirs(head, exist_ok=exist_ok)
18
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
19
+ makedirs(head, exist_ok=exist_ok)
20
+ [Previous line repeated 2 more times]
21
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 225, in makedirs
22
+ mkdir(name, mode)
23
+ PermissionError: [Errno 13] Permission denied: '/path'
24
+ ✅ Completed: overall_consistency
25
+ ---
26
+ 🔍 Processing dimension: subject_consistency
27
+ Loaded configuration from: yaml_config/sample/flowcache_vbench.yaml.tmp
28
+ Traceback (most recent call last):
29
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 403, in <module>
30
+ main()
31
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 371, in main
32
+ setup_save_path(config)
33
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 357, in setup_save_path
34
+ os.makedirs(config["save_path"], exist_ok=True)
35
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
36
+ makedirs(head, exist_ok=exist_ok)
37
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
38
+ makedirs(head, exist_ok=exist_ok)
39
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
40
+ makedirs(head, exist_ok=exist_ok)
41
+ [Previous line repeated 2 more times]
42
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 225, in makedirs
43
+ mkdir(name, mode)
44
+ PermissionError: [Errno 13] Permission denied: '/path'
45
+ ✅ Completed: subject_consistency
46
+ ---
47
+ 🔍 Processing dimension: scene
48
+ Loaded configuration from: yaml_config/sample/flowcache_vbench.yaml.tmp
49
+ Traceback (most recent call last):
50
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 403, in <module>
51
+ main()
52
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 371, in main
53
+ setup_save_path(config)
54
+ File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev/sample_video.py", line 357, in setup_save_path
55
+ os.makedirs(config["save_path"], exist_ok=True)
56
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
57
+ makedirs(head, exist_ok=exist_ok)
58
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
59
+ makedirs(head, exist_ok=exist_ok)
60
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 215, in makedirs
61
+ makedirs(head, exist_ok=exist_ok)
62
+ [Previous line repeated 2 more times]
63
+ File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/os.py", line 225, in makedirs
64
+ mkdir(name, mode)
65
+ PermissionError: [Errno 13] Permission denied: '/path'
66
+ ✅ Completed: scene
67
+ ---
68
+ 🎉 All sampling tasks completed.
FlowCache/FlowCache4MAGI-1-dev-V1/scripts/metric.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export CUDA_VISIBLE_DEVICES=3
2
+
3
+ python tools/video_metrics.py \
4
+ --original_video "/path/to/original_video.mp4" \
5
+ --generated_video "/path/to/generated_video.mp4"
FlowCache/FlowCache4MAGI-1-dev-V1/tools/plot_l1_rel.py ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ import argparse
4
+ import json
5
+ from collections import defaultdict
6
+ from pathlib import Path
7
+ from typing import Dict, List, Optional, Set, Tuple
8
+
9
+ import matplotlib
10
+
11
+ matplotlib.use("Agg")
12
+ import matplotlib.pyplot as plt
13
+
14
+
15
+ def parse_int_list(value: Optional[str]) -> Optional[Set[int]]:
16
+ if not value:
17
+ return None
18
+ return {int(item.strip()) for item in value.split(",") if item.strip()}
19
+
20
+
21
+ def load_l1_rel_records(json_path: Path) -> List[dict]:
22
+ with json_path.open("r") as f:
23
+ payload = json.load(f)
24
+ if isinstance(payload, list):
25
+ return payload
26
+ if isinstance(payload, dict) and isinstance(payload.get("records"), list):
27
+ return payload["records"]
28
+ raise ValueError(f"Cannot find records in {json_path}")
29
+
30
+
31
+ def collect_by_chunk(records: List[dict], chunk_ids: Optional[Set[int]], max_chunks: Optional[int]) -> Dict[int, List[dict]]:
32
+ chunks = defaultdict(list)
33
+ for record in records:
34
+ chunk_idx = int(record["chunk_idx"])
35
+ if chunk_ids is not None and chunk_idx not in chunk_ids:
36
+ continue
37
+ chunks[chunk_idx].append(record)
38
+
39
+ chunks = dict(sorted(chunks.items()))
40
+ if max_chunks is not None:
41
+ chunks = dict(list(chunks.items())[:max_chunks])
42
+ return chunks
43
+
44
+
45
+ def plot_l1_rel(
46
+ chunks: Dict[int, List[dict]],
47
+ output_path: Path,
48
+ x_field: str,
49
+ y_field: str,
50
+ reverse_x: bool,
51
+ title: Optional[str],
52
+ figsize: Tuple[float, float],
53
+ dpi: int,
54
+ ) -> None:
55
+ fig, ax = plt.subplots(figsize=figsize)
56
+
57
+ for chunk_idx, records in chunks.items():
58
+ points = []
59
+ for record in records:
60
+ if x_field not in record or y_field not in record:
61
+ continue
62
+ if record[x_field] is None or record[y_field] is None:
63
+ continue
64
+ points.append((float(record[x_field]), float(record[y_field])))
65
+ if not points:
66
+ continue
67
+
68
+ points.sort(key=lambda item: item[0])
69
+ xs, ys = zip(*points)
70
+ ax.plot(xs, ys, marker="o", linewidth=1.6, markersize=3, label=f"chunk {chunk_idx}")
71
+
72
+ ax.set_xlabel(x_field)
73
+ ax.set_ylabel(y_field)
74
+ ax.set_title(title or f"{y_field} by timestep")
75
+ ax.grid(True, alpha=0.3)
76
+ if reverse_x:
77
+ ax.invert_xaxis()
78
+ ax.legend(loc="best", fontsize="small", ncols=2)
79
+ fig.tight_layout()
80
+
81
+ output_path.parent.mkdir(parents=True, exist_ok=True)
82
+ fig.savefig(output_path, dpi=dpi)
83
+ plt.close(fig)
84
+
85
+
86
+ def parse_arguments():
87
+ parser = argparse.ArgumentParser(description="Plot per-chunk MAGI relative L1 change curves.")
88
+ parser.add_argument("json_path", type=Path, help="Path to L1 relative change JSON saved by --l1_rel_stats_path.")
89
+ parser.add_argument("-o", "--output", type=Path, help="Output image path. Defaults to <json stem>_plot.png.")
90
+ parser.add_argument("--chunks", type=str, help="Comma-separated chunk_idx list to plot, for example: 0,1,2.")
91
+ parser.add_argument("--max-chunks", type=int, help="Plot at most this many chunks after filtering.")
92
+ parser.add_argument(
93
+ "--x-field",
94
+ choices=["timestep", "next_timestep", "cur_denoise_step", "denoise_idx"],
95
+ default="next_timestep",
96
+ help="Record field used for the x axis. next_timestep is the cleaner MAGI step.",
97
+ )
98
+ parser.add_argument(
99
+ "--y-field",
100
+ choices=[
101
+ "l1_rel",
102
+ "l1_rel_ratio",
103
+ "delta_l1_norm",
104
+ "x_l1_norm",
105
+ "x_embedder_l1_rel",
106
+ "x_embedder_l1_rel_ratio",
107
+ "x_embedder_delta_l1_norm",
108
+ "x_embedder_x_l1_norm",
109
+ "flowcache_rel_l1",
110
+ "flowcache_rel_l1_ratio",
111
+ "flowcache_delta_l1_norm",
112
+ "flowcache_prev_feat_l1_norm",
113
+ "flowcache_accumulated_rel_l1",
114
+ "rel_l1_thresh",
115
+ ],
116
+ default="l1_rel",
117
+ help="Record field used for the y axis.",
118
+ )
119
+ parser.add_argument("--reverse-x", action="store_true", help="Reverse the x axis.")
120
+ parser.add_argument("--title", type=str, help="Figure title.")
121
+ parser.add_argument("--figsize", type=str, default="10,6", help="Figure size as width,height.")
122
+ parser.add_argument("--dpi", type=int, default=160, help="Output image DPI.")
123
+ return parser.parse_args()
124
+
125
+
126
+ def main():
127
+ args = parse_arguments()
128
+ output_path = args.output or args.json_path.with_name(f"{args.json_path.stem}_plot.png")
129
+ figsize = [float(part.strip()) for part in args.figsize.split(",")]
130
+ if len(figsize) != 2:
131
+ raise ValueError("--figsize must be formatted as width,height")
132
+
133
+ records = load_l1_rel_records(args.json_path)
134
+ chunks = collect_by_chunk(records, parse_int_list(args.chunks), args.max_chunks)
135
+ if not chunks:
136
+ raise ValueError("No records matched the requested chunks.")
137
+
138
+ plot_l1_rel(
139
+ chunks=chunks,
140
+ output_path=output_path,
141
+ x_field=args.x_field,
142
+ y_field=args.y_field,
143
+ reverse_x=args.reverse_x,
144
+ title=args.title,
145
+ figsize=(figsize[0], figsize[1]),
146
+ dpi=args.dpi,
147
+ )
148
+ print(f"Saved plot to {output_path}")
149
+
150
+
151
+ if __name__ == "__main__":
152
+ main()
FlowCache/FlowCache4MAGI-1-dev-V1/tools/plot_residual_norms.py ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ import argparse
4
+ import json
5
+ from collections import defaultdict
6
+ from pathlib import Path
7
+ from typing import Dict, List, Optional, Set, Tuple
8
+
9
+ import matplotlib
10
+
11
+ matplotlib.use("Agg")
12
+ import matplotlib.pyplot as plt
13
+
14
+
15
+ def parse_int_list(value: Optional[str]) -> Optional[Set[int]]:
16
+ if not value:
17
+ return None
18
+ return {int(item.strip()) for item in value.split(",") if item.strip()}
19
+
20
+
21
+ def load_records(json_path: Path) -> List[dict]:
22
+ with json_path.open("r") as f:
23
+ payload = json.load(f)
24
+ if isinstance(payload, list):
25
+ return payload
26
+ if isinstance(payload, dict) and isinstance(payload.get("records"), list):
27
+ return payload["records"]
28
+ raise ValueError(f"Cannot find records in {json_path}")
29
+
30
+
31
+ def group_records(records: List[dict], chunk_ids: Optional[Set[int]], max_chunks: Optional[int]) -> Dict[int, List[dict]]:
32
+ grouped = defaultdict(list)
33
+ for record in records:
34
+ chunk_idx = int(record["chunk_idx"])
35
+ if chunk_ids is not None and chunk_idx not in chunk_ids:
36
+ continue
37
+ grouped[chunk_idx].append(record)
38
+
39
+ grouped = dict(sorted(grouped.items()))
40
+ if max_chunks is not None:
41
+ grouped = dict(list(grouped.items())[:max_chunks])
42
+ return grouped
43
+
44
+
45
+ def build_plot(
46
+ grouped_records: Dict[int, List[dict]],
47
+ output_path: Path,
48
+ x_field: str,
49
+ y_field: str,
50
+ title: Optional[str],
51
+ reverse_x: bool,
52
+ figsize: Tuple[float, float],
53
+ dpi: int,
54
+ ) -> None:
55
+ fig, ax = plt.subplots(figsize=figsize)
56
+
57
+ for chunk_idx, records in grouped_records.items():
58
+ points = []
59
+ for record in records:
60
+ if x_field not in record or y_field not in record:
61
+ continue
62
+ if record[x_field] is None or record[y_field] is None:
63
+ continue
64
+ points.append((float(record[x_field]), float(record[y_field])))
65
+ if not points:
66
+ continue
67
+
68
+ points.sort(key=lambda item: item[0])
69
+ xs, ys = zip(*points)
70
+ ax.plot(xs, ys, marker="o", linewidth=1.6, markersize=3, label=f"chunk {chunk_idx}")
71
+
72
+ ax.set_xlabel(x_field)
73
+ ax.set_ylabel(y_field)
74
+ ax.set_title(title or f"{y_field} by timestep")
75
+ ax.grid(True, alpha=0.3)
76
+ if reverse_x:
77
+ ax.invert_xaxis()
78
+ ax.legend(loc="best", fontsize="small", ncols=2)
79
+ fig.tight_layout()
80
+
81
+ output_path.parent.mkdir(parents=True, exist_ok=True)
82
+ fig.savefig(output_path, dpi=dpi)
83
+ plt.close(fig)
84
+
85
+
86
+ def parse_arguments():
87
+ parser = argparse.ArgumentParser(description="Plot per-chunk residual norm curves from MAGI residual stats JSON.")
88
+ parser.add_argument("json_path", type=Path, help="Path to residual stats JSON saved by --residual_stats_path.")
89
+ parser.add_argument(
90
+ "-o",
91
+ "--output",
92
+ type=Path,
93
+ help="Output image path. Defaults to <json_path stem>_residual_norms.png.",
94
+ )
95
+ parser.add_argument("--chunks", type=str, help="Comma-separated chunk_idx list to plot, for example: 0,1,2.")
96
+ parser.add_argument("--max-chunks", type=int, help="Plot at most this many chunks after filtering.")
97
+ parser.add_argument(
98
+ "--x-field",
99
+ choices=["timestep", "cur_denoise_step", "denoise_idx"],
100
+ default="timestep",
101
+ help="Record field used for the x axis.",
102
+ )
103
+ parser.add_argument(
104
+ "--y-field",
105
+ choices=["residual_norm", "residual_diff_norm"],
106
+ default="residual_norm",
107
+ help="Record field used for the y axis.",
108
+ )
109
+ parser.add_argument("--reverse-x", action="store_true", help="Reverse the x axis.")
110
+ parser.add_argument("--title", type=str, help="Figure title.")
111
+ parser.add_argument("--figsize", type=str, default="10,6", help="Figure size as width,height.")
112
+ parser.add_argument("--dpi", type=int, default=160, help="Output image DPI.")
113
+ return parser.parse_args()
114
+
115
+
116
+ def main():
117
+ args = parse_arguments()
118
+ output_path = args.output or args.json_path.with_name(f"{args.json_path.stem}_residual_norms.png")
119
+ figsize_parts = [float(part.strip()) for part in args.figsize.split(",")]
120
+ if len(figsize_parts) != 2:
121
+ raise ValueError("--figsize must be formatted as width,height")
122
+
123
+ records = load_records(args.json_path)
124
+ grouped_records = group_records(records, parse_int_list(args.chunks), args.max_chunks)
125
+ if not grouped_records:
126
+ raise ValueError("No records matched the requested chunks.")
127
+
128
+ build_plot(
129
+ grouped_records=grouped_records,
130
+ output_path=output_path,
131
+ x_field=args.x_field,
132
+ y_field=args.y_field,
133
+ title=args.title,
134
+ reverse_x=args.reverse_x,
135
+ figsize=(figsize_parts[0], figsize_parts[1]),
136
+ dpi=args.dpi,
137
+ )
138
+ print(f"Saved plot to {output_path}")
139
+
140
+
141
+ if __name__ == "__main__":
142
+ main()
FlowCache/FlowCache4MAGI-1-dev-V1/tools/video_metrics.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import cv2
3
+ import argparse
4
+ import torch
5
+ import lpips
6
+ import numpy as np
7
+ from tqdm import tqdm
8
+ from torchmetrics.image import StructuralSimilarityIndexMeasure
9
+
10
+ def load_video_frames(path, resize_to=None):
11
+ """
12
+ Load all frames from a video file as a list of HxWx3 uint8 arrays.
13
+ Optionally resize each frame to `resize_to` (w, h).
14
+ """
15
+
16
+ cap = cv2.VideoCapture(path)
17
+ frames = []
18
+ while True:
19
+ ret, img = cap.read()
20
+ if not ret:
21
+ break
22
+ if resize_to is not None:
23
+ img = cv2.resize(img, resize_to)
24
+ frames.append(np.expand_dims(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), axis=0))
25
+ cap.release()
26
+ return np.concatenate(frames)
27
+
28
+
29
+ def compute_video_metrics(frames_gt, frames_gen,
30
+ device, ssim_metric, lpips_fn):
31
+ """
32
+ Compute PSNR, SSIM, LPIPS for two lists of frames (uint8 BGR).
33
+ All computations on `device`.
34
+ Returns (psnr, ssim, lpips) scalars.
35
+ """
36
+ # ensure same frame count
37
+ # convert to tensors [N,3,H,W], normalize to [0,1]
38
+ gt_t = torch.from_numpy(frames_gt).float().to(device).permute(0, 3, 1, 2).div_(255).contiguous()
39
+
40
+ gen_t = torch.from_numpy(frames_gen).float().to(device).permute(0, 3, 1, 2).div_(255).contiguous()
41
+
42
+ # PSNR (data_range=1.0): -10 * log10(mse)
43
+ mse = torch.mean((gt_t - gen_t) ** 2)
44
+ psnr = -10.0 * torch.log10(mse)
45
+
46
+ # SSIM: returns average over batch
47
+ ssim_val = ssim_metric(gen_t, gt_t)
48
+
49
+ # LPIPS: expects [-1,1]
50
+ with torch.no_grad():
51
+ lpips_val = lpips_fn(gt_t * 2.0 - 1.0, gen_t * 2.0 - 1.0).mean()
52
+
53
+ return psnr.item(), ssim_val.item(), lpips_val.item()
54
+
55
+
56
+ def main():
57
+ parser = argparse.ArgumentParser(
58
+ description="Compute PSNR/SSIM/LPIPS on GPU for two folders of .mp4 videos"
59
+ )
60
+ parser.add_argument("--original_video", required=True,
61
+ help="ground-truth .mp4 videos")
62
+ parser.add_argument("--generated_video", required=True,
63
+ help="generated .mp4 videos")
64
+ parser.add_argument("--device", default="cuda",
65
+ help="Torch device, e.g. 'cuda' or 'cpu'")
66
+ parser.add_argument("--lpips_net", default="alex", choices=["alex", "vgg"],
67
+ help="Backbone for LPIPS")
68
+ args = parser.parse_args()
69
+
70
+ device = torch.device(args.device if torch.cuda.is_available() or args.device == "cpu" else "cpu")
71
+ # instantiate metrics on device
72
+ ssim_metric = StructuralSimilarityIndexMeasure(data_range=1.0).to(device)
73
+ lpips_fn = lpips.LPIPS(net=args.lpips_net, spatial=True).to(device)
74
+
75
+ # gather .mp4 filenames
76
+ gt_files = args.original_video
77
+ gen_set = args.generated_video
78
+
79
+ psnrs, ssims, lpips_vals = [], [], []
80
+ for fname in tqdm([gt_files], desc="Videos"):
81
+ path_gt = gt_files
82
+ path_gen = gen_set
83
+
84
+ # load frames; resize generated to match GT dimensions
85
+ frames_gt = load_video_frames(path_gt)
86
+ frames_gen = load_video_frames(path_gen)
87
+
88
+ res = compute_video_metrics(frames_gt, frames_gen,
89
+ device, ssim_metric, lpips_fn)
90
+ if res is None:
91
+ continue
92
+ p, s, l = res
93
+ psnrs.append(p)
94
+ ssims.append(s)
95
+ lpips_vals.append(l)
96
+
97
+ if not psnrs:
98
+ print("No valid videos processed.")
99
+ return
100
+
101
+ print("\n=== Overall Averages ===")
102
+ print(f"Average PSNR : {np.mean(psnrs):.2f} dB")
103
+ print(f"Average SSIM : {np.mean(ssims):.4f}")
104
+ print(f"Average LPIPS: {np.mean(lpips_vals):.4f}")
105
+
106
+
107
+ if __name__ == "__main__":
108
+ main()
FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/context_parallel.cpython-312.pyc ADDED
Binary file (33.9 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/pipeline_parallel.cpython-310.pyc ADDED
Binary file (4.44 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/pipeline_parallel.cpython-312.pyc ADDED
Binary file (6.09 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/tile_parallel.cpython-310.pyc ADDED
Binary file (14 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/infra/parallelism/__pycache__/tile_parallel.cpython-312.pyc ADDED
Binary file (24.1 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/__init__.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from .dit_model import get_dit, VideoDiTModel
16
+ from .dit_module import FullyParallelAttention
17
+
18
+ __all__ = ["get_dit", "VideoDiTModel", "FullyParallelAttention"]
FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (352 Bytes). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (365 Bytes). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_model.cpython-310.pyc ADDED
Binary file (18.7 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_model.cpython-312.pyc ADDED
Binary file (35.9 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_module.cpython-310.pyc ADDED
Binary file (41.6 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/__pycache__/dit_module.cpython-312.pyc ADDED
Binary file (76.2 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/dit/dit_model.py ADDED
@@ -0,0 +1,733 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import gc
16
+ import math
17
+ import os
18
+ from typing import Tuple
19
+
20
+ import torch
21
+ import torch.distributed
22
+ import torch.nn as nn
23
+ from einops import rearrange
24
+
25
+ from inference.common import (
26
+ InferenceParams,
27
+ MagiConfig,
28
+ ModelMetaArgs,
29
+ PackedCoreAttnParams,
30
+ PackedCrossAttnParams,
31
+ env_is_true,
32
+ print_per_rank,
33
+ print_rank_0,
34
+ )
35
+ from inference.infra.checkpoint import load_checkpoint
36
+ from inference.infra.distributed import parallel_state as mpu
37
+ from inference.infra.parallelism import cp_post_process, cp_pre_process, pp_scheduler
38
+
39
+ from .dit_module import CaptionEmbedder, FinalLinear, LearnableRotaryEmbeddingCat, TimestepEmbedder, TransformerBlock
40
+
41
+
42
+ class VideoDiTModel(torch.nn.Module):
43
+ """VideoDiT model for video diffusion.
44
+
45
+ Args:
46
+ config (MagiConfig): Transformer config
47
+ pre_process (bool, optional): Include embedding layer (used with pipeline parallelism). Defaults to True.
48
+ post_process (bool, optional): Include an output layer (used with pipeline parallelism). Defaults to True.
49
+ """
50
+
51
+ def __init__(self, config: MagiConfig, pre_process: bool = True, post_process: bool = True) -> None:
52
+ super().__init__()
53
+
54
+ self.model_config = config.model_config
55
+ self.runtime_config = config.runtime_config
56
+ self.engine_config = config.engine_config
57
+
58
+ self.pre_process = pre_process
59
+ self.post_process = post_process
60
+ self.in_channels = self.model_config.in_channels
61
+ self.out_channels = self.model_config.out_channels
62
+ self.patch_size = self.model_config.patch_size
63
+ self.t_patch_size = self.model_config.t_patch_size
64
+ self.caption_max_length = self.model_config.caption_max_length
65
+ self.num_heads = self.model_config.num_attention_heads
66
+
67
+ self.x_embedder = nn.Conv3d(
68
+ self.model_config.in_channels,
69
+ self.model_config.hidden_size,
70
+ kernel_size=(self.model_config.t_patch_size, self.model_config.patch_size, self.model_config.patch_size),
71
+ stride=(self.model_config.t_patch_size, self.model_config.patch_size, self.model_config.patch_size),
72
+ bias=False,
73
+ )
74
+ self.t_embedder = TimestepEmbedder(model_config=self.model_config)
75
+ self.y_embedder = CaptionEmbedder(model_config=self.model_config)
76
+ self.rope = LearnableRotaryEmbeddingCat(
77
+ self.model_config.hidden_size // self.model_config.num_attention_heads, in_pixels=False
78
+ )
79
+
80
+ # trm block
81
+ self.videodit_blocks = TransformerBlock(
82
+ model_config=self.model_config,
83
+ engine_config=self.engine_config,
84
+ pre_process=pre_process,
85
+ post_process=post_process,
86
+ )
87
+
88
+ self.final_linear = FinalLinear(
89
+ self.model_config.hidden_size, self.model_config.patch_size, self.model_config.t_patch_size, self.out_channels
90
+ )
91
+
92
+ def generate_kv_range_for_uncondition(self, uncond_x) -> torch.Tensor:
93
+ device = f"cuda:{torch.cuda.current_device()}"
94
+ B, C, T, H, W = uncond_x.shape
95
+ chunk_token_nums = (
96
+ (T // self.model_config.t_patch_size) * (H // self.model_config.patch_size) * (W // self.model_config.patch_size)
97
+ )
98
+
99
+ k_chunk_start = torch.linspace(0, (B - 1) * chunk_token_nums, steps=B).reshape((B, 1))
100
+ k_chunk_end = torch.linspace(chunk_token_nums, B * chunk_token_nums, steps=B).reshape((B, 1))
101
+ return torch.concat([k_chunk_start, k_chunk_end], dim=1).to(torch.int32).to(device)
102
+
103
+ def unpatchify(self, x, H, W):
104
+ return rearrange(
105
+ x,
106
+ "(T H W) N (pT pH pW C) -> N C (T pT) (H pH) (W pW)",
107
+ H=H,
108
+ W=W,
109
+ pT=self.t_patch_size,
110
+ pH=self.patch_size,
111
+ pW=self.patch_size,
112
+ ).contiguous()
113
+
114
+ @torch.no_grad()
115
+ def get_embedding_and_meta(self, x, t, y, caption_dropout_mask, xattn_mask, kv_range, **kwargs):
116
+ """
117
+ Forward embedding and meta for VideoDiT.
118
+ NOTE: This function should only handle single card behavior.
119
+
120
+ Input:
121
+ x: (N, C, T, H, W). torch.Tensor of spatial inputs (images or latent representations of images)
122
+ t: (N, denoising_range_num). torch.Tensor of diffusion timesteps
123
+ y: (N * denoising_range_num, 1, L, C). torch.Tensor of class labels
124
+ caption_dropout_mask: (N). torch.Tensor of whether to drop caption
125
+ xattn_mask: (N * denoising_range_num, 1, L). torch.Tensor of xattn mask
126
+ kv_range: (N * denoising_range_num, 2). torch.Tensor of kv range
127
+
128
+ Output:
129
+ x: (S, N, D). torch.Tensor of inputs embedding (images or latent representations of images)
130
+ condition: (N, denoising_range_num, D). torch.Tensor of condition embedding
131
+ condition_map: (S, N). torch.Tensor determine which condition to use for each token
132
+ rope: (S, 96). torch.Tensor of rope
133
+ y_xattn_flat: (total_token, D). torch.Tensor of y_xattn_flat
134
+ cuda_graph_inputs: (y_xattn_flat, xattn_mask) or None. None means no cuda graph
135
+ NOTE: y_xattn_flat and xattn_mask with static shape
136
+ H: int. Height of the input
137
+ W: int. Width of the input
138
+ ardf_meta: dict. Meta information for ardf
139
+ cross_attn_params: PackedCrossAttnParams. Packed sequence parameters for cross_atten
140
+ """
141
+
142
+ ###################################
143
+ # Part1: Embed x #
144
+ ###################################
145
+ x = self.x_embedder(x) # [N, C, T, H, W]
146
+ batch_size, _, T, H, W = x.shape
147
+
148
+ # Prepare necessary variables
149
+ range_num = kwargs["range_num"]
150
+ denoising_range_num = kwargs["denoising_range_num"]
151
+ slice_point = kwargs.get("slice_point", 0)
152
+ frame_in_range = T // denoising_range_num
153
+ prev_clean_T = frame_in_range * slice_point
154
+ T_total = T + prev_clean_T
155
+
156
+ ###################################
157
+ # Part2: rope #
158
+ ###################################
159
+ # caculate rescale_factor for multi-resolution & multi aspect-ratio training
160
+ # the base_size [16*16] is A predefined size based on data:(256x256) vae: (8,8,4) patch size: (1,1,2)
161
+ # This definition do not have any relationship with the actual input/model/setting.
162
+ # ref_feat_shape is used to calculate innner rescale factor, so it can be float.
163
+ rescale_factor = math.sqrt((H * W) / (16 * 16))
164
+ rope = self.rope.get_embed(shape=[T_total, H, W], ref_feat_shape=[T_total, H / rescale_factor, W / rescale_factor])
165
+ # the shape of rope is (T*H*W, -1) aka (seq_length, head_dim), as T is the first dimension, we can directly cut it.
166
+ rope = rope[-(T * H * W) :]
167
+
168
+
169
+ ###################################
170
+ # Part3: Embed t #
171
+ ###################################
172
+ assert t.shape[0] == batch_size, f"Invalid t shape, got {t.shape[0]} != {batch_size}" # nolint
173
+ assert t.shape[1] == denoising_range_num, f"Invalid t shape, got {t.shape[1]} != {denoising_range_num}" # nolint
174
+ t_flat = t.flatten() # (N * denoising_range_num,)
175
+ t = self.t_embedder(t_flat) # (N, D)
176
+
177
+ if self.engine_config.distill:
178
+ distill_dt_scalar = 2
179
+ if kwargs["num_steps"] == 12:
180
+ base_chunk_step = 4
181
+ distill_dt_factor = base_chunk_step / kwargs["distill_interval"] * distill_dt_scalar
182
+ else:
183
+ distill_dt_factor = kwargs["num_steps"] / 4 * distill_dt_scalar
184
+ distill_dt = torch.ones_like(t_flat) * distill_dt_factor
185
+ distill_dt_embed = self.t_embedder(distill_dt)
186
+ t = t + distill_dt_embed
187
+ t = t.reshape(batch_size, denoising_range_num, -1) # (N, range_num, D)
188
+
189
+ ######################################################
190
+ # Part4: Embed y, prepare condition and y_xattn_flat #
191
+ ######################################################
192
+ # (N * denoising_range_num, 1, L, D)
193
+ y_xattn, y_adaln = self.y_embedder(y, self.training, caption_dropout_mask)
194
+
195
+ assert xattn_mask is not None
196
+ xattn_mask = xattn_mask.squeeze(1).squeeze(1)
197
+
198
+ # condition: (N, range_num, D)
199
+ y_adaln = y_adaln.squeeze(1) # (N, D)
200
+ condition = t + y_adaln.unsqueeze(1)
201
+
202
+ assert condition.shape[0] == batch_size
203
+ assert condition.shape[1] == denoising_range_num
204
+ seqlen_per_chunk = (T * H * W) // denoising_range_num
205
+ condition_map = torch.arange(batch_size * denoising_range_num, device=x.device)
206
+ condition_map = torch.repeat_interleave(condition_map, seqlen_per_chunk)
207
+ condition_map = condition_map.reshape(batch_size, -1).transpose(0, 1).contiguous()
208
+
209
+ # y_xattn_flat: (total_token, D)
210
+ y_xattn_flat = torch.masked_select(y_xattn.squeeze(1), xattn_mask.unsqueeze(-1).bool()).reshape(-1, y_xattn.shape[-1])
211
+ xattn_mask_for_cuda_graph = None
212
+
213
+ ######################################################
214
+ # Part5: Prepare cross_attn_params for cross_atten #
215
+ ######################################################
216
+ # (N * denoising_range_num, L)
217
+ xattn_mask = xattn_mask.reshape(xattn_mask.shape[0], -1)
218
+ y_index = torch.sum(xattn_mask, dim=-1)
219
+ clip_token_nums = H * W * frame_in_range
220
+
221
+ cu_seqlens_q = torch.Tensor([0] + ([clip_token_nums] * denoising_range_num * batch_size)).to(torch.int64).to(x.device)
222
+ cu_seqlens_k = torch.cat([y_index.new_tensor([0]), y_index]).to(torch.int64).to(x.device)
223
+ cu_seqlens_q = cu_seqlens_q.cumsum(-1).to(torch.int32)
224
+ cu_seqlens_k = cu_seqlens_k.cumsum(-1).to(torch.int32)
225
+
226
+ assert (
227
+ cu_seqlens_q.shape == cu_seqlens_k.shape
228
+ ), f"cu_seqlens_q.shape: {cu_seqlens_q.shape}, cu_seqlens_k.shape: {cu_seqlens_k.shape}"
229
+
230
+ xattn_q_ranges = torch.cat([cu_seqlens_q[:-1].unsqueeze(1), cu_seqlens_q[1:].unsqueeze(1)], dim=1)
231
+ xattn_k_ranges = torch.cat([cu_seqlens_k[:-1].unsqueeze(1), cu_seqlens_k[1:].unsqueeze(1)], dim=1)
232
+ assert (
233
+ xattn_q_ranges.shape == xattn_k_ranges.shape
234
+ ), f"xattn_q_ranges.shape: {xattn_q_ranges.shape}, xattn_k_ranges.shape: {xattn_k_ranges.shape}"
235
+
236
+ cross_attn_params = PackedCrossAttnParams(
237
+ q_ranges=xattn_q_ranges,
238
+ kv_ranges=xattn_k_ranges,
239
+ cu_seqlens_q=cu_seqlens_q,
240
+ cu_seqlens_kv=cu_seqlens_k,
241
+ max_seqlen_q=clip_token_nums,
242
+ max_seqlen_kv=self.caption_max_length,
243
+ )
244
+
245
+ ##################################################
246
+ # Part6: Prepare core_atten related q/kv range #
247
+ ##################################################
248
+ q_range = torch.cat([cu_seqlens_q[:-1].unsqueeze(1), cu_seqlens_q[1:].unsqueeze(1)], dim=1)
249
+ flat_kv = torch.unique(kv_range, sorted=True)
250
+ max_seqlen_k = (flat_kv[-1] - flat_kv[0]).cpu().item()
251
+
252
+ ardf_meta = dict(
253
+ clip_token_nums=clip_token_nums,
254
+ slice_point=slice_point,
255
+ range_num=range_num,
256
+ denoising_range_num=denoising_range_num,
257
+ q_range=q_range,
258
+ k_range=kv_range,
259
+ max_seqlen_q=clip_token_nums,
260
+ max_seqlen_k=max_seqlen_k,
261
+ )
262
+
263
+ return (x, condition, condition_map, rope, y_xattn_flat, xattn_mask_for_cuda_graph, H, W, ardf_meta, cross_attn_params)
264
+
265
+ @torch.no_grad()
266
+ def forward_pre_process(
267
+ self, x, t, y, caption_dropout_mask=None, xattn_mask=None, kv_range=None, **kwargs
268
+ ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, ModelMetaArgs]:
269
+ assert kv_range is not None, "Please ensure kv_range is provided"
270
+
271
+ x = x * self.model_config.x_rescale_factor
272
+
273
+ if self.model_config.half_channel_vae:
274
+ assert x.shape[1] == 16
275
+ x = torch.cat([x, x], dim=1)
276
+
277
+ x = x.float()
278
+ t = t.float()
279
+ y = y.float()
280
+ # embedder context will ensure that the processing is in high precision even if the embedder params is in bfloat16 mode
281
+ with torch.autocast(device_type="cuda", dtype=torch.float32):
282
+ (
283
+ x,
284
+ condition,
285
+ condition_map,
286
+ rope,
287
+ y_xattn_flat,
288
+ xattn_mask_for_cuda_graph,
289
+ H,
290
+ W,
291
+ ardf_meta,
292
+ cross_attn_params,
293
+ ) = self.get_embedding_and_meta(x, t, y, caption_dropout_mask, xattn_mask, kv_range, **kwargs)
294
+
295
+ # Downcast x and rearrange x
296
+ x = x.to(self.model_config.params_dtype)
297
+ x = rearrange(x, "N C T H W -> (T H W) N C").contiguous() # (thw, N, D)
298
+
299
+ # condition and y_xattn_flat will be downcast to bfloat16 in transformer block.
300
+ condition = condition.to(self.model_config.params_dtype)
301
+ y_xattn_flat = y_xattn_flat.to(self.model_config.params_dtype)
302
+
303
+ core_attn_params = PackedCoreAttnParams(
304
+ q_range=ardf_meta["q_range"],
305
+ k_range=ardf_meta["k_range"],
306
+ np_q_range=ardf_meta["q_range"].cpu().numpy(),
307
+ np_k_range=ardf_meta["k_range"].cpu().numpy(),
308
+ max_seqlen_q=ardf_meta["max_seqlen_q"],
309
+ max_seqlen_k=ardf_meta["max_seqlen_k"],
310
+ )
311
+
312
+ (x, condition_map, rope, cp_pad_size, cp_split_sizes, core_attn_params, cross_attn_params) = cp_pre_process(
313
+ self.engine_config.cp_size,
314
+ self.engine_config.cp_strategy,
315
+ x,
316
+ condition_map,
317
+ rope,
318
+ xattn_mask_for_cuda_graph,
319
+ ardf_meta,
320
+ core_attn_params,
321
+ cross_attn_params,
322
+ )
323
+
324
+ meta_args = ModelMetaArgs(
325
+ H=H,
326
+ W=W,
327
+ cp_pad_size=cp_pad_size,
328
+ cp_split_sizes=cp_split_sizes,
329
+ slice_point=ardf_meta["slice_point"],
330
+ denoising_range_num=ardf_meta["denoising_range_num"],
331
+ range_num=ardf_meta["range_num"],
332
+ extract_prefix_video_feature=kwargs.get("extract_prefix_video_feature", False),
333
+ fwd_extra_1st_chunk=kwargs["fwd_extra_1st_chunk"],
334
+ distill_nearly_clean_chunk=kwargs.get("distill_nearly_clean_chunk", False),
335
+ clip_token_nums=ardf_meta["clip_token_nums"],
336
+ enable_cuda_graph=xattn_mask_for_cuda_graph is not None,
337
+ core_attn_params=core_attn_params,
338
+ cross_attn_params=cross_attn_params,
339
+ timestep=t, # add to get attention weights for each timestep
340
+ get_attn_weights_layer_num=-1,
341
+ save_kvcache_every_forward=kwargs.get("save_kvcache_every_forward", False),
342
+ cur_denoise_step=kwargs.get("cur_denoise_step", 0),
343
+ start_chunk_id=kwargs["start_chunk_id"],
344
+ end_chunk_id=kwargs["end_chunk_id"],
345
+ compress_kv=kwargs.get("compress_kv", False),
346
+ total_cache_len=kwargs.get("total_cache_len", 0),
347
+ budget_cache_len=kwargs.get("budget_cache_len", 0),
348
+ chunk_num=kwargs["chunk_num"],
349
+ debug=kwargs.get("debug", False),
350
+ near_clean_chunk_idx=kwargs.get("near_clean_chunk_idx", -1),
351
+ )
352
+
353
+ return (x, condition, condition_map, y_xattn_flat, rope, meta_args)
354
+
355
+ @torch.no_grad()
356
+ def forward_post_process(self, x, meta_args: ModelMetaArgs) -> torch.Tensor:
357
+ x = x.float()
358
+ # embedder context will ensure that the processing is in high precision even if the embedder params is in bfloat16 mode
359
+ with torch.autocast(device_type="cuda", dtype=torch.float32):
360
+ x = self.final_linear(x) # (thw/cp, N, patch_size ** 2 * out_channels)
361
+
362
+ # leave context parallel region
363
+ x = cp_post_process(self.engine_config.cp_size, self.engine_config.cp_strategy, x, meta_args)
364
+
365
+ # N C T H W
366
+ x = self.unpatchify(x, meta_args.H, meta_args.W)
367
+
368
+ if self.model_config.half_channel_vae:
369
+ assert x.shape[1] == 32
370
+ x = x[:, :16]
371
+
372
+ x = x / self.model_config.x_rescale_factor
373
+
374
+ return x
375
+
376
+ @torch.no_grad()
377
+ def forward(
378
+ self,
379
+ x,
380
+ t,
381
+ y,
382
+ caption_dropout_mask=None,
383
+ xattn_mask=None,
384
+ kv_range=None,
385
+ inference_params: InferenceParams = None,
386
+ **kwargs,
387
+ ) -> torch.Tensor:
388
+ (x, condition, condition_map, y_xattn_flat, rope, meta_args) = self.forward_pre_process(
389
+ x, t, y, caption_dropout_mask, xattn_mask, kv_range, **kwargs
390
+ )
391
+
392
+ if not self.pre_process:
393
+ x = pp_scheduler().recv_prev_data(x.shape, x.dtype)
394
+ self.videodit_blocks.set_input_tensor(x)
395
+ else:
396
+ # clone a new tensor to ensure x is not a view of other tensor
397
+ x = x.clone()
398
+
399
+ x = self.videodit_blocks.forward(
400
+ hidden_states=x,
401
+ condition=condition,
402
+ condition_map=condition_map,
403
+ y_xattn_flat=y_xattn_flat,
404
+ rotary_pos_emb=rope,
405
+ inference_params=inference_params,
406
+ meta_args=meta_args,
407
+ )
408
+
409
+ if not self.post_process:
410
+ pp_scheduler().isend_next(x)
411
+
412
+ return self.forward_post_process(x, meta_args)
413
+
414
+ def forward_3cfg(
415
+ self, x, timestep, y, mask, kv_range, inference_params, **kwargs
416
+ ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, int]:
417
+ """
418
+ Forward pass of PixArt, but also batches the unconditional forward pass for classifier-free guidance.
419
+ """
420
+ # https://github.com/openai/glide-text2im/blob/main/notebooks/text2im.ipynb
421
+
422
+ assert x.shape[0] == 2
423
+ assert mask.shape[0] % 2 == 0 # mask should be a multiple of 2
424
+ x = torch.cat([x[0:1], x[0:1]], dim=0)
425
+ caption_dropout_mask = torch.tensor([False, True], dtype=torch.bool, device=x.device)
426
+
427
+ inference_params.update_kv_cache = False
428
+ out_cond_pre_and_text = self.forward(
429
+ x[0:1],
430
+ timestep[0:1],
431
+ y[0 : y.shape[0] // 2],
432
+ caption_dropout_mask=caption_dropout_mask[0:1],
433
+ xattn_mask=mask[0 : y.shape[0] // 2],
434
+ kv_range=kv_range,
435
+ inference_params=inference_params,
436
+ **kwargs,
437
+ )
438
+
439
+ inference_params.update_kv_cache = True
440
+ out_cond_pre = self.forward(
441
+ x[1:2],
442
+ timestep[1:2],
443
+ y[y.shape[0] // 2 : y.shape[0]],
444
+ caption_dropout_mask=caption_dropout_mask[1:2],
445
+ xattn_mask=mask[y.shape[0] // 2 : y.shape[0]],
446
+ kv_range=kv_range,
447
+ inference_params=inference_params,
448
+ **kwargs,
449
+ )
450
+
451
+ def chunk_to_batch(input, denoising_range_num):
452
+ input = input.squeeze(0)
453
+ input = input.reshape(-1, denoising_range_num, kwargs["chunk_width"], *input.shape[2:])
454
+ return input.transpose(0, 1) # (denoising_range_num, chn, chunk_width, h, w)
455
+
456
+ def batch_to_chunk(input, denoising_range_num):
457
+ input = input.transpose(0, 1)
458
+ input = input.reshape(1, -1, denoising_range_num * kwargs["chunk_width"], *input.shape[3:])
459
+ return input
460
+
461
+ class UnconditionGuard:
462
+ def __init__(self, kwargs):
463
+ self.kwargs = kwargs
464
+ self.prev_state = {
465
+ "range_num": kwargs["range_num"],
466
+ "denoising_range_num": kwargs["denoising_range_num"],
467
+ "slice_point": kwargs["slice_point"],
468
+ "fwd_extra_1st_chunk": kwargs["fwd_extra_1st_chunk"],
469
+ }
470
+
471
+ def __enter__(self):
472
+ if self.kwargs.get("fwd_extra_1st_chunk", False):
473
+ self.kwargs["denoising_range_num"] -= 1
474
+ self.kwargs["slice_point"] += 1
475
+ self.kwargs["fwd_extra_1st_chunk"] = False
476
+
477
+ def __exit__(self, exc_type, exc_val, exc_tb):
478
+ self.kwargs["range_num"] = self.prev_state["range_num"]
479
+ self.kwargs["denoising_range_num"] = self.prev_state["denoising_range_num"]
480
+ self.kwargs["slice_point"] = self.prev_state["slice_point"]
481
+ self.kwargs["fwd_extra_1st_chunk"] = self.prev_state["fwd_extra_1st_chunk"]
482
+
483
+ with UnconditionGuard(kwargs):
484
+ denoising_range_num = kwargs["denoising_range_num"]
485
+ denoise_width = kwargs["chunk_width"] * denoising_range_num
486
+ uncond_x = chunk_to_batch(x[0:1, :, -denoise_width:], denoising_range_num)
487
+ timestep = timestep[0:1, -denoising_range_num:].transpose(0, 1)
488
+ uncond_y = y[y.shape[0] // 2 : y.shape[0]][-denoising_range_num:]
489
+ caption_dropout_mask = torch.tensor([True], dtype=torch.bool, device=x.device)
490
+ uncond_mask = mask[y.shape[0] // 2 : y.shape[0]][-denoising_range_num:]
491
+ uncond_kv_range = self.generate_kv_range_for_uncondition(uncond_x)
492
+
493
+ kwargs["range_num"] = 1
494
+ kwargs["denoising_range_num"] = 1
495
+ kwargs["slice_point"] = 0
496
+ out_uncond = self.forward(
497
+ uncond_x,
498
+ timestep,
499
+ uncond_y,
500
+ caption_dropout_mask=caption_dropout_mask,
501
+ xattn_mask=uncond_mask,
502
+ kv_range=uncond_kv_range,
503
+ inference_params=None,
504
+ **kwargs,
505
+ )
506
+ out_uncond = batch_to_chunk(out_uncond, denoising_range_num)
507
+
508
+ return out_cond_pre_and_text, out_cond_pre, out_uncond, denoise_width
509
+
510
+ def get_cfg_scale(self, t, cfg_t_range, prev_chunk_scale_s, text_scale_s):
511
+ indices = torch.searchsorted(cfg_t_range - 1e-7, t) - 1
512
+ assert indices.min() >= 0 and indices.max() < len(prev_chunk_scale_s)
513
+ return prev_chunk_scale_s[indices], text_scale_s[indices]
514
+
515
+ def forward_dispatcher(self, x, timestep, y, mask, kv_range, inference_params, **kwargs):
516
+ if self.runtime_config.cfg_number == 3:
517
+ (out_cond_pre_and_text, out_cond_pre, out_uncond, denoise_width) = self.forward_3cfg(
518
+ x, timestep, y, mask, kv_range, inference_params, **kwargs
519
+ )
520
+
521
+ prev_chunk_scale_s = torch.tensor(self.runtime_config.prev_chunk_scales).cuda()
522
+ text_scale_s = torch.tensor(self.runtime_config.text_scales).cuda()
523
+ cfg_t_range = torch.tensor(self.runtime_config.cfg_t_range).cuda()
524
+ applied_cfg_range_num, chunk_width = (kwargs["denoising_range_num"], kwargs["chunk_width"])
525
+ if kwargs["fwd_extra_1st_chunk"]:
526
+ applied_cfg_range_num -= 1
527
+ cfg_timestep = timestep[0, -applied_cfg_range_num:]
528
+
529
+ assert len(prev_chunk_scale_s) == len(cfg_t_range), "prev_chunks_scale and t_range should have the same length"
530
+ assert len(text_scale_s) == len(cfg_t_range), "text_scale and t_range should have the same length"
531
+
532
+ cfg_output_list = []
533
+
534
+ for chunk_idx in range(applied_cfg_range_num):
535
+ prev_chunk_scale, text_scale = self.get_cfg_scale(
536
+ cfg_timestep[chunk_idx], cfg_t_range, prev_chunk_scale_s, text_scale_s
537
+ )
538
+ l = chunk_idx * chunk_width
539
+ r = (chunk_idx + 1) * chunk_width
540
+ cfg_output = (
541
+ (1 - prev_chunk_scale) * out_uncond[:, :, l:r]
542
+ + (prev_chunk_scale - text_scale) * out_cond_pre[:, :, -denoise_width:][:, :, l:r]
543
+ + text_scale * out_cond_pre_and_text[:, :, -denoise_width:][:, :, l:r]
544
+ )
545
+ cfg_output_list.append(cfg_output)
546
+
547
+ cfg_output = torch.cat(cfg_output_list, dim=2)
548
+
549
+ # Reconstruct input x for the next diffusion step
550
+ x = torch.cat([x[0:1, :, :-denoise_width], cfg_output], dim=2)
551
+ x = torch.cat([x, x], dim=0)
552
+ return x
553
+ elif self.runtime_config.cfg_number == 1:
554
+ assert x.shape[0] == 2
555
+ x = torch.cat([x[0:1], x[0:1]], dim=0)
556
+
557
+ kwargs["caption_dropout_mask"] = torch.tensor([False], dtype=torch.bool, device=x.device)
558
+ inference_params.update_kv_cache = True
559
+ if kwargs.get("distill_nearly_clean_chunk", False):
560
+ prev_chunks_scale = float(os.getenv("prev_chunks_scale", 0.7))
561
+ slice_start = 1 if kwargs["fwd_extra_1st_chunk"] else 0
562
+ cond_pre_and_text_channel = x.shape[2]
563
+ new_x_chunk = x[0:1, :, slice_start * kwargs["chunk_width"] : (slice_start + 1) * kwargs["chunk_width"]]
564
+ new_kvrange = self.generate_kv_range_for_uncondition(new_x_chunk)
565
+ kwargs["denoising_range_num"] += 1
566
+ cat_x_chunk = torch.cat([x[0:1], new_x_chunk], dim=2)
567
+ new_kvrange = new_kvrange + kv_range.max()
568
+ cat_kvrange = torch.cat([kv_range, new_kvrange], dim=0)
569
+ cat_t = torch.cat([timestep[0:1], timestep[0:1, slice_start : slice_start + 1]], dim=1)
570
+ cat_y = torch.cat([y[0 : y.shape[0] // 2], y[slice_start : slice_start + 1]], dim=0)
571
+ cat_xattn_mask = torch.cat([mask[0 : y.shape[0] // 2], mask[slice_start : slice_start + 1]], dim=0)
572
+
573
+ cat_out = self.forward(
574
+ cat_x_chunk,
575
+ cat_t,
576
+ cat_y,
577
+ xattn_mask=cat_xattn_mask,
578
+ kv_range=cat_kvrange,
579
+ inference_params=inference_params,
580
+ **kwargs,
581
+ )
582
+ # flowcache processes one chunk at a time and returns all chunks in a dictionary after processing is complete
583
+ if type(cat_out) == dict:
584
+ # No artifact chunk in 3 cases:
585
+ # 1. Discard artifact chunk is set
586
+ # 2. No recomputed output part
587
+ # 3. Although there is artifact chunk, the corresponding nearly clean chunk can be reused directly, so no need to compute artifact chunk separately
588
+ if self.discard_nearly_clean_chunk or (not cat_out.keys()) or max(cat_out) != self.near_clean_chunk_idx:
589
+ out_cond_pre_and_text = cat_out
590
+ else:
591
+ near_clean_out_cond_text = cat_out[max(cat_out)]
592
+ near_clean_out_cond_pre_and_text = cat_out[min(cat_out)]
593
+ cat_out[min(cat_out)] = (
594
+ near_clean_out_cond_pre_and_text * prev_chunks_scale + near_clean_out_cond_text * (1 - prev_chunks_scale)
595
+ )
596
+ # Remove the output corresponding to nearly clean chunk
597
+ cat_out.pop(max(cat_out))
598
+ out_cond_pre_and_text = cat_out
599
+ elif type(cat_out) == torch.Tensor:
600
+ # Adapt to teacache
601
+ if hasattr(self, "discard_nearly_clean_chunk") and self.discard_nearly_clean_chunk:
602
+ # No need to do extra forward for nearly clean chunk, so no need to add proportionally
603
+ out_cond_pre_and_text = cat_out
604
+ # Reset
605
+ self.discard_nearly_clean_chunk = False
606
+ else:
607
+ near_clean_out_cond_pre_and_text = cat_out[
608
+ :, :, slice_start * kwargs["chunk_width"] : (slice_start + 1) * kwargs["chunk_width"]
609
+ ]
610
+ near_clean_out_cond_text = cat_out[:, :, cond_pre_and_text_channel:]
611
+
612
+ near_out_cond_pre_and_text = (
613
+ near_clean_out_cond_pre_and_text * prev_chunks_scale + near_clean_out_cond_text * (1 - prev_chunks_scale)
614
+ )
615
+
616
+ cat_out[
617
+ :, :, slice_start * kwargs["chunk_width"] : (slice_start + 1) * kwargs["chunk_width"]
618
+ ] = near_out_cond_pre_and_text
619
+ out_cond_pre_and_text = cat_out[:, :, :cond_pre_and_text_channel]
620
+ else:
621
+ raise RuntimeError
622
+ else:
623
+ out_cond_pre_and_text = self.forward(
624
+ x[0:1],
625
+ timestep[0:1],
626
+ y[0 : y.shape[0] // 2],
627
+ xattn_mask=mask[0 : y.shape[0] // 2],
628
+ kv_range=kv_range,
629
+ inference_params=inference_params,
630
+ **kwargs,
631
+ )
632
+
633
+ if type(out_cond_pre_and_text) == dict:
634
+ return_velocity = {}
635
+ for key, value in out_cond_pre_and_text.items():
636
+ return_velocity[key] = torch.cat([value[0:1], value[0:1]], dim=0)
637
+ return return_velocity
638
+ else:
639
+ # Adapt to teacache
640
+ # "denoising_range_num" will be modified inside forward, note that kwargs here is still before modification
641
+ if hasattr(self, "denoising_range_num"):
642
+ kwargs["denoising_range_num"] = self.denoising_range_num
643
+ del self.denoising_range_num
644
+
645
+ denoise_width = kwargs["chunk_width"] * kwargs["denoising_range_num"]
646
+ if kwargs["fwd_extra_1st_chunk"]:
647
+ denoise_width -= kwargs["chunk_width"]
648
+
649
+ if hasattr(self, "single_chunk_inference") and self.single_chunk_inference:
650
+ x = torch.cat([out_cond_pre_and_text, out_cond_pre_and_text], dim=0)
651
+ return x
652
+ else:
653
+ x = torch.cat([x[0:1, :, :-denoise_width], out_cond_pre_and_text[:, :, -denoise_width:]], dim=2)
654
+ x = torch.cat([x[0:1], x[0:1]], dim=0)
655
+ return x
656
+ else:
657
+ raise NotImplementedError
658
+
659
+
660
+ def _build_dit_model(config: MagiConfig):
661
+ """Builds the model"""
662
+ device = "cuda" if env_is_true("SKIP_LOAD_MODEL") else "meta"
663
+ with torch.device(device):
664
+ model = VideoDiTModel(
665
+ config=config, pre_process=mpu.is_pipeline_first_stage(), post_process=mpu.is_pipeline_last_stage()
666
+ )
667
+ # print_rank_0(model)
668
+
669
+ # Print number of parameters.
670
+ param_count = sum([p.nelement() for p in model.parameters()])
671
+ model_size_gb = sum([p.nelement() * p.element_size() for p in model.parameters()]) / (1024**3)
672
+ print_per_rank(
673
+ f"(cp, pp) rank ({mpu.get_cp_rank()}, {mpu.get_pp_rank()}): param count {param_count}, model size {model_size_gb:.2f} GB".format(
674
+ mpu.get_cp_rank(), mpu.get_pp_rank(), param_count, model_size_gb
675
+ )
676
+ )
677
+
678
+ return model
679
+
680
+
681
+ def _high_precision_promoter(module: VideoDiTModel):
682
+ module.x_embedder.float()
683
+ module.y_embedder.float()
684
+ module.t_embedder.float()
685
+ module.final_linear.float()
686
+ module.rope.float()
687
+ for name, sub_module in module.named_modules():
688
+ # skip qk_layernorm_xattn
689
+ if "_xattn" in name:
690
+ continue
691
+ # high precision qk_layernorm by default
692
+ if "q_layernorm" in name or "k_layernorm" in name:
693
+ sub_module.float()
694
+ if "self_attn_post_norm" in name or "mlp_post_norm" in name:
695
+ sub_module.float()
696
+ if "final_layernorm" in name:
697
+ sub_module.float()
698
+ return module
699
+
700
+
701
+ def get_dit(config: MagiConfig):
702
+ """Build and load VideoDiT model"""
703
+ model = _build_dit_model(config)
704
+ print_rank_0("Build DiTModel successfully")
705
+
706
+ mem_allocated_gb = torch.cuda.memory_allocated() / 1024**3
707
+ mem_reserved_gb = torch.cuda.memory_reserved() / 1024**3
708
+ print_rank_0(
709
+ f"After build_dit_model, memory allocated: {mem_allocated_gb:.2f} GB, memory reserved: {mem_reserved_gb:.2f} GB"
710
+ )
711
+
712
+ # To avoid Error in debug mode, set default iteration to 0
713
+ if not env_is_true("SKIP_LOAD_MODEL"):
714
+ model = load_checkpoint(model)
715
+ mem_allocated_gb = torch.cuda.memory_allocated() / 1024**3
716
+ mem_reserved_gb = torch.cuda.memory_reserved() / 1024**3
717
+ print_rank_0(
718
+ f"After load_checkpoint, memory allocated: {mem_allocated_gb:.2f} GB, memory reserved: {mem_reserved_gb:.2f} GB"
719
+ )
720
+
721
+ model = _high_precision_promoter(model)
722
+ mem_allocated_gb = torch.cuda.memory_allocated() / 1024**3
723
+ mem_reserved_gb = torch.cuda.memory_reserved() / 1024**3
724
+ print_rank_0(
725
+ f"After high_precision_promoter, memory allocated: {mem_allocated_gb:.2f} GB, memory reserved: {mem_reserved_gb:.2f} GB"
726
+ )
727
+
728
+ model.eval()
729
+ gc.collect()
730
+ torch.cuda.empty_cache()
731
+
732
+ print_rank_0("Load checkpoint successfully")
733
+ return model
FlowCache/FlowCache4MAGI-1/inference/model/dit/dit_module.py ADDED
@@ -0,0 +1,1599 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import math
16
+ import numbers
17
+ from functools import partial
18
+ from typing import Callable, List, Optional, Tuple, Dict, Set
19
+ import flashinfer
20
+ import torch
21
+ import torch.distributed
22
+ import torch.nn as nn
23
+ import torch.nn.functional as F
24
+ import triton
25
+ import triton.language as tl
26
+ from einops import rearrange
27
+ from flash_attn import flash_attn_varlen_func
28
+ from flash_attn.flash_attn_interface import flash_attn_func
29
+ from flash_attn.layers.rotary import apply_rotary_emb as flash_apply_rotary_emb
30
+ from flashinfer.gemm import bmm_fp8
31
+
32
+ try:
33
+ from magi_attention.functional import flex_flash_attn_func
34
+
35
+ flex_attention = flex_flash_attn_func
36
+ except:
37
+ flex_attention = None
38
+
39
+ from torch import Tensor
40
+ from torch.nn import Parameter
41
+
42
+ from inference.common import EngineConfig, InferenceParams, ModelConfig, ModelMetaArgs, PackedCrossAttnParams, divide
43
+ from inference.infra.distributed import parallel_state
44
+ from inference.infra.parallelism import CSOHelper, UlyssesScheduler, cso_communication
45
+
46
+ ##########################################################
47
+ # TimestepEmbedder
48
+ ##########################################################
49
+ class TimestepEmbedder(nn.Module):
50
+ """
51
+ Embeds scalar timesteps into vector representations.
52
+ """
53
+
54
+ def __init__(self, model_config: ModelConfig, frequency_embedding_size=256):
55
+ super().__init__()
56
+
57
+ self.data_type = model_config.params_dtype
58
+ hidden_size = model_config.hidden_size
59
+
60
+ self.mlp = nn.Sequential(
61
+ nn.Linear(frequency_embedding_size, int(hidden_size * model_config.cond_hidden_ratio), bias=True),
62
+ nn.SiLU(),
63
+ nn.Linear(
64
+ int(hidden_size * model_config.cond_hidden_ratio), int(hidden_size * model_config.cond_hidden_ratio), bias=True
65
+ ),
66
+ )
67
+ self.frequency_embedding_size = frequency_embedding_size
68
+
69
+ # rescale the timestep for the general transport model
70
+ self.timestep_rescale_factor = 1000
71
+
72
+ @staticmethod
73
+ def timestep_embedding(t, dim, max_period=10000, timestep_rescale_factor=1):
74
+ """
75
+ Create sinusoidal timestep embeddings.
76
+ :param t: a 1-D Tensor of N indices, one per batch element.
77
+ These may be fractional.
78
+ :param dim: the dimension of the output.
79
+ :param max_period: controls the minimum frequency of the embeddings.
80
+ :return: an (N, D) Tensor of positional embeddings.
81
+ """
82
+ # https://github.com/openai/glide-text2im/blob/main/glide_text2im/nn.py
83
+ half = dim // 2
84
+ freqs = torch.exp(-math.log(max_period) * torch.arange(start=0, end=half, dtype=torch.float32) / half).to(
85
+ device=t.device
86
+ )
87
+ args = t[:, None].float() * freqs[None] * timestep_rescale_factor
88
+ embedding = torch.cat([torch.cos(args), torch.sin(args)], dim=-1)
89
+ if dim % 2:
90
+ embedding = torch.cat([embedding, torch.zeros_like(embedding[:, :1])], dim=-1)
91
+ return embedding
92
+
93
+ def forward(self, t):
94
+ t = t.to(torch.float32)
95
+ t_freq = self.timestep_embedding(
96
+ t, self.frequency_embedding_size, timestep_rescale_factor=self.timestep_rescale_factor
97
+ )
98
+ t_emb = self.mlp(t_freq.to(self.data_type))
99
+ return t_emb
100
+
101
+
102
+ ##########################################################
103
+ # CaptionEmbedder
104
+ ##########################################################
105
+ class CaptionEmbedder(nn.Module):
106
+ """
107
+ Embeds class labels into vector representations. Also handles label dropout for classifier-free guidance.
108
+ """
109
+
110
+ def __init__(self, model_config: ModelConfig):
111
+ super().__init__()
112
+
113
+ in_channels = model_config.caption_channels
114
+ hidden_size = model_config.hidden_size
115
+ caption_max_length = model_config.caption_max_length
116
+
117
+ self.y_proj_xattn = nn.Sequential(
118
+ nn.Linear(in_channels, int(hidden_size * model_config.xattn_cond_hidden_ratio), bias=True), nn.SiLU()
119
+ )
120
+
121
+ self.y_proj_adaln = nn.Sequential(nn.Linear(in_channels, int(hidden_size * model_config.cond_hidden_ratio), bias=True))
122
+
123
+ self.null_caption_embedding = Parameter(torch.empty(caption_max_length, in_channels))
124
+
125
+ def caption_drop(self, caption, caption_dropout_mask):
126
+ """
127
+ Drops labels to enable classifier-free guidance.
128
+ caption.shape = (N, 1, cap_len, C)
129
+ """
130
+ dropped_caption = torch.where(
131
+ caption_dropout_mask[:, None, None, None], # (N, 1, 1, 1)
132
+ self.null_caption_embedding[None, None, :], # (1, 1, cap_len, C)
133
+ caption, # (N, 1, cap_len, C)
134
+ )
135
+ return dropped_caption
136
+
137
+ def caption_drop_single_token(self, caption_dropout_mask):
138
+ dropped_caption = torch.where(
139
+ caption_dropout_mask[:, None, None], # (N, 1, 1)
140
+ self.null_caption_embedding[None, -1, :], # (1, 1, C)
141
+ self.null_caption_embedding[None, -2, :], # (1, 1, C)
142
+ )
143
+ return dropped_caption # (N, 1, C)
144
+
145
+ def forward(self, caption, train, caption_dropout_mask=None):
146
+ if train and caption_dropout_mask is not None:
147
+ caption = self.caption_drop(caption, caption_dropout_mask)
148
+ caption_xattn = self.y_proj_xattn(caption)
149
+ if caption_dropout_mask is not None:
150
+ caption = self.caption_drop_single_token(caption_dropout_mask)
151
+
152
+ caption_adaln = self.y_proj_adaln(caption)
153
+ return caption_xattn, caption_adaln
154
+
155
+
156
+ ##########################################################
157
+ # FinalLinear
158
+ ##########################################################
159
+ class FinalLinear(nn.Module):
160
+ """
161
+ The final linear layer of DiT.
162
+ """
163
+
164
+ def __init__(self, hidden_size, patch_size, t_patch_size, out_channels):
165
+ super().__init__()
166
+ self.linear = nn.Linear(hidden_size, patch_size * patch_size * t_patch_size * out_channels, bias=False)
167
+
168
+ def forward(self, x):
169
+ x = self.linear(x)
170
+ return x
171
+
172
+
173
+ ##########################################################
174
+ # AdaModulateLayer
175
+ ##########################################################
176
+ class AdaModulateLayer(torch.nn.Module):
177
+ def __init__(self, model_config: ModelConfig):
178
+ super().__init__()
179
+ self.model_config = model_config
180
+
181
+ self.gate_num_chunks = 2
182
+ self.act = nn.SiLU()
183
+ self.proj = nn.Sequential(
184
+ nn.Linear(
185
+ int(self.model_config.hidden_size * self.model_config.cond_hidden_ratio),
186
+ int(self.model_config.hidden_size * self.model_config.cond_gating_ratio * self.gate_num_chunks),
187
+ bias=True,
188
+ dtype=self.model_config.params_dtype,
189
+ )
190
+ )
191
+
192
+ def forward(self, c):
193
+ c = self.act(c)
194
+ return self.proj(c)
195
+
196
+
197
+ ##########################################################
198
+ # bias_modulate_add
199
+ ##########################################################
200
+ @triton.jit
201
+ def range_mod_kernel_fwd(
202
+ X, # pointer to the input
203
+ MAP, # map x index to gating index
204
+ GATINGS, # pointer to the gatings
205
+ Y, # pointer to the output
206
+ M, # number of rows in X, unused
207
+ N, # number of columns in X
208
+ stride_xm, # how much to increase the pointer when moving by 1 row in X
209
+ stride_xn, # how much to increase the pointer when moving by 1 column in X
210
+ stride_gm, # how much to increase the pointer when moving by 1 row in GATINGS
211
+ stride_gn, # how much to increase the pointer when moving by 1 column in GATINGS
212
+ stride_ym, # how much to increase the pointer when moving by 1 row in Y
213
+ stride_yn, # how much to increase the pointer when moving by 1 column in Y
214
+ BLOCK_SIZE: tl.constexpr, # number of columns in a block
215
+ ):
216
+ # Map the program id to the row of X and Y it should compute.
217
+ row = tl.program_id(0)
218
+
219
+ cur_X = X + row * stride_xm
220
+ x_cols = tl.arange(0, BLOCK_SIZE) * stride_xn
221
+ x_mask = x_cols < N * stride_xn
222
+ x = tl.load(cur_X + x_cols, mask=x_mask, other=0.0)
223
+
224
+ cur_MAP = MAP + row
225
+ gating_index = tl.load(cur_MAP)
226
+ cur_GATING = GATINGS + gating_index * stride_gm
227
+ gating_cols = tl.arange(0, BLOCK_SIZE) * stride_gn
228
+ gating_mask = gating_cols < N * stride_gn
229
+ gating = tl.load(cur_GATING + gating_cols, mask=gating_mask, other=0.0)
230
+
231
+ cur_Y = Y + row * stride_ym
232
+ y_cols = tl.arange(0, BLOCK_SIZE) * stride_yn
233
+ y_mask = y_cols < N * stride_yn
234
+ tl.store(cur_Y + y_cols, x * gating, mask=y_mask)
235
+
236
+
237
+ def range_mod_triton(x, c_mapping, gatings):
238
+ """
239
+ Inputs:
240
+ x: (s, b, h). Tensor of inputs embedding (images or latent representations of images)
241
+ c_mapping: (s, b). Tensor of condition map
242
+ gatings: (b, denoising_range_num, h). Tensor of condition embedding
243
+ """
244
+
245
+ assert x.is_cuda, "x is not on cuda"
246
+ assert c_mapping.is_cuda, "c_mapping is not on cuda"
247
+ assert gatings.is_cuda, "gatings is not on cuda"
248
+
249
+ # TODO: use 3D tensor for x, c_mapping, and gatings
250
+ s, b, h = x.shape
251
+ x = x.transpose(0, 1).flatten(0, 1)
252
+ c_mapping = c_mapping.transpose(0, 1).flatten(0, 1)
253
+ gatings = gatings.flatten(0, 1)
254
+
255
+ assert x.dim() == 2, f"x must be a 2D tensor but got {x.dim()}D"
256
+ assert c_mapping.dim() == 1, f"c_mapping must be a 1D tensor but got {c_mapping.dim()}D"
257
+ assert gatings.dim() == 2, f"gatings must be a 2D tensor but got {gatings.dim()}D"
258
+
259
+ M, N = x.shape
260
+ if c_mapping.size(0) != M:
261
+ import pdb; pdb.set_trace() # noqa: T201
262
+ assert c_mapping.size(0) == M, "c_mapping must have the same number of rows as x"
263
+
264
+ # Less than 64KB per feature: enqueue fused kernel
265
+ MAX_FUSED_SIZE = 65536 // x.element_size()
266
+ BLOCK_SIZE = min(MAX_FUSED_SIZE, triton.next_power_of_2(N))
267
+ if N > BLOCK_SIZE:
268
+ raise RuntimeError("range_mod_triton doesn't support feature dim >= 64KB.")
269
+
270
+ MAP = c_mapping
271
+ y = torch.empty_like(x)
272
+
273
+ range_mod_kernel_fwd[(M,)](
274
+ x,
275
+ MAP,
276
+ gatings,
277
+ y,
278
+ M,
279
+ N,
280
+ x.stride(0),
281
+ x.stride(1),
282
+ gatings.stride(0),
283
+ gatings.stride(1),
284
+ y.stride(0),
285
+ y.stride(1),
286
+ BLOCK_SIZE=BLOCK_SIZE,
287
+ )
288
+ y = y.reshape(b, s, h).transpose(0, 1)
289
+
290
+ return y
291
+
292
+
293
+ def bias_modulate_add(
294
+ x: torch.Tensor, residual: torch.Tensor, condition_map: torch.Tensor, gate: torch.Tensor, post_norm: torch.nn.Module
295
+ ):
296
+ assert gate.shape[-1] == x.shape[-1]
297
+
298
+ original_dtype = x.dtype
299
+ x = x.float()
300
+ residual = residual.float()
301
+ gate = gate.float()
302
+
303
+ try:
304
+ x = range_mod_triton(x, condition_map, gate)
305
+ except RuntimeError as e:
306
+ print(f"RuntimeError in range_mod_triton: {e}")
307
+ import pdb;pdb.set_trace()
308
+
309
+ x = post_norm(x)
310
+ x = x + residual
311
+ x = x.to(original_dtype)
312
+
313
+ return x
314
+
315
+
316
+ ##########################################################
317
+ # FusedLayerNorm
318
+ ##########################################################
319
+ def make_viewless_tensor(inp, requires_grad):
320
+ # return tensor as-is, if not a 'view'
321
+ if inp._base is None:
322
+ return inp
323
+
324
+ out = torch.empty((1,), dtype=inp.dtype, device=inp.device, requires_grad=requires_grad)
325
+ out.data = inp.data
326
+ return out
327
+
328
+
329
+ class FusedLayerNorm(torch.nn.Module):
330
+
331
+ """
332
+ Layer Norm, fused into a single CUDA kernel.
333
+ Borrow from: https://github.com/NVIDIA/Megatron-LM/blob/6501752396e9cc360ce894cda4b2217a58c1c09d/megatron/core/fusions/fused_layer_norm.py#L30
334
+
335
+ Args:
336
+ hidden_size (int): Transformer hidden dimension.
337
+
338
+ eps (float): Epsilon added to denominator, for numerical stability.
339
+
340
+ zero_centered_gamma (bool): Adjust LayerNorm weights such that they are
341
+ centered around zero. This improves numerical stability.
342
+
343
+ model_config (ModelConfig): Transformer config. Include to match custom
344
+ layer norm interfaces.
345
+
346
+ normalization (str): Normalization type, used for Transformer Engine.
347
+ Must equal 'LayerNorm' here.
348
+ """
349
+
350
+ def __init__(self, model_config: ModelConfig, hidden_size: int):
351
+ super().__init__()
352
+
353
+ self.zero_centered_gamma = model_config.apply_layernorm_1p
354
+ if isinstance(hidden_size, numbers.Integral):
355
+ hidden_size = (hidden_size,)
356
+ self.hidden_size = torch.Size(hidden_size)
357
+ self.eps = model_config.layernorm_epsilon
358
+ self.weight = Parameter(torch.empty(*hidden_size, dtype=model_config.params_dtype))
359
+ self.bias = Parameter(torch.empty(*hidden_size, dtype=model_config.params_dtype))
360
+
361
+ def forward(self, input: Tensor) -> Tensor:
362
+ weight = self.weight + 1 if self.zero_centered_gamma else self.weight
363
+ return torch.nn.functional.layer_norm(input, self.hidden_size, weight, self.bias, self.eps)
364
+
365
+
366
+ def softcap(x: torch.Tensor, cap: int):
367
+ return (cap * torch.tanh(x.float() / cap)).to(x.dtype)
368
+
369
+
370
+ def div_clamp_to(x: torch.Tensor, scale: torch.Tensor):
371
+ fp8_min = torch.finfo(torch.float8_e4m3fn).min
372
+ fp8_max = torch.finfo(torch.float8_e4m3fn).max
373
+ prefix_shape = x.shape[:-1]
374
+ last_shape = x.shape[-1]
375
+ x = x.flatten().reshape(-1, last_shape)
376
+ # Split x into 256 MB parts to avoid big memory peak
377
+ part_size = 256 * 1024 * 1024 // last_shape
378
+ part_num = (x.shape[0] + part_size - 1) // part_size
379
+ return (
380
+ torch.cat(
381
+ [
382
+ torch.clamp(x[i * part_size : (i + 1) * part_size].float() / scale.float(), fp8_min, fp8_max).bfloat16()
383
+ for i in range(part_num)
384
+ ],
385
+ dim=0,
386
+ )
387
+ .to(torch.float8_e4m3fn)
388
+ .reshape(*prefix_shape, last_shape)
389
+ .contiguous()
390
+ )
391
+
392
+
393
+ ##########################################################
394
+ # CustomLayerNormLinear
395
+ ##########################################################
396
+ class CustomLayerNormLinear(torch.nn.Module):
397
+ def __init__(
398
+ self,
399
+ input_size: int,
400
+ output_size_q: int,
401
+ output_size_kv: int,
402
+ layer_number: int,
403
+ model_config: ModelConfig,
404
+ engine_config: EngineConfig,
405
+ ):
406
+ super().__init__()
407
+ self.layer_norm = torch.nn.LayerNorm(input_size, eps=model_config.layernorm_epsilon, dtype=model_config.params_dtype)
408
+
409
+ self.layer_number = layer_number
410
+ layers = {"q": output_size_q, "qx": output_size_q, "k": output_size_kv, "v": output_size_kv}
411
+
412
+ for name, output_size in layers.items():
413
+ if not engine_config.fp8_quant or self.layer_number == 0 or self.layer_number == model_config.num_layers - 1:
414
+ setattr(self, name, torch.nn.Linear(input_size, output_size, bias=False, dtype=model_config.params_dtype))
415
+ else:
416
+ setattr(self, name, PerTensorQuantizedFp8Linear(input_size, output_size))
417
+
418
+ def forward_ln(self, hidden_states):
419
+ return self.layer_norm(hidden_states)
420
+
421
+ def forward_q(self, hidden_states):
422
+ return self.q(hidden_states)
423
+
424
+ def forward_qx(self, hidden_states):
425
+ return self.qx(hidden_states)
426
+
427
+ def forward_k(self, hidden_states):
428
+ return self.k(hidden_states)
429
+
430
+ def forward_v(self, hidden_states):
431
+ return self.v(hidden_states)
432
+
433
+
434
+ ##########################################################
435
+ # PerTensorQuantizedFp8Linear
436
+ ##########################################################
437
+ class PerTensorQuantizedFp8Linear(torch.nn.Module):
438
+ # The bias and device parameter is not used; it is included for compatibility with Linear's parameters.
439
+ def __init__(self, in_features: int, out_features: int, bias=False, dtype=torch.bfloat16, device=None) -> None:
440
+ super().__init__()
441
+
442
+ self.in_features = in_features
443
+ self.out_features = out_features
444
+ self.finfo = torch.finfo(torch.float8_e4m3fn)
445
+ self.output_dtype = dtype
446
+
447
+ self.weight = Parameter(torch.empty((1, out_features, in_features), dtype=torch.float8_e4m3fn))
448
+ self.weight_scale = Parameter(torch.empty(1, dtype=torch.float32))
449
+ self.input_scale = Parameter(torch.empty(in_features, dtype=torch.float32))
450
+
451
+ def forward(self, input: torch.Tensor):
452
+ input = div_clamp_to(input, self.input_scale)
453
+
454
+ prefix_shape = input.shape[:-1]
455
+ # column major weight
456
+ return bmm_fp8(
457
+ input.reshape(1, -1, self.in_features),
458
+ self.weight.transpose(-2, -1),
459
+ self.input_scale,
460
+ self.weight_scale,
461
+ dtype=self.output_dtype,
462
+ ).reshape(prefix_shape + (self.out_features,))
463
+
464
+
465
+ ##########################################################
466
+ # PerChannelQuantizedFp8Linear
467
+ ##########################################################
468
+ class PerChannelQuantizedFp8Linear(torch.nn.Module):
469
+ # The bias and device parameter is not used; it is included for compatibility with Linear's parameters.
470
+ def __init__(self, in_features: int, out_features: int, bias=False, dtype=torch.bfloat16, device=None) -> None:
471
+ super().__init__()
472
+
473
+ self.in_features = in_features
474
+ self.out_features = out_features
475
+ self.output_dtype = dtype
476
+ self.finfo = torch.finfo(torch.float8_e4m3fn)
477
+
478
+ self.weight = Parameter(torch.empty((1, out_features, in_features), dtype=torch.float8_e4m3fn))
479
+ self.weight_scale = Parameter(torch.empty(1, dtype=torch.float32))
480
+ self.input_scale = Parameter(torch.empty(1, dtype=torch.float32))
481
+ self.smooth_scale = Parameter(torch.empty(1, in_features, dtype=torch.float32))
482
+
483
+ def forward(self, x):
484
+ x = div_clamp_to(x, self.smooth_scale.to(torch.float32))
485
+
486
+ prefix_shape = x.shape[:-1]
487
+ return bmm_fp8(
488
+ x.reshape(1, -1, self.in_features),
489
+ self.weight.transpose(-2, -1),
490
+ self.input_scale,
491
+ self.weight_scale,
492
+ dtype=self.output_dtype,
493
+ ).reshape(prefix_shape + (self.out_features,))
494
+
495
+
496
+ ##########################################################
497
+ # CustomMLP
498
+ ##########################################################
499
+ class CustomMLP(torch.nn.Module):
500
+ """
501
+ CustomMLP will take the input with h hidden state, project it to 4*h
502
+ hidden dimension, perform nonlinear transformation, and project the
503
+ state back into h hidden dimension.
504
+
505
+
506
+ Returns an output and a bias to be added to the output.
507
+
508
+ We use the following notation:
509
+ h: hidden size
510
+ p: number of tensor model parallel partitions
511
+ b: batch size
512
+ s: sequence length
513
+ """
514
+
515
+ def __init__(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int, input_size: int = None):
516
+ super().__init__()
517
+
518
+ self.model_config: ModelConfig = model_config
519
+ self.engine_config: EngineConfig = engine_config
520
+ self.layer_number = layer_number
521
+
522
+ self.input_size = input_size if input_size != None else self.model_config.hidden_size
523
+ self.layer_norm = torch.nn.LayerNorm(
524
+ self.input_size, eps=self.model_config.layernorm_epsilon, dtype=self.model_config.params_dtype
525
+ )
526
+
527
+ submodules_linear_fc1 = torch.nn.Linear
528
+ if self.engine_config.fp8_quant and self.layer_number != 0 and self.layer_number != model_config.num_layers - 1:
529
+ submodules_linear_fc1 = PerTensorQuantizedFp8Linear
530
+
531
+ if self.model_config.gated_linear_unit:
532
+ self.linear_fc1 = submodules_linear_fc1(
533
+ self.input_size, 2 * self.model_config.ffn_hidden_size, bias=False, dtype=self.model_config.params_dtype
534
+ )
535
+ else:
536
+ self.linear_fc1 = submodules_linear_fc1(
537
+ self.input_size, self.model_config.ffn_hidden_size, bias=False, dtype=self.model_config.params_dtype
538
+ )
539
+
540
+ submodules_linear_fc2 = torch.nn.Linear
541
+ if engine_config.fp8_quant and self.layer_number != 0 and self.layer_number != model_config.num_layers - 1:
542
+ submodules_linear_fc2 = PerChannelQuantizedFp8Linear
543
+
544
+ self.linear_fc2 = submodules_linear_fc2(
545
+ self.model_config.ffn_hidden_size, self.model_config.hidden_size, bias=False, dtype=self.model_config.params_dtype
546
+ )
547
+
548
+ def forward(self, hidden_states):
549
+ hidden_states = self.layer_norm(hidden_states)
550
+ hidden_states = self.linear_fc1(hidden_states)
551
+ if self.model_config.gated_linear_unit:
552
+ hidden_states = flashinfer.activation.silu_and_mul(hidden_states)
553
+ else:
554
+ hidden_states = torch.nn.functional.gelu(hidden_states)
555
+ hidden_states = self.linear_fc2(hidden_states)
556
+
557
+ return hidden_states
558
+
559
+
560
+ ##########################################################
561
+ # LearnableRotaryEmbeddingCat
562
+ ##########################################################
563
+ def ndgrid(*tensors) -> Tuple[torch.Tensor, ...]:
564
+ """generate N-D grid in dimension order.
565
+
566
+ The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.
567
+
568
+ That is, the statement
569
+ [X1,X2,X3] = ndgrid(x1,x2,x3)
570
+
571
+ produces the same result as
572
+
573
+ [X2,X1,X3] = meshgrid(x2,x1,x3)
574
+
575
+ This naming is based on MATLAB, the purpose is to avoid confusion due to torch's change to make
576
+ torch.meshgrid behaviour move from matching ndgrid ('ij') indexing to numpy meshgrid defaults of ('xy').
577
+
578
+ """
579
+ try:
580
+ return torch.meshgrid(*tensors, indexing="ij")
581
+ except TypeError:
582
+ # old PyTorch < 1.10 will follow this path as it does not have indexing arg,
583
+ # the old behaviour of meshgrid was 'ij'
584
+ return torch.meshgrid(*tensors)
585
+
586
+
587
+ def pixel_freq_bands(
588
+ num_bands: int, max_freq: float = 224.0, linear_bands: bool = True, device: Optional[torch.device] = None
589
+ ):
590
+ if linear_bands:
591
+ bands = torch.linspace(1.0, max_freq / 2, num_bands, dtype=torch.float32, device=device)
592
+ else:
593
+ bands = 2 ** torch.linspace(0, math.log(max_freq, 2) - 1, num_bands, dtype=torch.float32, device=device)
594
+ return bands * torch.pi
595
+
596
+
597
+ def freq_bands(
598
+ num_bands: int, temperature: float = 10000.0, step: int = 2, device: Optional[torch.device] = None
599
+ ) -> torch.Tensor:
600
+ exp = torch.arange(0, num_bands, step, dtype=torch.int64, device=device).to(torch.float32) / num_bands
601
+ bands = 1.0 / (temperature**exp)
602
+ return bands
603
+
604
+
605
+ def build_fourier_pos_embed(
606
+ feat_shape: List[int],
607
+ bands: Optional[torch.Tensor] = None,
608
+ num_bands: int = 64,
609
+ max_res: int = 224,
610
+ temperature: float = 10000.0,
611
+ linear_bands: bool = False,
612
+ include_grid: bool = False,
613
+ in_pixels: bool = True,
614
+ ref_feat_shape: Optional[List[int]] = None,
615
+ dtype: torch.dtype = torch.float32,
616
+ device: Optional[torch.device] = None,
617
+ ) -> List[torch.Tensor]:
618
+ """
619
+
620
+ Args:
621
+ feat_shape: Feature shape for embedding.
622
+ bands: Pre-calculated frequency bands.
623
+ num_bands: Number of frequency bands (determines output dim).
624
+ max_res: Maximum resolution for pixel based freq.
625
+ temperature: Temperature for non-pixel freq.
626
+ linear_bands: Linear band spacing for pixel based freq.
627
+ include_grid: Include the spatial grid in output.
628
+ in_pixels: Output in pixel freq.
629
+ ref_feat_shape: Reference feature shape for resize / fine-tune.
630
+ dtype: Output dtype.
631
+ device: Output device.
632
+
633
+ Returns:
634
+
635
+ """
636
+ if bands is None:
637
+ if in_pixels:
638
+ bands = pixel_freq_bands(num_bands, float(max_res), linear_bands=linear_bands, device=device)
639
+ else:
640
+ bands = freq_bands(num_bands, temperature=temperature, step=1, device=device)
641
+ else:
642
+ if device is None:
643
+ device = bands.device
644
+ if dtype is None:
645
+ dtype = bands.dtype
646
+
647
+ if in_pixels:
648
+ t = [torch.linspace(-1.0, 1.0, steps=s, device=device, dtype=torch.float32) for s in feat_shape]
649
+ else:
650
+ t = [torch.arange(s, device=device, dtype=torch.int64).to(torch.float32) for s in feat_shape]
651
+ # align spatial center (H/2,W/2) to (0,0)
652
+ t[1] = t[1] - (feat_shape[1] - 1) / 2
653
+ t[2] = t[2] - (feat_shape[2] - 1) / 2
654
+ if ref_feat_shape is not None:
655
+ # eva's scheme for resizing rope embeddings (ref shape = pretrain)
656
+ # aligning to the endpoint e.g [0,1,2] -> [0, 0.4, 0.8, 1.2, 1.6, 2]
657
+ t_rescaled = []
658
+ for x, f, r in zip(t, feat_shape, ref_feat_shape):
659
+ # deal with image input
660
+ if f == 1:
661
+ assert r == 1, "ref_feat_shape must be 1 when feat_shape is 1"
662
+ t_rescaled.append(x)
663
+ else:
664
+ t_rescaled.append(x / (f - 1) * (r - 1))
665
+ t = t_rescaled
666
+
667
+ grid = torch.stack(ndgrid(t), dim=-1)
668
+ grid = grid.unsqueeze(-1)
669
+ pos = grid * bands
670
+
671
+ pos_sin, pos_cos = pos.sin().to(dtype=dtype), pos.cos().to(dtype)
672
+ out = [grid, pos_sin, pos_cos] if include_grid else [pos_sin, pos_cos]
673
+ return out
674
+
675
+
676
+ def build_rotary_pos_embed(
677
+ feat_shape: List[int],
678
+ bands: Optional[torch.Tensor] = None,
679
+ dim: int = 64,
680
+ max_res: int = 224,
681
+ temperature: float = 10000.0,
682
+ linear_bands: bool = False,
683
+ in_pixels: bool = True,
684
+ ref_feat_shape: Optional[List[int]] = None,
685
+ dtype: torch.dtype = torch.float32,
686
+ device: Optional[torch.device] = None,
687
+ ):
688
+ """
689
+
690
+ Args:
691
+ feat_shape: Spatial shape of the target tensor for embedding.
692
+ bands: Optional pre-generated frequency bands
693
+ dim: Output dimension of embedding tensor.
694
+ max_res: Maximum resolution for pixel mode.
695
+ temperature: Temperature (inv freq) for non-pixel mode
696
+ linear_bands: Linearly (instead of log) spaced bands for pixel mode
697
+ in_pixels: Pixel vs language (inv freq) mode.
698
+ dtype: Output dtype.
699
+ device: Output device.
700
+
701
+ Returns:
702
+
703
+ """
704
+ sin_emb, cos_emb = build_fourier_pos_embed(
705
+ feat_shape,
706
+ bands=bands,
707
+ num_bands=dim // 8,
708
+ max_res=max_res,
709
+ temperature=temperature,
710
+ linear_bands=linear_bands,
711
+ in_pixels=in_pixels,
712
+ ref_feat_shape=ref_feat_shape,
713
+ device=device,
714
+ dtype=dtype,
715
+ )
716
+ num_spatial_dim = 1
717
+ # this would be much nicer as a .numel() call to torch.Size(), but torchscript sucks
718
+ for x in feat_shape:
719
+ num_spatial_dim *= x
720
+
721
+ sin_emb = sin_emb.reshape(num_spatial_dim, -1)
722
+ cos_emb = cos_emb.reshape(num_spatial_dim, -1)
723
+ return sin_emb, cos_emb
724
+
725
+
726
+ class LearnableRotaryEmbeddingCat(nn.Module):
727
+ """Rotary position embedding w/ concatenatd sin & cos
728
+
729
+ The following impl/resources were referenced for this impl:
730
+ * https://github.com/lucidrains/vit-pytorch/blob/6f3a5fcf0bca1c5ec33a35ef48d97213709df4ba/vit_pytorch/rvt.py
731
+ * https://blog.eleuther.ai/rotary-embeddings/
732
+ """
733
+
734
+ def __init__(
735
+ self,
736
+ dim,
737
+ max_res=224,
738
+ temperature=10000,
739
+ in_pixels=True,
740
+ linear_bands: bool = False,
741
+ feat_shape: Optional[List[int]] = None,
742
+ ref_feat_shape: Optional[List[int]] = None,
743
+ ):
744
+ super().__init__()
745
+ self.dim = dim
746
+ self.max_res = max_res
747
+ self.temperature = temperature
748
+ self.in_pixels = in_pixels
749
+ self.linear_bands = linear_bands
750
+ self.feat_shape = feat_shape
751
+ self.ref_feat_shape = ref_feat_shape
752
+ self.bands = nn.Parameter(self.get_default_bands())
753
+
754
+ def get_default_bands(self):
755
+ if self.in_pixels:
756
+ bands = pixel_freq_bands(
757
+ self.dim // 8, float(self.max_res), linear_bands=self.linear_bands, devicse=torch.cuda.current_device()
758
+ )
759
+ else:
760
+ bands = freq_bands(self.dim // 8, temperature=self.temperature, step=1, device=torch.cuda.current_device())
761
+ return bands
762
+
763
+ def get_embed(self, shape: Optional[List[int]], ref_feat_shape: Optional[List[int]] = None):
764
+ # rebuild bands and embeddings every call, use if target shape changes
765
+ embeds = build_rotary_pos_embed(
766
+ feat_shape=shape,
767
+ bands=self.bands, # use learned bands
768
+ dim=self.dim,
769
+ max_res=self.max_res,
770
+ linear_bands=self.linear_bands,
771
+ in_pixels=self.in_pixels,
772
+ ref_feat_shape=ref_feat_shape if ref_feat_shape else self.ref_feat_shape,
773
+ temperature=self.temperature,
774
+ device=torch.cuda.current_device(),
775
+ )
776
+ return torch.cat(embeds, -1)
777
+
778
+
779
+ ##########################################################
780
+ # Attention
781
+ ##########################################################
782
+ class Attention(torch.nn.Module):
783
+ """
784
+ Attention layer abstract class.
785
+ """
786
+
787
+ def __init__(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int):
788
+ super().__init__()
789
+
790
+ self.model_config: ModelConfig = model_config
791
+ self.engine_config: EngineConfig = engine_config
792
+ self.layer_number = layer_number
793
+
794
+ self.hidden_size_per_attention_head = self.model_config.kv_channels
795
+ # num_query_groups and num_attention_heads are different for GQA
796
+ self.query_projection_size = self.model_config.kv_channels * self.model_config.num_attention_heads
797
+ self.kv_projection_size = self.model_config.kv_channels * self.model_config.num_query_groups
798
+
799
+ # Per attention head and per partition values.
800
+ world_size = parallel_state.get_tp_world_size(with_context_parallel=True)
801
+ if world_size > self.model_config.num_query_groups and world_size % self.model_config.num_query_groups == 0:
802
+ self.num_query_groups_per_partition = 1
803
+ else:
804
+ self.num_query_groups_per_partition = divide(self.model_config.num_query_groups, world_size)
805
+
806
+ def _allocate_key_and_value_memory(self, sequence_length, batch_size, dtype):
807
+ """Allocate memory to store kv cache during inference."""
808
+
809
+ if self.engine_config.kv_offload:
810
+ return torch.empty(
811
+ sequence_length * batch_size,
812
+ self.num_query_groups_per_partition,
813
+ self.hidden_size_per_attention_head * 2,
814
+ dtype=dtype,
815
+ device=torch.cpu.current_device(),
816
+ pin_memory=True,
817
+ )
818
+ else:
819
+ return torch.empty(
820
+ sequence_length * batch_size,
821
+ self.num_query_groups_per_partition,
822
+ self.hidden_size_per_attention_head * 2,
823
+ dtype=dtype,
824
+ device=torch.cuda.current_device(),
825
+ )
826
+
827
+
828
+ ##########################################################
829
+ # FullyParallelAttention
830
+ ##########################################################
831
+ def split_tensor_along_last_dim(
832
+ tensor: torch.Tensor, num_partitions: int, contiguous_split_chunks: bool = False
833
+ ) -> List[torch.Tensor]:
834
+ """Split a tensor along its last dimension.
835
+
836
+ Args:
837
+ tensor: input tensor.
838
+ num_partitions: number of partitions to split the tensor
839
+ contiguous_split_chunks: If True, make each chunk contiguous
840
+ in memory.
841
+
842
+ Returns:
843
+ A list of Tensors
844
+ """
845
+ # Get the size and dimension.
846
+ last_dim = tensor.dim() - 1
847
+ last_dim_size = divide(tensor.size()[last_dim], num_partitions)
848
+ # Split.
849
+ tensor_list = torch.split(tensor, last_dim_size, dim=last_dim)
850
+ # Note: torch.split does not create contiguous tensors by default.
851
+ if contiguous_split_chunks:
852
+ return tuple(chunk.contiguous() for chunk in tensor_list)
853
+
854
+ return tensor_list
855
+
856
+
857
+ class FullyParallelAttention(Attention):
858
+ def __init__(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int):
859
+ super().__init__(model_config=model_config, engine_config=engine_config, layer_number=layer_number)
860
+
861
+ # output 2x query, one for self-attn, one for cross-attn with condition
862
+ self.linear_qkv = CustomLayerNormLinear(
863
+ input_size=self.model_config.hidden_size,
864
+ output_size_q=self.query_projection_size,
865
+ output_size_kv=self.kv_projection_size,
866
+ layer_number=self.layer_number,
867
+ model_config=self.model_config,
868
+ engine_config=self.engine_config,
869
+ )
870
+
871
+ # kv from condition, e.g., caption
872
+ self.linear_kv_xattn = torch.nn.Linear(
873
+ int(self.model_config.hidden_size * self.model_config.xattn_cond_hidden_ratio), # 6144
874
+ 2 * self.kv_projection_size, # 2048
875
+ dtype=self.model_config.params_dtype,
876
+ bias=False,
877
+ )
878
+
879
+ # Output.
880
+ self.adapt_linear_quant = (
881
+ self.engine_config.fp8_quant and self.layer_number != 0 and self.layer_number != model_config.num_layers - 1
882
+ )
883
+ submodules_linear_proj = PerChannelQuantizedFp8Linear if self.adapt_linear_quant else torch.nn.Linear
884
+ self.linear_proj = submodules_linear_proj(
885
+ 2 * self.query_projection_size, self.model_config.hidden_size, dtype=self.model_config.params_dtype, bias=False
886
+ )
887
+
888
+ self.q_layernorm = FusedLayerNorm(model_config=self.model_config, hidden_size=self.hidden_size_per_attention_head)
889
+ self.q_layernorm_xattn = FusedLayerNorm(
890
+ model_config=self.model_config, hidden_size=self.hidden_size_per_attention_head
891
+ )
892
+ self.k_layernorm = FusedLayerNorm(model_config=self.model_config, hidden_size=self.hidden_size_per_attention_head)
893
+ self.k_layernorm_xattn = FusedLayerNorm(
894
+ model_config=self.model_config, hidden_size=self.hidden_size_per_attention_head
895
+ )
896
+
897
+ self.attn_weights_history = []
898
+
899
+ def _full_adjust_key_and_value(
900
+ self, inference_params: InferenceParams, key_and_value: torch.Tensor, meta_args: ModelMetaArgs
901
+ ):
902
+ """
903
+ Saves the generated key and value tensors to the end of the buffers in inference_params.
904
+ Returns the full size keys and values from the provided inference_params
905
+
906
+ Returns a tuple: (key, value)
907
+ """
908
+ # =================================================
909
+ # Pre-allocate memory for key-values for inference.
910
+ # =================================================
911
+ inf_max_seq_length = inference_params.max_sequence_length
912
+ inf_max_batch_size = inference_params.max_batch_size
913
+
914
+ if self.layer_number not in inference_params.key_value_memory_dict:
915
+ inference_key_and_value_memory = self._allocate_key_and_value_memory(
916
+ inf_max_seq_length, inf_max_batch_size, key_and_value.dtype
917
+ )
918
+ inference_params.key_value_memory_dict[self.layer_number] = inference_key_and_value_memory
919
+ else:
920
+ # Get the pre-allocated buffers for this layer
921
+ inference_key_and_value_memory = inference_params.key_value_memory_dict[self.layer_number]
922
+
923
+ sequence_start = meta_args.slice_point * meta_args.clip_token_nums * inf_max_batch_size
924
+ # Only take clean kv cache here, but for partial reuse, the kv of the currently denoising chunk is not passed to forward, so this part of kv is also needed
925
+ get_key_and_value = inference_key_and_value_memory[:sequence_start, ...].cuda()
926
+
927
+ # Copy key and values.
928
+ if inference_params.update_kv_cache:
929
+ key_and_value_total = key_and_value
930
+
931
+ clip_size = (
932
+ key_and_value_total.size(0) - meta_args.clip_token_nums * inf_max_batch_size
933
+ if meta_args.distill_nearly_clean_chunk
934
+ else key_and_value_total.size(0)
935
+ )
936
+ sequence_end = sequence_start + clip_size
937
+ assert sequence_end <= inference_key_and_value_memory.size(0)
938
+ # update kv cache
939
+ inference_key_and_value_memory[sequence_start:sequence_end, ...] = key_and_value_total[:clip_size]
940
+
941
+ return torch.cat([get_key_and_value, key_and_value], dim=0)
942
+
943
+ def _custom_adjust_key_and_value(
944
+ self, inference_params: InferenceParams, key_and_value: torch.Tensor, meta_args: ModelMetaArgs
945
+ ):
946
+ """
947
+ Saves the generated key and value tensors to the end of the buffers in inference_params.
948
+ Returns the full size keys and values from the provided inference_params
949
+
950
+ Returns a tuple: (key, value)
951
+ """
952
+ # =================================================
953
+ # Pre-allocate memory for key-values for inference.
954
+ # =================================================
955
+
956
+ # 1. The principle is to update the kv cache for whichever chunk is passed in
957
+ inf_max_seq_length = inference_params.max_sequence_length
958
+ inf_max_batch_size = inference_params.max_batch_size
959
+
960
+ if self.layer_number not in inference_params.key_value_memory_dict:
961
+ inference_key_and_value_memory = self._allocate_key_and_value_memory(
962
+ inf_max_seq_length, inf_max_batch_size, key_and_value.dtype
963
+ )
964
+ inference_params.key_value_memory_dict[self.layer_number] = inference_key_and_value_memory
965
+ else:
966
+ # Get the pre-allocated buffers for this layer
967
+ inference_key_and_value_memory = inference_params.key_value_memory_dict[self.layer_number]
968
+
969
+ chunk_start = meta_args.start_chunk_id
970
+ chunk_end = meta_args.end_chunk_id
971
+ if meta_args.distill_nearly_clean_chunk:
972
+ chunk_end -= 1
973
+
974
+ sequence_start = chunk_start * meta_args.clip_token_nums * inf_max_batch_size
975
+ sequence_end = chunk_end * meta_args.clip_token_nums * inf_max_batch_size
976
+ # 1. Update values in inference_key_and_value_memory
977
+ clip_size = (
978
+ key_and_value.size(0) - meta_args.clip_token_nums * inf_max_batch_size
979
+ if meta_args.distill_nearly_clean_chunk
980
+ else key_and_value.size(0)
981
+ )
982
+ try:
983
+ inference_key_and_value_memory[sequence_start:sequence_end, ...] = key_and_value[:clip_size]
984
+ except Exception as e:
985
+ print(f"Error updating inference key and value memory: {e}")
986
+ import pdb; pdb.set_trace()
987
+
988
+ # 2. Concatenate kv values from previous chunks
989
+ key_and_value_total = key_and_value
990
+ past_chunk_kv = inference_key_and_value_memory[:sequence_start, ...].cuda()
991
+ key_and_value_total = torch.cat([past_chunk_kv, key_and_value], dim=0)
992
+
993
+ return key_and_value_total
994
+
995
+ def _compresskv_adjust_key_and_value(
996
+ self, inference_params: InferenceParams, key_and_value: torch.Tensor, meta_args: ModelMetaArgs
997
+ ):
998
+ inf_max_seq_length = inference_params.max_sequence_length
999
+ inf_max_batch_size = inference_params.max_batch_size
1000
+
1001
+ if self.layer_number not in inference_params.key_value_memory_dict:
1002
+ inference_key_and_value_memory = self._allocate_key_and_value_memory(
1003
+ meta_args.total_cache_len, inf_max_batch_size, key_and_value.dtype
1004
+ )
1005
+ inference_params.key_value_memory_dict[self.layer_number] = inference_key_and_value_memory
1006
+ else:
1007
+ inference_key_and_value_memory = inference_params.key_value_memory_dict[self.layer_number]
1008
+
1009
+ tracker = inference_params.kv_chunk_tracker
1010
+
1011
+ # Calculate the chunk range being processed
1012
+ chunk_start = meta_args.start_chunk_id
1013
+ chunk_end = meta_args.end_chunk_id
1014
+ if meta_args.distill_nearly_clean_chunk:
1015
+ chunk_end -= 1
1016
+
1017
+ current_chunk_ids = list(range(chunk_start, chunk_end)) # e.g., [3, 4, 5]
1018
+
1019
+ if len(current_chunk_ids) > 0:
1020
+ # Allocate kv cache ranges, skip if already allocated
1021
+ tracker.register_chunks(current_chunk_ids)
1022
+
1023
+ # === Split key_and_value by chunk ===
1024
+ tokens_per_chunk = meta_args.clip_token_nums
1025
+ # Split tensor: one segment per chunk
1026
+ chunk_tensors = []
1027
+ start_idx = 0
1028
+ for i, cid in enumerate(current_chunk_ids):
1029
+ chunk_len = tokens_per_chunk
1030
+ end_idx = start_idx + chunk_len
1031
+ chunk_tensors.append(key_and_value[start_idx:end_idx, ...])
1032
+ start_idx = end_idx
1033
+
1034
+ # === Write each chunk to its allocated position ===
1035
+ for cid, chunk_kv in zip(current_chunk_ids, chunk_tensors):
1036
+ s, e = tracker.get_range(cid)
1037
+ target_length = e - s
1038
+ assert chunk_kv.size(0) == target_length, f"Chunk size mismatch: chunk {cid}, expected {target_length}, got {chunk_kv.size(0)}"
1039
+
1040
+ inference_key_and_value_memory[s : s + chunk_kv.size(0), ...] = chunk_kv
1041
+
1042
+
1043
+ # === Concatenate past KV ===
1044
+ past_ranges = tracker.get_all_ranges_previous(current_chunk_ids)
1045
+ past_chunks = []
1046
+ for s, e in past_ranges:
1047
+ past_chunks.append(inference_key_and_value_memory[s:e, ...].cuda())
1048
+
1049
+ if past_chunks:
1050
+ past_kv = torch.cat(past_chunks, dim=0)
1051
+ key_and_value_total = torch.cat([past_kv, key_and_value], dim=0)
1052
+ else:
1053
+ key_and_value_total = key_and_value.cuda()
1054
+
1055
+ return key_and_value_total
1056
+
1057
+ def adjust_key_and_value_for_inference(
1058
+ self, key_and_value: torch.Tensor, inference_params: InferenceParams, meta_args: ModelMetaArgs
1059
+ ):
1060
+ if inference_params is None:
1061
+ return torch.chunk(key_and_value, 2, dim=-1)
1062
+
1063
+ # Only update kvcache when necessary, include 3 conditions:
1064
+ # 1. extract prefix video clean feature
1065
+ # 2. the first chunk of current kv is clean, we need to save their feature
1066
+ # 3. previous chunk is clean and we need to save/load their feature
1067
+
1068
+ # Priority: compress_kv > save_kvcache_every_forward > full_adjust
1069
+ if meta_args.compress_kv:
1070
+ key_and_value = self._compresskv_adjust_key_and_value(inference_params, key_and_value, meta_args)
1071
+ elif meta_args.save_kvcache_every_forward:
1072
+ key_and_value = self._custom_adjust_key_and_value(inference_params, key_and_value, meta_args)
1073
+ elif (meta_args.extract_prefix_video_feature or meta_args.fwd_extra_1st_chunk or meta_args.slice_point > 0) and \
1074
+ not meta_args.save_kvcache_every_forward:
1075
+ key_and_value = self._full_adjust_key_and_value(inference_params, key_and_value, meta_args)
1076
+ key, value = torch.chunk(key_and_value, 2, dim=-1)
1077
+ return key.contiguous(), value.contiguous()
1078
+
1079
+ # =====================
1080
+ # Get Query for core attn
1081
+ # [sq, b, (hn hd)] -> [(sq b), hn, hd]
1082
+ # =====================
1083
+
1084
+ def get_q(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor):
1085
+ query = self.linear_qkv.forward_q(mixed_qqkv)
1086
+ query = query.reshape(query.size(0), query.size(1), -1, self.hidden_size_per_attention_head)
1087
+ assert self.q_layernorm is not None
1088
+ original_dtype = query.dtype
1089
+ query = query.float()
1090
+ query = self.q_layernorm(query)
1091
+ query = query.transpose(0, 1).contiguous()
1092
+ query = flash_apply_rotary_emb(query, cos_emb, sin_emb)
1093
+ query = query.to(original_dtype)
1094
+ return rearrange(query, "b sq hn hd -> (sq b) hn hd").contiguous()
1095
+
1096
+ # =====================
1097
+ # Get Key for core attn
1098
+ # [sq, b, (hn hd)] -> [(sq b), hn, hd]
1099
+ # =====================
1100
+
1101
+ def get_k(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor):
1102
+ key = self.linear_qkv.forward_k(mixed_qqkv)
1103
+ key = key.reshape(key.size(0), key.size(1), -1, self.hidden_size_per_attention_head)
1104
+ assert self.k_layernorm is not None
1105
+ original_dtype = key.dtype
1106
+ key = key.float()
1107
+ key = self.k_layernorm(key)
1108
+ key = key.transpose(0, 1).contiguous()
1109
+ key = flash_apply_rotary_emb(key, cos_emb, sin_emb)
1110
+ key = key.to(original_dtype)
1111
+ return rearrange(key, "b sq hn hd -> (sq b) hn hd").contiguous()
1112
+
1113
+ # =====================
1114
+ # Get Value for core attn
1115
+ # [sq, b, (hn hd)] -> [(sq b), hn, hd]
1116
+ # =====================
1117
+
1118
+ def get_v(self, mixed_qqkv: torch.Tensor):
1119
+ value = self.linear_qkv.forward_v(mixed_qqkv)
1120
+ return rearrange(value, "sq b (hn hd) -> (sq b) hn hd", hd=self.hidden_size_per_attention_head).contiguous()
1121
+
1122
+ def get_kv(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor):
1123
+ # Get KV together for better performance when encoutering cpu-bound, mainly used by cuda graph
1124
+ key = self.get_k(mixed_qqkv, cos_emb, sin_emb)
1125
+ value = self.get_v(mixed_qqkv)
1126
+ # [(sq b), hn, hd] -> [(sq b), hn, 2 * hd]
1127
+ return torch.cat([key, value], dim=-1)
1128
+
1129
+ def get_qkv(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor):
1130
+ # Get QKV together for better performance when encoutering cpu-bound, mainly used by cuda graph
1131
+ q = self.get_q(mixed_qqkv, cos_emb, sin_emb)
1132
+ k = self.get_k(mixed_qqkv, cos_emb, sin_emb)
1133
+ v = self.get_v(mixed_qqkv)
1134
+ return q, k, v
1135
+
1136
+ def get_xqkv(self, mixed_qqkv: torch.Tensor, key_value_states: torch.Tensor):
1137
+ query_xattn = self.linear_qkv.forward_qx(mixed_qqkv)
1138
+ query_xattn = rearrange(query_xattn, "sq b (hn hd) -> (b sq) hn hd", hd=self.hidden_size_per_attention_head)
1139
+ query_xattn = self.q_layernorm_xattn(query_xattn)
1140
+
1141
+ # [y_total_token, h] --> [y_total_token, 2*hp]
1142
+ mixed_kv_xattn = torch.concat(
1143
+ [torch.matmul(key_value_states, w.t()) for w in torch.chunk(self.linear_kv_xattn.weight, 8, axis=0)], axis=1
1144
+ )
1145
+ # [y_total_token, 2*hn*hd] --> [y_total_token, hn, 2*hd]
1146
+ mixed_kv_xattn = mixed_kv_xattn.view(key_value_states.shape[0], -1, 2 * self.hidden_size_per_attention_head)
1147
+
1148
+ # [y_total_token, hn, 2*hd] --> 2 [y_total_token, hn, hd]
1149
+ (key_xattn, value_xattn) = split_tensor_along_last_dim(mixed_kv_xattn, 2)
1150
+
1151
+ key_xattn = self.k_layernorm_xattn(key_xattn)
1152
+ return query_xattn, key_xattn, value_xattn
1153
+
1154
+
1155
+ def core_attention(self, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, bs: int, meta_args: ModelMetaArgs):
1156
+
1157
+ # (sq b) hn hd -> b sq hn hd
1158
+ query = query.reshape(-1, bs, query.shape[1], query.shape[2]).transpose(0, 1).contiguous()
1159
+ # (sq b) hn hd -> b sq hn hd
1160
+ key = key.reshape(-1, bs, key.shape[1], key.shape[2]).transpose(0, 1).contiguous()
1161
+ # (sq b) hn hd -> b sq hn hd
1162
+ value = value.reshape(-1, bs, value.shape[1], value.shape[2]).transpose(0, 1).contiguous()
1163
+
1164
+ if torch.cuda.get_device_capability()[0] >= 9 and flex_attention is not None:
1165
+ core_attn_out, _ = flex_attention(
1166
+ query.flatten(0, 1),
1167
+ key.flatten(0, 1),
1168
+ value.flatten(0, 1),
1169
+ meta_args.core_attn_params.q_range,
1170
+ meta_args.core_attn_params.k_range,
1171
+ max_seqlen_q=meta_args.core_attn_params.max_seqlen_q,
1172
+ max_seqlen_k=meta_args.core_attn_params.max_seqlen_k,
1173
+ softmax_scale=None,
1174
+ deterministic=torch.are_deterministic_algorithms_enabled(),
1175
+ disable_fwd_atomic_reduction=True,
1176
+ )
1177
+ # (b sq) hn hd -> (sq b) hn hd
1178
+ core_attn_out = rearrange(core_attn_out, "(b sq) h d -> (sq b) h d", b=bs)
1179
+ else:
1180
+ # NOTE(lml): We convert multi denoising_range_num input into multi batch_size input at third time forward under 3_cfg mode, thus could not support normal multi batch_size input. We use an assert statement to ensure that it is still in this situation, thereby guaranteeing the correct use of q_range and k_range later on.
1181
+ assert not (bs > 1 and meta_args.denoising_range_num > 1)
1182
+ q_range = meta_args.core_attn_params.np_q_range
1183
+ k_range = meta_args.core_attn_params.np_k_range
1184
+ core_attn_outs = []
1185
+ q_seqlen = query.shape[1]
1186
+
1187
+ try:
1188
+ # Adapt to flowcache case where only a single chunk is passed
1189
+ if q_seqlen == meta_args.clip_token_nums:
1190
+ q = query
1191
+ i = meta_args.start_chunk_id - meta_args.slice_point
1192
+ k = key[:, k_range[i, 0] : k_range[i, 1]]
1193
+ v = value[:, k_range[i, 0] : k_range[i, 1]]
1194
+ o = flash_attn_func(q=q, k=k, v=v, deterministic=torch.are_deterministic_algorithms_enabled())
1195
+ o = rearrange(o, "b sq h d -> (sq b) h d", b=bs)
1196
+ core_attn_outs.append(o)
1197
+ # Original
1198
+ else:
1199
+ for i in range(meta_args.denoising_range_num): # chunk_end - chunk_start
1200
+ if bs == 1:
1201
+ q = query[:, q_range[i, 0] : q_range[i, 1]]
1202
+ k = key[:, k_range[i, 0] : k_range[i, 1]]
1203
+ v = value[:, k_range[i, 0] : k_range[i, 1]]
1204
+ else:
1205
+ assert i == 0
1206
+ q = query[:, q_range[0, 0] : q_range[0, 1]]
1207
+ k = key[:, k_range[0, 0] : k_range[0, 1]]
1208
+ v = value[:, k_range[0, 0] : k_range[0, 1]]
1209
+
1210
+ o = flash_attn_func(q=q, k=k, v=v, deterministic=torch.are_deterministic_algorithms_enabled())
1211
+ o = rearrange(o, "b sq h d -> (sq b) h d", b=bs)
1212
+ core_attn_outs.append(o)
1213
+ except RuntimeError as e:
1214
+ print(f"RuntimeError in core_attention: {e}")
1215
+ import pdb; pdb.set_trace()
1216
+
1217
+ core_attn_out = torch.cat(core_attn_outs, dim=0)
1218
+ return core_attn_out
1219
+
1220
+ def full_attention(self, bs: int, meta_args: ModelMetaArgs, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, i: int):
1221
+ # NOTE(lml): full_attention is used under cp_shuffle_overlap strategy. We further limit it to the case of bs=1, so that we do not need to pay attention to the arrangement of sq and bs dimensions.
1222
+ assert bs == 1
1223
+ if torch.cuda.get_device_capability()[0] >= 9 and flex_attention is not None:
1224
+ q_range = meta_args.core_attn_params.q_range[i : i + 1] - meta_args.core_attn_params.q_range[i, 0]
1225
+ k_range = meta_args.core_attn_params.k_range[i : i + 1]
1226
+ o, _ = flex_attention(
1227
+ q,
1228
+ k,
1229
+ v,
1230
+ q_ranges=q_range,
1231
+ k_ranges=k_range,
1232
+ max_seqlen_q=meta_args.core_attn_params.max_seqlen_q,
1233
+ max_seqlen_k=meta_args.core_attn_params.max_seqlen_k,
1234
+ softmax_scale=None,
1235
+ deterministic=torch.are_deterministic_algorithms_enabled(),
1236
+ disable_fwd_atomic_reduction=True,
1237
+ )
1238
+ else:
1239
+ k_range = meta_args.core_attn_params.np_k_range[i : i + 1]
1240
+ k = k[k_range[0, 0] : k_range[0, 1]]
1241
+ v = v[k_range[0, 0] : k_range[0, 1]]
1242
+ o = flash_attn_func(
1243
+ q=q.unsqueeze(0),
1244
+ k=k.unsqueeze(0),
1245
+ v=v.unsqueeze(0),
1246
+ deterministic=torch.are_deterministic_algorithms_enabled(),
1247
+ ).flatten(0, 1)
1248
+ return o
1249
+
1250
+ def cross_attention(
1251
+ self,
1252
+ mixed_qqkv: torch.Tensor,
1253
+ key_value_states: torch.Tensor,
1254
+ cross_attn_params: PackedCrossAttnParams,
1255
+ get_xqkv_func: Callable,
1256
+ ):
1257
+ # =================
1258
+ # cross-attn for aggragating caption / condition
1259
+ # =================
1260
+ query_xattn, key_xattn, value_xattn = get_xqkv_func(mixed_qqkv, key_value_states)
1261
+
1262
+ if torch.cuda.get_device_capability()[0] >= 9 and flex_attention is not None:
1263
+ xattn_out, _ = flex_attention(
1264
+ query_xattn,
1265
+ key_xattn,
1266
+ value_xattn,
1267
+ cross_attn_params.q_ranges,
1268
+ cross_attn_params.kv_ranges,
1269
+ max_seqlen_q=cross_attn_params.max_seqlen_q,
1270
+ max_seqlen_k=cross_attn_params.max_seqlen_kv,
1271
+ softmax_scale=None,
1272
+ deterministic=False,
1273
+ disable_fwd_atomic_reduction=True,
1274
+ )
1275
+ else:
1276
+ xattn_out = flash_attn_varlen_func(
1277
+ query_xattn, # [b*sq, hn, hd]
1278
+ key_xattn, # [y_total_token, hn, hd]
1279
+ value_xattn, # [y_total_token, hn, hd]
1280
+ cu_seqlens_q=cross_attn_params.cu_seqlens_q,
1281
+ cu_seqlens_k=cross_attn_params.cu_seqlens_kv,
1282
+ max_seqlen_q=cross_attn_params.max_seqlen_q,
1283
+ max_seqlen_k=cross_attn_params.max_seqlen_kv,
1284
+ deterministic=torch.are_deterministic_algorithms_enabled(),
1285
+ )
1286
+
1287
+ batch_size = mixed_qqkv.shape[1]
1288
+ xattn_out = rearrange(xattn_out, "(b sq) hn hd -> sq b (hn hd)", b=batch_size).contiguous()
1289
+ return xattn_out
1290
+
1291
+ def forward(
1292
+ self,
1293
+ hidden_states: torch.Tensor,
1294
+ key_value_states: torch.Tensor,
1295
+ inference_params: InferenceParams,
1296
+ rotary_pos_emb: torch.Tensor,
1297
+ meta_args: ModelMetaArgs,
1298
+ ):
1299
+ assert rotary_pos_emb is not None, "FullyParallelAttention needs rotary_pos_emb"
1300
+ sin_emb, cos_emb = rotary_pos_emb.tensor_split(2, -1)
1301
+ batch_size = hidden_states.shape[1]
1302
+ # All comminications operate on dimensions shaped as (cp * sq * b)
1303
+ batch_cp_split_sizes = None if meta_args.cp_split_sizes is None else [x * batch_size for x in meta_args.cp_split_sizes]
1304
+
1305
+ # Attention heads [sq, b, h] --> [sq, b, q + qx + k + v]
1306
+ mixed_qqkv = self.linear_qkv.forward_ln(hidden_states)
1307
+
1308
+ # =====================
1309
+ # Function wrapper
1310
+ # =====================
1311
+ get_kv_func = self.get_kv
1312
+ get_q_func = self.get_q
1313
+ get_qkv_func = self.get_qkv
1314
+ get_xqkv_func = self.get_xqkv
1315
+
1316
+ # =====================
1317
+ # Parallel Strategy
1318
+ # =====================
1319
+ if self.engine_config.cp_strategy == "none":
1320
+ assert self.engine_config.cp_size == 1
1321
+ key_and_value = get_kv_func(mixed_qqkv, cos_emb, sin_emb)
1322
+ query = get_q_func(mixed_qqkv, cos_emb, sin_emb)
1323
+
1324
+ key, value = self.adjust_key_and_value_for_inference(key_and_value, inference_params, meta_args)
1325
+
1326
+ # Save current query for subsequent compression
1327
+ self._last_query = query.detach().clone()
1328
+
1329
+ core_attn_out = self.core_attention(query, key, value, batch_size, meta_args)
1330
+ core_attn_out = rearrange(core_attn_out, "(sq b) hn hd -> sq b (hn hd)", b=batch_size)
1331
+ xattn_out = self.cross_attention(mixed_qqkv, key_value_states, meta_args.cross_attn_params, get_xqkv_func)
1332
+
1333
+ elif self.engine_config.cp_strategy == "cp_ulysses":
1334
+ get_kv_func = partial(get_kv_func, mixed_qqkv, cos_emb, sin_emb)
1335
+ get_q_func = partial(get_q_func, mixed_qqkv, cos_emb, sin_emb)
1336
+ get_qkv_func = partial(get_qkv_func, mixed_qqkv, cos_emb, sin_emb)
1337
+ kv_cache_func = partial(
1338
+ self.adjust_key_and_value_for_inference, inference_params=inference_params, meta_args=meta_args
1339
+ )
1340
+ if meta_args.enable_cuda_graph and meta_args.denoising_range_num <= 3:
1341
+ # Temporal solution for first chunk opt
1342
+ core_attn_out, xattn_out = UlyssesScheduler.get_attn_and_xattn_with_fused_qkv_comm(
1343
+ get_qkv_func,
1344
+ kv_cache_func,
1345
+ partial(self.core_attention, bs=batch_size, meta_args=meta_args),
1346
+ partial(self.cross_attention, mixed_qqkv, key_value_states, meta_args.cross_attn_params, get_xqkv_func),
1347
+ self.engine_config.ulysses_overlap_degree,
1348
+ batch_size,
1349
+ self.engine_config.cp_size,
1350
+ batch_cp_split_sizes,
1351
+ )
1352
+ else:
1353
+ core_attn_out, xattn_out = UlyssesScheduler.get_attn_and_xattn_with_fused_kv_comm(
1354
+ get_q_func,
1355
+ get_kv_func,
1356
+ kv_cache_func,
1357
+ partial(self.core_attention, bs=batch_size, meta_args=meta_args),
1358
+ partial(self.cross_attention, mixed_qqkv, key_value_states, meta_args.cross_attn_params, get_xqkv_func),
1359
+ self.engine_config.ulysses_overlap_degree,
1360
+ batch_size,
1361
+ self.engine_config.cp_size,
1362
+ batch_cp_split_sizes,
1363
+ )
1364
+
1365
+ elif self.engine_config.cp_strategy == "cp_shuffle_overlap":
1366
+ key_and_value = self.get_kv(mixed_qqkv, cos_emb, sin_emb)
1367
+ key_and_value, handle_kv = cso_communication(key_and_value, self.engine_config.cp_size, batch_cp_split_sizes, "kv")
1368
+
1369
+ query = get_q_func(mixed_qqkv, cos_emb, sin_emb)
1370
+ cso_helper = CSOHelper(meta_args.denoising_range_num, self.engine_config.cp_size, batch_cp_split_sizes)
1371
+ query, handle_q = cso_helper.split_query_for_overlap(query)
1372
+
1373
+ handle_kv.wait()
1374
+ # NOTE(lml): rearrange and unpad key_and_value for later attention compute under cp_shuffle_overlap strategy, and we should split sqb into sq and b when support multi batch_size input.
1375
+ key_and_value = (
1376
+ rearrange(
1377
+ key_and_value,
1378
+ "(cp dn sqb) hn nhd -> dn (cp sqb) hn nhd",
1379
+ dn=meta_args.denoising_range_num,
1380
+ cp=self.engine_config.cp_size,
1381
+ )[:, : meta_args.clip_token_nums]
1382
+ .flatten(0, 1)
1383
+ .contiguous()
1384
+ )
1385
+ key, value = self.adjust_key_and_value_for_inference(key_and_value, inference_params, meta_args)
1386
+
1387
+ handle_q.wait()
1388
+ core_attn_out, handle_attn = cso_helper.overlap(
1389
+ partial(self.full_attention, hidden_states.shape[1], meta_args), query, key, value
1390
+ )
1391
+ xattn_out = self.cross_attention(mixed_qqkv, key_value_states, meta_args.cross_attn_params, get_xqkv_func)
1392
+
1393
+ handle_attn.wait()
1394
+ core_attn_out = rearrange(
1395
+ torch.concat(core_attn_out, dim=0),
1396
+ "(dn cp sq b) hn hd -> (dn sq) b (cp hn hd)",
1397
+ cp=self.engine_config.cp_size,
1398
+ b=hidden_states.shape[1],
1399
+ dn=meta_args.denoising_range_num,
1400
+ )
1401
+ else:
1402
+ raise ValueError(f"Unsupported cp_strategy: {self.engine_config.cp_strategy}")
1403
+
1404
+ return core_attn_out, xattn_out
1405
+
1406
+
1407
+ ##########################################################
1408
+ # TransformerLayer
1409
+ ##########################################################
1410
+ class TransformerLayer(torch.nn.Module):
1411
+ """A single transformer layer.
1412
+
1413
+ Transformer layer takes input with size [s, b, h] and returns an
1414
+ output of the same size.
1415
+ """
1416
+
1417
+ def __init__(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int = 1):
1418
+ super().__init__()
1419
+ self.model_config = model_config
1420
+ self.engine_config = engine_config
1421
+ self.layer_number = layer_number + self._get_layer_offset()
1422
+ ## [Module 1: ada_modulate_layer
1423
+ self.ada_modulate_layer = AdaModulateLayer(model_config=self.model_config)
1424
+
1425
+ ## [Module 2: SelfAttention]
1426
+ self.self_attention = FullyParallelAttention(
1427
+ model_config=self.model_config, engine_config=self.engine_config, layer_number=self.layer_number
1428
+ )
1429
+
1430
+ ## [Module 3: SelfAttention PostNorm]
1431
+ self.self_attn_post_norm = FusedLayerNorm(model_config=self.model_config, hidden_size=self.model_config.hidden_size)
1432
+
1433
+ ## [Module 4: MLP block]
1434
+ self.mlp = CustomMLP(model_config=self.model_config, engine_config=self.engine_config, layer_number=self.layer_number)
1435
+
1436
+ ## [Module 5: MLP PostNorm]
1437
+ self.mlp_post_norm = FusedLayerNorm(model_config=self.model_config, hidden_size=self.model_config.hidden_size)
1438
+
1439
+ def _get_layer_offset(self):
1440
+ pipeline_rank = parallel_state.get_pp_rank()
1441
+
1442
+ num_layers_per_pipeline_rank = self.model_config.num_layers // parallel_state.get_pp_world_size()
1443
+
1444
+ # Each stage gets a contiguous set of layers.
1445
+ if parallel_state.get_pp_world_size() > 1:
1446
+ offset = pipeline_rank * num_layers_per_pipeline_rank
1447
+ else:
1448
+ offset = 0
1449
+
1450
+ return offset
1451
+
1452
+ def forward(
1453
+ self,
1454
+ hidden_states: torch.Tensor,
1455
+ condition: torch.Tensor,
1456
+ condition_map: torch.Tensor,
1457
+ y_xattn_flat: torch.Tensor,
1458
+ rotary_pos_emb: torch.Tensor,
1459
+ inference_params: InferenceParams,
1460
+ meta_args: ModelMetaArgs,
1461
+ ):
1462
+ # hidden_states: [s/cp/sp, b, h]
1463
+ residual = hidden_states
1464
+
1465
+ # Self attention.
1466
+ core_attn_out, cross_attn_out = self.self_attention(
1467
+ hidden_states,
1468
+ key_value_states=y_xattn_flat,
1469
+ inference_params=inference_params,
1470
+ rotary_pos_emb=rotary_pos_emb,
1471
+ meta_args=meta_args,
1472
+ )
1473
+ hidden_states = self.attn_post_process(core_attn_out, cross_attn_out, residual, condition, condition_map)
1474
+
1475
+ return hidden_states
1476
+
1477
+ def attn_post_process(
1478
+ self,
1479
+ core_attn_out: torch.Tensor,
1480
+ cross_attn_out: torch.Tensor,
1481
+ residual: torch.Tensor,
1482
+ condition: torch.Tensor,
1483
+ condition_map: torch.Tensor,
1484
+ ):
1485
+ hidden_states = self.attn_linear_proj(core_attn_out, cross_attn_out)
1486
+ hidden_states = self.gating_and_mlp(hidden_states, residual, condition, condition_map)
1487
+ return hidden_states
1488
+
1489
+ def attn_linear_proj(self, core_attn_out: torch.Tensor, cross_attn_out: torch.Tensor):
1490
+ # ============================================
1491
+ # attention post-process , output. [sq, b, h]
1492
+ # ============================================
1493
+
1494
+ attn_out = torch.concat([core_attn_out, cross_attn_out], dim=2)
1495
+ # NOTE: hn=8 is hardcoded to align with TP8 traning and TP1 inference
1496
+ attn_out = rearrange(attn_out, "sq b (n hn hd) -> sq b (hn n hd)", n=2, hn=8)
1497
+ if self.self_attention.adapt_linear_quant:
1498
+ attn_out = self.self_attention.linear_proj(attn_out)
1499
+ else:
1500
+ # Use high-precision for non-quantized linear projection
1501
+ with torch.autocast(device_type="cuda", dtype=torch.float32):
1502
+ attn_out = self.self_attention.linear_proj(attn_out)
1503
+
1504
+ return attn_out
1505
+
1506
+ def gating_and_mlp(
1507
+ self, hidden_states: torch.Tensor, residual: torch.Tensor, condition: torch.Tensor, condition_map: torch.Tensor
1508
+ ):
1509
+ gate_output = self.ada_modulate_layer(condition)
1510
+ softcap_gate_cap = 1.0
1511
+ gate_output = softcap(gate_output, softcap_gate_cap)
1512
+ gate_msa, gate_mlp = gate_output.chunk(2, dim=-1)
1513
+
1514
+ # Residual connection for self-attention.
1515
+ hidden_states = bias_modulate_add(hidden_states, residual, condition_map, gate_msa, self.self_attn_post_norm).to(
1516
+ self.model_config.params_dtype
1517
+ )
1518
+
1519
+ residual = hidden_states
1520
+ hidden_states = self.mlp(hidden_states)
1521
+ # Residual connection for MLP.
1522
+ hidden_states = bias_modulate_add(hidden_states, residual, condition_map, gate_mlp, self.mlp_post_norm).to(
1523
+ self.model_config.params_dtype
1524
+ )
1525
+ return hidden_states
1526
+
1527
+
1528
+ ##########################################################
1529
+ # TransformerBlock
1530
+ ##########################################################
1531
+ class TransformerBlock(torch.nn.Module):
1532
+ """Transformer class."""
1533
+
1534
+ def __init__(
1535
+ self, model_config: ModelConfig, engine_config: EngineConfig, pre_process: bool = True, post_process: bool = True
1536
+ ):
1537
+ super().__init__()
1538
+
1539
+ self.model_config = model_config
1540
+ self.engine_config = engine_config
1541
+ self.pre_process = pre_process
1542
+ self.post_process = post_process
1543
+
1544
+ # required for pipeline parallel schedules
1545
+ self.input_tensor = None
1546
+
1547
+ layer_number = self.model_config.num_layers // parallel_state.get_pp_world_size()
1548
+ # offset is implicit in TransformerLayer
1549
+ self.layers = torch.nn.ModuleList(
1550
+ [
1551
+ TransformerLayer(model_config=self.model_config, engine_config=self.engine_config, layer_number=i)
1552
+ for i in range(layer_number)
1553
+ ]
1554
+ )
1555
+ if self.post_process:
1556
+ # Final layer norm before output.
1557
+ self.final_layernorm = FusedLayerNorm(model_config=self.model_config, hidden_size=self.model_config.hidden_size)
1558
+
1559
+ def set_input_tensor(self, input_tensor: Tensor):
1560
+ """Set input tensor to be used instead of forward()'s input.
1561
+
1562
+ When doing pipeline parallelism the input from the previous
1563
+ stage comes from communication, not from the input, so the
1564
+ model's forward_step_func won't have it. This function is thus
1565
+ used by internal code to bypass the input provided by the
1566
+ forward_step_func"""
1567
+ self.input_tensor = input_tensor
1568
+
1569
+ @torch.no_grad()
1570
+ def forward(
1571
+ self,
1572
+ hidden_states: Tensor,
1573
+ condition: Tensor,
1574
+ condition_map: Tensor,
1575
+ y_xattn_flat: Tensor,
1576
+ rotary_pos_emb: Tensor,
1577
+ inference_params: InferenceParams,
1578
+ meta_args: ModelMetaArgs,
1579
+ ) -> torch.Tensor:
1580
+ if not self.pre_process:
1581
+ assert self.input_tensor is not None, "please call set_input_tensor for pp"
1582
+ hidden_states = self.input_tensor
1583
+
1584
+ for layer in self.layers:
1585
+ hidden_states = layer(
1586
+ hidden_states=hidden_states,
1587
+ condition=condition,
1588
+ condition_map=condition_map,
1589
+ y_xattn_flat=y_xattn_flat,
1590
+ rotary_pos_emb=rotary_pos_emb,
1591
+ inference_params=inference_params,
1592
+ meta_args=meta_args,
1593
+ )
1594
+
1595
+ # Final layer norm.
1596
+ if self.post_process:
1597
+ hidden_states = self.final_layernorm(hidden_states.float())
1598
+
1599
+ return hidden_states
FlowCache/FlowCache4MAGI-1/inference/model/t5/__init__.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from .t5_model import T5Embedder
16
+
17
+ __all__ = ["T5Embedder"]
FlowCache/FlowCache4MAGI-1/inference/model/t5/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (258 Bytes). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/t5/__pycache__/t5_model.cpython-310.pyc ADDED
Binary file (6.64 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/t5/t5_model.py ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import html
16
+ import os
17
+ import re
18
+ import urllib.parse as ul
19
+
20
+ import ftfy
21
+ import torch
22
+ from bs4 import BeautifulSoup
23
+ from huggingface_hub import hf_hub_download
24
+ from transformers import AutoTokenizer, T5EncoderModel
25
+
26
+
27
+ def save_model_as_safetensors(model):
28
+ from safetensors.torch import save_file
29
+ state_dict = model.state_dict()
30
+ for k in state_dict:
31
+ state_dict[k] = state_dict[k].contiguous()
32
+
33
+ save_file(state_dict, "/path/to/t5/model.safetensors")
34
+
35
+ class T5Embedder:
36
+ available_models = ["t5-v1_1-xxl"]
37
+ bad_punct_regex = re.compile(
38
+ r"[" + "#®•©™&@·º½¾¿¡§~" + "\)" + "\(" + "\]" + "\[" + "\}" + "\{" + "\|" + "\\" + "\/" + "\*" + r"]{1,}"
39
+ ) # noqa
40
+
41
+ def __init__(
42
+ self,
43
+ device,
44
+ dir_or_name="t5-v1_1-xxl",
45
+ *,
46
+ local_cache=False,
47
+ cache_dir=None,
48
+ hf_token=None,
49
+ use_text_preprocessing=True,
50
+ t5_model_kwargs=None,
51
+ torch_dtype=None,
52
+ use_offload_folder=None,
53
+ model_max_length=120,
54
+ ):
55
+ self.device = torch.device(device)
56
+ self.torch_dtype = torch_dtype or torch.bfloat16
57
+ if t5_model_kwargs is None:
58
+ t5_model_kwargs = {"low_cpu_mem_usage": True, "torch_dtype": self.torch_dtype}
59
+ if use_offload_folder is not None:
60
+ t5_model_kwargs["offload_folder"] = use_offload_folder
61
+ t5_model_kwargs["device_map"] = {
62
+ "shared": self.device,
63
+ "encoder.embed_tokens": self.device,
64
+ "encoder.block.0": self.device,
65
+ "encoder.block.1": self.device,
66
+ "encoder.block.2": self.device,
67
+ "encoder.block.3": self.device,
68
+ "encoder.block.4": self.device,
69
+ "encoder.block.5": self.device,
70
+ "encoder.block.6": self.device,
71
+ "encoder.block.7": self.device,
72
+ "encoder.block.8": self.device,
73
+ "encoder.block.9": self.device,
74
+ "encoder.block.10": self.device,
75
+ "encoder.block.11": self.device,
76
+ "encoder.block.12": "disk",
77
+ "encoder.block.13": "disk",
78
+ "encoder.block.14": "disk",
79
+ "encoder.block.15": "disk",
80
+ "encoder.block.16": "disk",
81
+ "encoder.block.17": "disk",
82
+ "encoder.block.18": "disk",
83
+ "encoder.block.19": "disk",
84
+ "encoder.block.20": "disk",
85
+ "encoder.block.21": "disk",
86
+ "encoder.block.22": "disk",
87
+ "encoder.block.23": "disk",
88
+ "encoder.final_layer_norm": "disk",
89
+ "encoder.dropout": "disk",
90
+ }
91
+ else:
92
+ t5_model_kwargs["device_map"] = {"shared": self.device, "encoder": self.device}
93
+ self.use_text_preprocessing = use_text_preprocessing
94
+ self.hf_token = hf_token
95
+ self.cache_dir = cache_dir or os.path.expanduser("~/.cache/IF_")
96
+ self.dir_or_name = dir_or_name
97
+ tokenizer_path, path = dir_or_name, dir_or_name
98
+ if local_cache:
99
+ cache_dir = os.path.join(self.cache_dir, dir_or_name)
100
+ tokenizer_path, path = cache_dir, cache_dir
101
+ elif dir_or_name in self.available_models:
102
+ cache_dir = os.path.join(self.cache_dir, dir_or_name)
103
+ for filename in [
104
+ "config.json",
105
+ "special_tokens_map.json",
106
+ "spiece.model",
107
+ "tokenizer_config.json",
108
+ "pytorch_model.bin.index.json",
109
+ "pytorch_model-00001-of-00002.bin",
110
+ "pytorch_model-00002-of-00002.bin",
111
+ ]:
112
+ hf_hub_download(
113
+ repo_id=f"DeepFloyd/{dir_or_name}",
114
+ filename=filename,
115
+ cache_dir=cache_dir,
116
+ force_filename=filename,
117
+ token=self.hf_token,
118
+ )
119
+ tokenizer_path, path = cache_dir, cache_dir
120
+ else:
121
+ cache_dir = os.path.join(self.cache_dir, "t5-v1_1-xxl")
122
+ for filename in ["config.json", "special_tokens_map.json", "spiece.model", "tokenizer_config.json"]:
123
+ hf_hub_download(
124
+ repo_id="DeepFloyd/t5-v1_1-xxl",
125
+ filename=filename,
126
+ cache_dir=cache_dir,
127
+ force_filename=filename,
128
+ token=self.hf_token,
129
+ )
130
+ tokenizer_path = cache_dir
131
+
132
+ self.tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
133
+ self.model = T5EncoderModel.from_pretrained(path, **t5_model_kwargs).eval()
134
+ self.model_max_length = model_max_length
135
+
136
+
137
+ def get_text_embeddings(self, texts):
138
+ texts = [self.text_preprocessing(text) for text in texts]
139
+
140
+ text_tokens_and_mask = self.tokenizer(
141
+ texts,
142
+ max_length=self.model_max_length,
143
+ padding="max_length",
144
+ truncation=True,
145
+ return_attention_mask=True,
146
+ add_special_tokens=True,
147
+ return_tensors="pt",
148
+ )
149
+
150
+ text_tokens_and_mask["input_ids"] = text_tokens_and_mask["input_ids"]
151
+ text_tokens_and_mask["attention_mask"] = text_tokens_and_mask["attention_mask"]
152
+
153
+ with torch.no_grad():
154
+ text_encoder_embs = self.model(
155
+ input_ids=text_tokens_and_mask["input_ids"].to(self.device),
156
+ attention_mask=text_tokens_and_mask["attention_mask"].to(self.device),
157
+ )["last_hidden_state"].detach()
158
+ return text_encoder_embs, text_tokens_and_mask["attention_mask"].to(self.device)
159
+
160
+ def text_preprocessing(self, text):
161
+ if self.use_text_preprocessing:
162
+ # The exact text cleaning as was in the training stage:
163
+ text = self.clean_caption(text)
164
+ text = self.clean_caption(text)
165
+ return text
166
+ else:
167
+ return text.lower().strip()
168
+
169
+ @staticmethod
170
+ def basic_clean(text):
171
+ text = ftfy.fix_text(text)
172
+ text = html.unescape(html.unescape(text))
173
+ return text.strip()
174
+
175
+ def clean_caption(self, caption):
176
+ caption = str(caption)
177
+ caption = ul.unquote_plus(caption)
178
+ caption = caption.strip().lower()
179
+ caption = re.sub("<person>", "person", caption)
180
+ # urls:
181
+ caption = re.sub(
182
+ r"\b((?:https?:(?:\/{1,3}|[a-zA-Z0-9%])|[a-zA-Z0-9.\-]+[.](?:com|co|ru|net|org|edu|gov|it)[\w/-]*\b\/?(?!@)))", # noqa
183
+ "",
184
+ caption,
185
+ ) # regex for urls
186
+ caption = re.sub(
187
+ r"\b((?:www:(?:\/{1,3}|[a-zA-Z0-9%])|[a-zA-Z0-9.\-]+[.](?:com|co|ru|net|org|edu|gov|it)[\w/-]*\b\/?(?!@)))", # noqa
188
+ "",
189
+ caption,
190
+ ) # regex for urls
191
+ # html:
192
+ caption = BeautifulSoup(caption, features="html.parser").text
193
+
194
+ # @<nickname>
195
+ caption = re.sub(r"@[\w\d]+\b", "", caption)
196
+
197
+ # 31C0—31EF CJK Strokes
198
+ # 31F0—31FF Katakana Phonetic Extensions
199
+ # 3200—32FF Enclosed CJK Letters and Months
200
+ # 3300—33FF CJK Compatibility
201
+ # 3400—4DBF CJK Unified Ideographs Extension A
202
+ # 4DC0—4DFF Yijing Hexagram Symbols
203
+ # 4E00—9FFF CJK Unified Ideographs
204
+ caption = re.sub(r"[\u31c0-\u31ef]+", "", caption)
205
+ caption = re.sub(r"[\u31f0-\u31ff]+", "", caption)
206
+ caption = re.sub(r"[\u3200-\u32ff]+", "", caption)
207
+ caption = re.sub(r"[\u3300-\u33ff]+", "", caption)
208
+ caption = re.sub(r"[\u3400-\u4dbf]+", "", caption)
209
+ caption = re.sub(r"[\u4dc0-\u4dff]+", "", caption)
210
+ caption = re.sub(r"[\u4e00-\u9fff]+", "", caption)
211
+ #######################################################
212
+
213
+ # все виды тире / all types of dash --> "-"
214
+ caption = re.sub(
215
+ r"[\u002D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D]+", # noqa
216
+ "-",
217
+ caption,
218
+ )
219
+
220
+ # кавычки к одному стандарту
221
+ caption = re.sub(r"[`´«»“”¨]", '"', caption)
222
+ caption = re.sub(r"[‘’]", "'", caption)
223
+
224
+ # &quot;
225
+ caption = re.sub(r"&quot;?", "", caption)
226
+ # &amp
227
+ caption = re.sub(r"&amp", "", caption)
228
+
229
+ # ip adresses:
230
+ caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption)
231
+
232
+ # article ids:
233
+ caption = re.sub(r"\d:\d\d\s+$", "", caption)
234
+
235
+ # \n
236
+ caption = re.sub(r"\\n", " ", caption)
237
+
238
+ # "#123"
239
+ caption = re.sub(r"#\d{1,3}\b", "", caption)
240
+ # "#12345.."
241
+ caption = re.sub(r"#\d{5,}\b", "", caption)
242
+ # "123456.."
243
+ caption = re.sub(r"\b\d{6,}\b", "", caption)
244
+ # filenames:
245
+ caption = re.sub(r"[\S]+\.(?:png|jpg|jpeg|bmp|webp|eps|pdf|apk|mp4)", "", caption)
246
+
247
+ #
248
+ caption = re.sub(r"[\"\']{2,}", r'"', caption) # """AUSVERKAUFT"""
249
+ caption = re.sub(r"[\.]{2,}", r" ", caption) # """AUSVERKAUFT"""
250
+
251
+ caption = re.sub(self.bad_punct_regex, r" ", caption) # ***AUSVERKAUFT***, #AUSVERKAUFT
252
+ caption = re.sub(r"\s+\.\s+", r" ", caption) # " . "
253
+
254
+ # this-is-my-cute-cat / this_is_my_cute_cat
255
+ regex2 = re.compile(r"(?:\-|\_)")
256
+ if len(re.findall(regex2, caption)) > 3:
257
+ caption = re.sub(regex2, " ", caption)
258
+
259
+ caption = self.basic_clean(caption)
260
+
261
+ caption = re.sub(r"\b[a-zA-Z]{1,3}\d{3,15}\b", "", caption) # jc6640
262
+ caption = re.sub(r"\b[a-zA-Z]+\d+[a-zA-Z]+\b", "", caption) # jc6640vc
263
+ caption = re.sub(r"\b\d+[a-zA-Z]+\d+\b", "", caption) # 6640vc231
264
+
265
+ caption = re.sub(r"(worldwide\s+)?(free\s+)?shipping", "", caption)
266
+ caption = re.sub(r"(free\s)?download(\sfree)?", "", caption)
267
+ caption = re.sub(r"\bclick\b\s(?:for|on)\s\w+", "", caption)
268
+ caption = re.sub(r"\b(?:png|jpg|jpeg|bmp|webp|eps|pdf|apk|mp4)(\simage[s]?)?", "", caption)
269
+ caption = re.sub(r"\bpage\s+\d+\b", "", caption)
270
+
271
+ caption = re.sub(r"\b\d*[a-zA-Z]+\d+[a-zA-Z]+\d+[a-zA-Z\d]*\b", r" ", caption) # j2d1a2a...
272
+
273
+ caption = re.sub(r"\b\d+\.?\d*[xх×]\d+\.?\d*\b", "", caption)
274
+
275
+ caption = re.sub(r"\b\s+\:\s+", r": ", caption)
276
+ caption = re.sub(r"(\D[,\./])\b", r"\1 ", caption)
277
+ caption = re.sub(r"\s+", " ", caption)
278
+
279
+ caption.strip()
280
+
281
+ caption = re.sub(r"^[\"\']([\w\W]+)[\"\']$", r"\1", caption)
282
+ caption = re.sub(r"^[\'\_,\-\:;]", r"", caption)
283
+ caption = re.sub(r"[\'\_,\-\:\-\+]$", r"", caption)
284
+ caption = re.sub(r"^\.\S+$", "", caption)
285
+
286
+ return caption.strip()
FlowCache/FlowCache4MAGI-1/inference/model/vae/__init__.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from .vae_model import AutoModel, VideoTokenizerABC, ViTVAE
16
+ from .vae_module import DiagonalGaussianDistribution
17
+
18
+ __all__ = ["AutoModel", "VideoTokenizerABC", "ViTVAE", "DiagonalGaussianDistribution"]
FlowCache/FlowCache4MAGI-1/inference/model/vae/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (386 Bytes). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/vae/__pycache__/vae_model.cpython-310.pyc ADDED
Binary file (11.4 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/vae/__pycache__/vae_module.cpython-310.pyc ADDED
Binary file (19.4 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/model/vae/vae_model.py ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import json
16
+ import os
17
+ from abc import ABC, abstractmethod
18
+ from typing import Literal
19
+
20
+ import torch
21
+ from diffusers import ConfigMixin, ModelMixin
22
+ from diffusers.configuration_utils import register_to_config
23
+
24
+ from inference.infra.parallelism import TileProcessor
25
+
26
+ from .vae_module import DiagonalGaussianDistribution, ViTDecoder, ViTEncoder
27
+
28
+
29
+ class VideoTokenizerABC(ABC):
30
+ """
31
+ Abstract base class for video tokenizers.
32
+
33
+ This class defines the interface for video tokenizers and provides common methods and properties.
34
+ """
35
+
36
+ @property
37
+ @abstractmethod
38
+ def spatial_downsample_factor(self):
39
+ """
40
+ Property representing the spatial downsample factor.
41
+
42
+ Returns:
43
+ int: The spatial downsample factor.
44
+ """
45
+ raise NotImplementedError
46
+
47
+ @property
48
+ @abstractmethod
49
+ def temporal_downsample_factor(self):
50
+ """
51
+ Property representing the temporal downsample factor.
52
+
53
+ Returns:
54
+ int: The temporal downsample factor.
55
+ """
56
+ raise NotImplementedError
57
+
58
+ @property
59
+ def first_frame_as_image(self):
60
+ """
61
+ Property representing the first frame as image.
62
+ For tokenizer like CausalVAE, Omnitokenizer, the first frame is treated as image.
63
+ in this case if the temporal downsample factor is 4, the input should be 4*x+1, and encoded tensor would be x+1.
64
+ for example encode 65 frames to 17 frames. and decode 17 frames to 65 frames.
65
+
66
+ Returns:
67
+ bool: The first frame as image.
68
+ """
69
+ return False
70
+
71
+ @property
72
+ def allow_spatial_tiling(self):
73
+ """
74
+ Determines whether spatial tiling is allowed or not.
75
+
76
+ Returns:
77
+ bool: True if spatial tiling is allowed, False otherwise.
78
+ """
79
+ return True
80
+
81
+ @abstractmethod
82
+ def encode(self, x) -> torch.Tensor:
83
+ """
84
+ Abstract method for encoding the input tensor.
85
+
86
+ Args:
87
+ x (torch.Tensor [N C T H W] range[-1, 1]): The input tensor to be encoded.
88
+
89
+ Returns:
90
+ torch.Tensor: The encoded tensor.
91
+ """
92
+ raise NotImplementedError
93
+
94
+ @abstractmethod
95
+ def decode(self, x) -> torch.Tensor:
96
+ """
97
+ Abstract method for decoding the input tensor.
98
+
99
+ Args:
100
+ x (torch.Tensor [N C T H W]): The input tensor to be decoded.
101
+
102
+ Returns:
103
+ torch.Tensor [N C T H W] range[-1, 1]: The decoded tensor.
104
+ """
105
+ raise NotImplementedError
106
+
107
+ def tile_processor(
108
+ self,
109
+ tile_sample_min_height=256,
110
+ tile_sample_min_width=256,
111
+ tile_sample_min_length=16,
112
+ spatial_tile_overlap_factor: float = 0.25,
113
+ temporal_tile_overlap_factor: float = 0,
114
+ parallel_group: torch.distributed.ProcessGroup = None,
115
+ ) -> TileProcessor:
116
+ """
117
+ Property representing the tiled encoder or decoder.
118
+
119
+ Returns:
120
+ TileProcessor: The tiled encoder or decoder.
121
+ """
122
+ return TileProcessor(
123
+ encode_fn=self.encode,
124
+ decode_fn=self.decode,
125
+ tile_sample_min_height=tile_sample_min_height,
126
+ tile_sample_min_width=tile_sample_min_width,
127
+ tile_sample_min_length=tile_sample_min_length,
128
+ spatial_tile_overlap_factor=spatial_tile_overlap_factor,
129
+ temporal_tile_overlap_factor=temporal_tile_overlap_factor,
130
+ sr_ratio=getattr(self, 'sr_ratio', 1),
131
+ spatial_downsample_factor=self.spatial_downsample_factor,
132
+ temporal_downsample_factor=self.temporal_downsample_factor,
133
+ first_frame_as_image=self.first_frame_as_image,
134
+ parallel_group=parallel_group,
135
+ )
136
+
137
+ @torch.inference_mode()
138
+ def tiled_encode_3d(
139
+ self,
140
+ x,
141
+ tile_sample_min_height=256,
142
+ tile_sample_min_width=256,
143
+ tile_sample_min_length: int = 16,
144
+ spatial_tile_overlap_factor: float = 0.25,
145
+ temporal_tile_overlap_factor: float = 0,
146
+ allow_spatial_tiling: bool = None,
147
+ verbose: bool = False,
148
+ parallel_group: torch.distributed.ProcessGroup = None,
149
+ ) -> torch.Tensor:
150
+ """
151
+ Encodes the input tensor `x` using tiled encoding.
152
+
153
+ Args:
154
+ x (torch.Tensor shape:[N C T H W]): The input tensor to be encoded.
155
+ tile_sample_min_height (int, optional): The minimum height of each tile sample. Defaults to 256.
156
+ tile_sample_min_width (int, optional): The minimum width of each tile sample. Defaults to 256.
157
+ tile_sample_min_length (int, optional): The minimum length of each tile sample. Defaults to 16.
158
+ spatial_tile_overlap_factor (float, optional): Overlap factor for spatial tiles. Defaults to 0.25.
159
+ temporal_tile_overlap_factor (float, optional): Overlap factor for temporal tiles. Defaults to 0.
160
+ allow_spatial_tiling (bool, optional): Whether spatial tiling is allowed. Defaults to None.
161
+ verbose (bool, optional): Whether to print verbose information. Defaults to False.
162
+ parallel_group (torch.distributed.ProcessGroup, optional): Distributed encoding group. Defaults to None.
163
+ Returns:
164
+ torch.Tensor: The encoded tensor.
165
+ """
166
+ allow_spatial_tiling = allow_spatial_tiling if allow_spatial_tiling is not None else self.allow_spatial_tiling
167
+ if not allow_spatial_tiling:
168
+ tile_sample_min_height = 100000
169
+ tile_sample_min_width = 100000
170
+ return self.tile_processor(
171
+ tile_sample_min_height=tile_sample_min_height,
172
+ tile_sample_min_width=tile_sample_min_width,
173
+ tile_sample_min_length=tile_sample_min_length,
174
+ spatial_tile_overlap_factor=spatial_tile_overlap_factor,
175
+ temporal_tile_overlap_factor=temporal_tile_overlap_factor,
176
+ parallel_group=parallel_group,
177
+ ).tiled_encode(x, verbose)
178
+
179
+ @torch.inference_mode()
180
+ def tiled_decode_3d(
181
+ self,
182
+ x,
183
+ tile_sample_min_height=256,
184
+ tile_sample_min_width=256,
185
+ tile_sample_min_length: int = 16,
186
+ spatial_tile_overlap_factor: float = 0.25,
187
+ temporal_tile_overlap_factor: float = 0,
188
+ allow_spatial_tiling: bool = None,
189
+ verbose: bool = False,
190
+ parallel_group: torch.distributed.ProcessGroup = None,
191
+ ) -> torch.Tensor:
192
+ """
193
+ Decodes the input tensor using the tile autoencoder.
194
+
195
+ Args:
196
+ x (torch.Tensor): The input tensor to be decoded.
197
+ tile_sample_min_height (int, optional): The minimum height of each tile sample. Defaults to 256.
198
+ tile_sample_min_width (int, optional): The minimum width of each tile sample. Defaults to 256.
199
+ tile_sample_min_length (int, optional): The minimum length of each tile sample. Defaults to 16.
200
+ spatial_tile_overlap_factor (float, optional): Overlap factor for spatial tiles. Defaults to 0.25.
201
+ temporal_tile_overlap_factor (float, optional): Overlap factor for temporal tiles. Defaults to 0.
202
+ allow_spatial_tiling (bool, optional): Whether spatial tiling is allowed. Defaults to None.
203
+ verbose (bool, optional): Whether to print verbose information. Defaults to False.
204
+ parallel_group (torch.distributed.ProcessGroup, optional): Distributed decoding group. Defaults to None.
205
+ Returns:
206
+ torch.Tensor shape:[N C T H W]: The decoded tensor.
207
+ """
208
+ allow_spatial_tiling = allow_spatial_tiling if allow_spatial_tiling is not None else self.allow_spatial_tiling
209
+ if not allow_spatial_tiling:
210
+ tile_sample_min_height = 100000
211
+ tile_sample_min_width = 100000
212
+ return self.tile_processor(
213
+ tile_sample_min_height=tile_sample_min_height,
214
+ tile_sample_min_width=tile_sample_min_width,
215
+ tile_sample_min_length=tile_sample_min_length,
216
+ spatial_tile_overlap_factor=spatial_tile_overlap_factor,
217
+ temporal_tile_overlap_factor=temporal_tile_overlap_factor,
218
+ parallel_group=parallel_group,
219
+ ).tiled_decode(x, verbose)
220
+
221
+
222
+ class ViTVAE(ModelMixin, ConfigMixin, VideoTokenizerABC):
223
+ @register_to_config
224
+ def __init__(self, ddconfig: dict, model_type: Literal['vit', 'vit_ncthw'] = 'vit'):
225
+ super().__init__()
226
+
227
+ if model_type == 'vit':
228
+ self.encoder = ViTEncoder(**ddconfig)
229
+ self.decoder = ViTDecoder(**ddconfig)
230
+ elif model_type == 'vit_ncthw':
231
+ from videotokenizer.modules.vit_ncthw import ViTDecoderNCTHW, ViTEncoderNCTHW
232
+
233
+ self.encoder = ViTEncoderNCTHW(**ddconfig)
234
+ self.decoder = ViTDecoderNCTHW(**ddconfig)
235
+ else:
236
+ raise ValueError(f"model_type {model_type} not supported")
237
+
238
+ if 'patch_length' in ddconfig:
239
+ self._temporal_downsample_factor = ddconfig['patch_length']
240
+ else:
241
+ self._temporal_downsample_factor = 1
242
+
243
+ if 'patch_size' in ddconfig:
244
+ self._spatial_downsample_factor = ddconfig['patch_size']
245
+ else:
246
+ self._spatial_downsample_factor = 8
247
+
248
+ @property
249
+ def spatial_downsample_factor(self):
250
+ return self._spatial_downsample_factor
251
+
252
+ @property
253
+ def temporal_downsample_factor(self):
254
+ return self._temporal_downsample_factor
255
+
256
+ def init_from_ckpt(self, path, ignore_keys=list()):
257
+ raise NotImplementedError
258
+
259
+ def encode(self, x, sample_posterior=True):
260
+ """
261
+ Encode the input video.
262
+
263
+ Args:
264
+ x (torch.Tensor): Input video tensor has shape N C T H W
265
+
266
+ Returns:
267
+ tuple: Tuple containing the quantized tensor, embedding loss, and additional information.
268
+ """
269
+ N, C, T, H, W = x.shape
270
+ if T == 1 and self._temporal_downsample_factor > 1:
271
+ x = x.expand(-1, -1, 4, -1, -1)
272
+ x = self.encoder(x)
273
+ posterior = DiagonalGaussianDistribution(x)
274
+ if sample_posterior:
275
+ z = posterior.sample()
276
+ else:
277
+ z = posterior.mode()
278
+
279
+ return z[:, :, :1, :, :].type(x.dtype)
280
+ else:
281
+ x = self.encoder(x)
282
+ posterior = DiagonalGaussianDistribution(x)
283
+ if sample_posterior:
284
+ z = posterior.sample()
285
+ else:
286
+ z = posterior.mode()
287
+
288
+ return z.type(x.dtype)
289
+
290
+ def decode(self, x):
291
+ """
292
+ Decode the quantized tensor.
293
+
294
+ Args:
295
+ quant (torch.Tensor): Quantized tensor.
296
+
297
+ Returns:
298
+ torch.Tensor: Decoded tensor.
299
+ """
300
+ N, C, T, H, W = x.shape
301
+ if T == 1:
302
+ x = x.expand(-1, -1, 1, -1, -1)
303
+ x = self.decoder(x)
304
+ x = x[:, :, :1, :, :]
305
+ return x
306
+ else:
307
+ x = self.decoder(x)
308
+ return x
309
+
310
+ def forward(self, x, sample_posterior=True):
311
+ x = self.encoder(x)
312
+ posterior = DiagonalGaussianDistribution(x)
313
+
314
+ if sample_posterior:
315
+ z = posterior.sample()
316
+ else:
317
+ z = posterior.mode()
318
+
319
+ dec = self.decoder(z)
320
+ return dec, posterior
321
+
322
+ def get_last_layer(self):
323
+ """
324
+ Get the last layer of the decoder.
325
+
326
+ Returns:
327
+ torch.Tensor: Last layer of the decoder.
328
+ """
329
+ return self.decoder.last_layer.weight
330
+
331
+ @property
332
+ def allow_spatial_tiling(self):
333
+ return False
334
+
335
+
336
+ class AutoModel:
337
+ r"""
338
+ :class:`~models.AutoModel` is a generic model class
339
+ that will be instantiated as one of the base model classes of the library
340
+ when created with the `AutoModel.from_pretrained(pretrained_model_name_or_path)`
341
+
342
+
343
+ This class cannot be instantiated using `__init__()` (throws an error).
344
+ """
345
+
346
+ def __init__(self):
347
+ raise EnvironmentError(
348
+ "AutoModel is designed to be instantiated "
349
+ "using the `AutoModel.from_pretrained(pretrained_model_name_or_path)` method."
350
+ )
351
+
352
+ @classmethod
353
+ def from_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs) -> VideoTokenizerABC:
354
+ config = os.path.join(pretrained_model_name_or_path, 'config.json')
355
+ if not os.path.exists(config):
356
+ raise ValueError("Can't find a model config file at {}.".format(config))
357
+ # Load config
358
+ with open(config, 'r') as json_file:
359
+ config_dict = json.load(json_file)
360
+ assert config_dict['_class_name'] == 'ViTVAE'
361
+ return ViTVAE.from_pretrained(pretrained_model_name_or_path, *args, **kwargs)
FlowCache/FlowCache4MAGI-1/inference/model/vae/vae_module.py ADDED
@@ -0,0 +1,757 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) 2025 SandAI. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import math
16
+ from functools import lru_cache
17
+ from typing import List, Optional, Tuple
18
+
19
+ import numpy as np
20
+ import torch
21
+ import torch.nn as nn
22
+ from einops import rearrange
23
+ from flash_attn import flash_attn_func, flash_attn_qkvpacked_func
24
+ from timm.models.layers import to_2tuple, trunc_normal_
25
+
26
+ ###################################################
27
+ # modified 3D rotary embedding from timm
28
+ ###################################################
29
+
30
+
31
+ def ndgrid(*tensors) -> Tuple[torch.Tensor, ...]:
32
+ """generate N-D grid in dimension order.
33
+
34
+ The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.
35
+
36
+ That is, the statement
37
+ [X1,X2,X3] = ndgrid(x1,x2,x3)
38
+
39
+ produces the same result as
40
+
41
+ [X2,X1,X3] = meshgrid(x2,x1,x3)
42
+
43
+ This naming is based on MATLAB, the purpose is to avoid confusion due to torch's change to make
44
+ torch.meshgrid behaviour move from matching ndgrid ('ij') indexing to numpy meshgrid defaults of ('xy').
45
+
46
+ """
47
+ try:
48
+ return torch.meshgrid(*tensors, indexing='ij')
49
+ except TypeError:
50
+ # old PyTorch < 1.10 will follow this path as it does not have indexing arg,
51
+ # the old behaviour of meshgrid was 'ij'
52
+ return torch.meshgrid(*tensors)
53
+
54
+
55
+ def freq_bands(
56
+ num_bands: int, temperature: float = 10000.0, step: int = 2, device: Optional[torch.device] = None
57
+ ) -> torch.Tensor:
58
+ exp = torch.arange(0, num_bands, step, dtype=torch.int64, device=device).to(torch.float32) / num_bands
59
+ bands = 1.0 / (temperature**exp)
60
+ return bands
61
+
62
+
63
+ def pixel_freq_bands(
64
+ num_bands: int, max_freq: float = 224.0, linear_bands: bool = True, device: Optional[torch.device] = None
65
+ ):
66
+ if linear_bands:
67
+ bands = torch.linspace(1.0, max_freq / 2, num_bands, dtype=torch.float32, device=device)
68
+ else:
69
+ bands = 2 ** torch.linspace(0, math.log(max_freq, 2) - 1, num_bands, dtype=torch.float32, device=device)
70
+ return bands * torch.pi
71
+
72
+
73
+ def build_fourier_pos_embed(
74
+ feat_shape: List[int],
75
+ bands: Optional[torch.Tensor] = None,
76
+ num_bands: int = 64,
77
+ max_res: int = 224,
78
+ temperature: float = 10000.0,
79
+ linear_bands: bool = False,
80
+ include_grid: bool = False,
81
+ in_pixels: bool = True,
82
+ ref_feat_shape: Optional[List[int]] = None,
83
+ dtype: torch.dtype = torch.float32,
84
+ device: Optional[torch.device] = None,
85
+ center_imgidx=True,
86
+ ) -> List[torch.Tensor]:
87
+ """
88
+
89
+ Args:
90
+ feat_shape: Feature shape for embedding.
91
+ bands: Pre-calculated frequency bands.
92
+ num_bands: Number of frequency bands (determines output dim).
93
+ max_res: Maximum resolution for pixel based freq.
94
+ temperature: Temperature for non-pixel freq.
95
+ linear_bands: Linear band spacing for pixel based freq.
96
+ include_grid: Include the spatial grid in output.
97
+ in_pixels: Output in pixel freq.
98
+ ref_feat_shape: Reference feature shape for resize / fine-tune.
99
+ dtype: Output dtype.
100
+ device: Output device.
101
+
102
+ Returns:
103
+
104
+ """
105
+ if bands is None:
106
+ if in_pixels:
107
+ bands = pixel_freq_bands(num_bands, float(max_res), linear_bands=linear_bands, device=device)
108
+ else:
109
+ bands = freq_bands(num_bands, temperature=temperature, step=1, device=device)
110
+ else:
111
+ if device is None:
112
+ device = bands.device
113
+ if dtype is None:
114
+ dtype = bands.dtype
115
+
116
+ if in_pixels:
117
+ t = [torch.linspace(-1.0, 1.0, steps=s, device=device, dtype=torch.float32) for s in feat_shape]
118
+ else:
119
+ if center_imgidx:
120
+ t = [
121
+ torch.arange(s, device=device, dtype=torch.int64).to(torch.float32) - (s - 1) / 2
122
+ if len(feat_shape) == 2 or i != 0
123
+ else torch.arange(s, device=device, dtype=torch.int64).to(torch.float32)
124
+ for i, s in enumerate(feat_shape)
125
+ ]
126
+ else:
127
+ t = [torch.arange(s, device=device, dtype=torch.int64).to(torch.float32) for s in feat_shape]
128
+
129
+ if ref_feat_shape is not None:
130
+ assert len(feat_shape) == len(ref_feat_shape), 'shape must be in same dimension'
131
+ # eva's scheme for resizing rope embeddings (ref shape = pretrain)
132
+ t = [x / f * r for x, f, r in zip(t, feat_shape, ref_feat_shape)]
133
+
134
+ grid = torch.stack(ndgrid(t), dim=-1)
135
+ grid = grid.unsqueeze(-1)
136
+ pos = grid * bands
137
+ pos_sin, pos_cos = pos.sin().to(dtype=dtype), pos.cos().to(dtype)
138
+ out = [grid, pos_sin, pos_cos] if include_grid else [pos_sin, pos_cos]
139
+ return out
140
+
141
+
142
+ def rot(x):
143
+ return torch.stack([-x[..., 1::2], x[..., ::2]], -1).reshape(x.shape)
144
+
145
+
146
+ def apply_rot_embed(x: torch.Tensor, sin_emb, cos_emb):
147
+ if sin_emb.ndim == 3:
148
+ return x * cos_emb.unsqueeze(1).expand_as(x) + rot(x) * sin_emb.unsqueeze(1).expand_as(x)
149
+ # import ipdb; ipdb.set_trace()
150
+ return x * cos_emb + rot(x) * sin_emb
151
+
152
+
153
+ def build_rotary_pos_embed(
154
+ feat_shape: List[int],
155
+ bands: Optional[torch.Tensor] = None,
156
+ dim: int = 64,
157
+ max_res: int = 224,
158
+ temperature: float = 10000.0,
159
+ linear_bands: bool = False,
160
+ in_pixels: bool = True,
161
+ ref_feat_shape: Optional[List[int]] = None,
162
+ dtype: torch.dtype = torch.float32,
163
+ device: Optional[torch.device] = None,
164
+ center_imgidx=True,
165
+ ):
166
+ """
167
+
168
+ Args:
169
+ feat_shape: Spatial shape of the target tensor for embedding.
170
+ bands: Optional pre-generated frequency bands
171
+ dim: Output dimension of embedding tensor.
172
+ max_res: Maximum resolution for pixel mode.
173
+ temperature: Temperature (inv freq) for non-pixel mode
174
+ linear_bands: Linearly (instead of log) spaced bands for pixel mode
175
+ in_pixels: Pixel vs language (inv freq) mode.
176
+ dtype: Output dtype.
177
+ device: Output device.
178
+
179
+ Returns:
180
+
181
+ """
182
+ sin_emb, cos_emb = build_fourier_pos_embed(
183
+ feat_shape,
184
+ bands=bands,
185
+ num_bands=dim // (len(feat_shape) * 2),
186
+ max_res=max_res,
187
+ temperature=temperature,
188
+ linear_bands=linear_bands,
189
+ in_pixels=in_pixels,
190
+ ref_feat_shape=ref_feat_shape,
191
+ device=device,
192
+ dtype=dtype,
193
+ center_imgidx=center_imgidx,
194
+ )
195
+ num_spatial_dim = 1
196
+ # this would be much nicer as a .numel() call to torch.Size(), but torchscript sucks
197
+ for x in feat_shape:
198
+ num_spatial_dim *= x
199
+ sin_emb = sin_emb.reshape(num_spatial_dim, -1).repeat_interleave(2, -1)
200
+ cos_emb = cos_emb.reshape(num_spatial_dim, -1).repeat_interleave(2, -1)
201
+ return sin_emb, cos_emb
202
+
203
+
204
+ ###################################################
205
+ # Mlp
206
+ ###################################################
207
+ class Mlp(nn.Module):
208
+ def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0):
209
+ super().__init__()
210
+ out_features = out_features or in_features
211
+ hidden_features = hidden_features or in_features
212
+ self.fc1 = nn.Linear(in_features, hidden_features)
213
+ self.act = act_layer()
214
+ self.fc2 = nn.Linear(hidden_features, out_features)
215
+ self.drop = nn.Dropout(drop)
216
+
217
+ def forward(self, x):
218
+ x = self.fc1(x)
219
+ x = self.act(x)
220
+ x = self.drop(x)
221
+ x = self.fc2(x)
222
+ x = self.drop(x)
223
+ return x
224
+
225
+
226
+ ###################################################
227
+ # ManualLayerNorm
228
+ ###################################################
229
+ class ManualLayerNorm(nn.Module):
230
+ def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True):
231
+ super(ManualLayerNorm, self).__init__()
232
+ self.normalized_shape = normalized_shape
233
+ self.eps = eps
234
+ self.elementwise_affine = elementwise_affine
235
+
236
+ def forward(self, x):
237
+ mean = x.mean(dim=-1, keepdim=True)
238
+ std = x.std(dim=-1, keepdim=True, unbiased=False)
239
+
240
+ x_normalized = (x - mean) / (std + self.eps)
241
+
242
+ return x_normalized
243
+
244
+
245
+ ###################################################
246
+ # Attention
247
+ ###################################################
248
+ @lru_cache(maxsize=50)
249
+ def cache_rotary_emb(feat_shape, device='cuda', dim=64, dtype=torch.bfloat16, max_res=512, ref_feat_shape=(4, 16, 16)):
250
+ return build_rotary_pos_embed(
251
+ feat_shape=feat_shape,
252
+ dim=dim,
253
+ max_res=max_res,
254
+ in_pixels=False,
255
+ ref_feat_shape=ref_feat_shape,
256
+ device=device,
257
+ dtype=dtype,
258
+ )
259
+
260
+
261
+ class Attention(nn.Module):
262
+ def __init__(
263
+ self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0, ln_in_attn=False, use_rope=False
264
+ ):
265
+ super().__init__()
266
+ self.num_heads = num_heads
267
+ head_dim = dim // num_heads
268
+
269
+ self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
270
+ self.attn_drop_rate = attn_drop
271
+ self.proj = nn.Linear(dim, dim)
272
+ self.proj_drop = nn.Dropout(proj_drop)
273
+ if ln_in_attn:
274
+ self.qkv_norm = ManualLayerNorm(head_dim, elementwise_affine=False)
275
+ else:
276
+ self.qkv_norm = nn.Identity()
277
+ self.use_rope = use_rope
278
+
279
+ def forward(self, x, feat_shape=None):
280
+ B, N, C = x.shape
281
+ qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads)
282
+
283
+ qkv = self.qkv_norm(qkv)
284
+ q, k, v = qkv.chunk(3, dim=2)
285
+ if self.use_rope:
286
+ assert feat_shape is not None
287
+ q, k, v = qkv.chunk(3, dim=2)
288
+ rope_emb = cache_rotary_emb(feat_shape=feat_shape, dim=C // self.num_heads, device=x.device, dtype=x.dtype)
289
+ sin_emb = rope_emb[0].unsqueeze(0).unsqueeze(2)
290
+ cos_emb = rope_emb[1].unsqueeze(0).unsqueeze(2)
291
+ print(q.shape, sin_emb.shape)
292
+ q[:, 1:, :] = apply_rot_embed(q[:, 1:, :], sin_emb, cos_emb).bfloat16()
293
+ k[:, 1:, :] = apply_rot_embed(k[:, 1:, :], sin_emb, cos_emb).bfloat16()
294
+ x = flash_attn_func(q, k, v, dropout_p=self.attn_drop_rate)
295
+ else:
296
+ x = flash_attn_qkvpacked_func(qkv=qkv.bfloat16(), dropout_p=self.attn_drop_rate)
297
+ # x = v
298
+ x = x.reshape(B, N, C)
299
+ # import ipdb; ipdb.set_trace()
300
+ x = self.proj(x)
301
+ x = self.proj_drop(x)
302
+ return x
303
+
304
+
305
+ ###################################################
306
+ # Block
307
+ ###################################################
308
+ class Block(nn.Module):
309
+ def __init__(
310
+ self,
311
+ dim,
312
+ num_heads,
313
+ mlp_ratio=4.0,
314
+ qkv_bias=False,
315
+ qk_scale=None,
316
+ drop=0.0,
317
+ attn_drop=0.0,
318
+ drop_path=0.0,
319
+ act_layer=nn.GELU,
320
+ norm_layer=nn.LayerNorm,
321
+ ln_in_attn=False,
322
+ use_rope=False,
323
+ ):
324
+ super().__init__()
325
+ if not ln_in_attn:
326
+ self.norm1 = norm_layer(dim)
327
+ else:
328
+ self.norm1 = nn.Identity()
329
+ self.attn = Attention(
330
+ dim,
331
+ num_heads=num_heads,
332
+ qkv_bias=qkv_bias,
333
+ qk_scale=qk_scale,
334
+ attn_drop=attn_drop,
335
+ proj_drop=drop,
336
+ ln_in_attn=ln_in_attn,
337
+ use_rope=use_rope,
338
+ )
339
+ self.drop_path = nn.Identity()
340
+ self.norm2 = norm_layer(dim)
341
+ mlp_hidden_dim = int(dim * mlp_ratio)
342
+ self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)
343
+
344
+ def forward(self, x, feat_shape=None):
345
+ x = x + self.drop_path(self.attn(self.norm1(x), feat_shape=feat_shape))
346
+ x = x + self.drop_path(self.mlp(self.norm2(x)))
347
+ return x
348
+
349
+
350
+ ###################################################
351
+ # PatchEmbed
352
+ ###################################################
353
+ class PatchEmbed(nn.Module):
354
+ """Image to Patch Embedding"""
355
+
356
+ def __init__(self, video_size=224, video_length=16, patch_size=16, patch_length=1, in_chans=3, embed_dim=768):
357
+ super().__init__()
358
+ video_size = to_2tuple(video_size)
359
+ patch_size = to_2tuple(patch_size)
360
+
361
+ num_patches = (video_length // patch_length) * (video_size[1] // patch_size[1]) * (video_size[0] // patch_size[0])
362
+
363
+ self.video_size = video_size
364
+ self.patch_size = patch_size
365
+
366
+ self.video_length = video_length
367
+ self.patch_length = patch_length
368
+
369
+ self.num_patches = num_patches
370
+
371
+ self.proj = nn.Conv3d(
372
+ in_chans,
373
+ embed_dim,
374
+ kernel_size=(patch_length, patch_size[0], patch_size[1]),
375
+ stride=(patch_length, patch_size[0], patch_size[1]),
376
+ )
377
+
378
+ def forward(self, x):
379
+ """
380
+ Forward pass of the PatchEmbed module.
381
+
382
+ Args:
383
+ x (torch.Tensor): Input tensor of shape (B, C, T, H, W), where
384
+ B is the batch size, C is the number of channels, T is the
385
+ number of frames, H is the height, and W is the width.
386
+
387
+ Returns:
388
+ torch.Tensor: Output tensor of shape (B, L, C'), where B is the
389
+ batch size, L is the number of tokens, and C' is the number
390
+ of output channels after flattening and transposing.
391
+ """
392
+ B, C, T, H, W = x.shape
393
+
394
+ x = self.proj(x)
395
+ return x
396
+
397
+
398
+ ###################################################
399
+ # ViTEncoder
400
+ ###################################################
401
+ def resize_pos_embed(posemb, src_shape, target_shape):
402
+ posemb = posemb.reshape(1, src_shape[0], src_shape[1], src_shape[2], -1)
403
+ posemb = posemb.permute(0, 4, 1, 2, 3)
404
+ posemb = nn.functional.interpolate(posemb, size=target_shape, mode='trilinear', align_corners=False)
405
+ posemb = posemb.permute(0, 2, 3, 4, 1)
406
+ posemb = posemb.reshape(1, target_shape[0] * target_shape[1] * target_shape[2], -1)
407
+ return posemb
408
+
409
+
410
+ class ViTEncoder(nn.Module):
411
+ """Vision Transformer with support for patch or hybrid CNN input stage"""
412
+
413
+ def __init__(
414
+ self,
415
+ video_size=256,
416
+ video_length=16,
417
+ patch_size=8,
418
+ patch_length=4,
419
+ in_chans=3,
420
+ z_chans=4,
421
+ double_z=True,
422
+ embed_dim=768,
423
+ depth=12,
424
+ num_heads=12,
425
+ mlp_ratio=4.0,
426
+ qkv_bias=False,
427
+ qk_scale=None,
428
+ drop_rate=0.0,
429
+ attn_drop_rate=0.0,
430
+ drop_path_rate=0.0,
431
+ norm_layer=nn.LayerNorm,
432
+ with_cls_token=True,
433
+ norm_code=False,
434
+ ln_in_attn=False,
435
+ conv_last_layer=False,
436
+ use_rope=False,
437
+ use_final_proj=False,
438
+ ):
439
+ super().__init__()
440
+
441
+ conv_last_layer = False # duplicate argument
442
+
443
+ # self.num_classes = num_classes
444
+ self.num_features = self.embed_dim = embed_dim # num_features for consistency with other models
445
+
446
+ self.latent_size = video_size // patch_size
447
+ self.latent_length = video_length // patch_length
448
+
449
+ self.patch_embed = PatchEmbed(
450
+ video_size=video_size,
451
+ video_length=video_length,
452
+ patch_size=patch_size,
453
+ patch_length=patch_length,
454
+ in_chans=in_chans,
455
+ embed_dim=embed_dim,
456
+ )
457
+
458
+ num_patches = self.patch_embed.num_patches
459
+ self.with_cls_token = with_cls_token
460
+ if with_cls_token:
461
+ self.cls_token_nums = 1
462
+ self.cls_token = nn.Parameter(torch.zeros(1, 1, embed_dim))
463
+ else:
464
+ self.cls_token_nums = 0
465
+ self.cls_token = None
466
+ self.pos_embed = nn.Parameter(torch.zeros(1, num_patches + self.cls_token_nums, embed_dim))
467
+ self.pos_drop = nn.Dropout(p=drop_rate)
468
+
469
+ dpr = [x.item() for x in torch.linspace(0, drop_path_rate, depth)] # stochastic depth decay rule
470
+ self.blocks = nn.ModuleList(
471
+ [
472
+ Block(
473
+ dim=embed_dim,
474
+ num_heads=num_heads,
475
+ mlp_ratio=mlp_ratio,
476
+ qkv_bias=qkv_bias,
477
+ qk_scale=qk_scale,
478
+ drop=drop_rate,
479
+ attn_drop=attn_drop_rate,
480
+ drop_path=dpr[i],
481
+ norm_layer=norm_layer,
482
+ ln_in_attn=ln_in_attn,
483
+ use_rope=use_rope,
484
+ )
485
+ for i in range(depth)
486
+ ]
487
+ )
488
+ self.norm = norm_layer(embed_dim)
489
+
490
+ self.norm_code = norm_code
491
+
492
+ self.out_channels = z_chans * 2 if double_z else z_chans
493
+ self.last_layer = nn.Linear(embed_dim, self.out_channels, bias=True)
494
+
495
+ trunc_normal_(self.pos_embed, std=0.02)
496
+
497
+ if self.with_cls_token:
498
+ trunc_normal_(self.cls_token, std=0.02)
499
+
500
+ self.apply(self._init_weights)
501
+
502
+ def _init_weights(self, m):
503
+ if isinstance(m, nn.Linear):
504
+ trunc_normal_(m.weight, std=0.02)
505
+ if isinstance(m, nn.Linear) and m.bias is not None:
506
+ nn.init.constant_(m.bias, 0)
507
+ elif isinstance(m, nn.LayerNorm):
508
+ nn.init.constant_(m.bias, 0)
509
+ nn.init.constant_(m.weight, 1.0)
510
+
511
+ @torch.jit.ignore
512
+ def no_weight_decay(self):
513
+ return {'pos_embed', 'cls_token'}
514
+
515
+ def forward(self, x):
516
+ B = x.shape[0]
517
+ # B C T H W -> B C T/pT H/pH W//pW
518
+ x = self.patch_embed(x)
519
+ latentT, latentH, latentW = x.shape[2], x.shape[3], x.shape[4]
520
+ # B C T/pT H/pH W//pW -> B (T/pT H/pH W//pW) C
521
+ x = x.flatten(2).transpose(1, 2)
522
+
523
+ if self.with_cls_token:
524
+ cls_tokens = self.cls_token.expand(B, -1, -1) # stole cls_tokens impl from Phil Wang, thanks
525
+ x = torch.cat((cls_tokens, x), dim=1)
526
+
527
+ if latentT != self.latent_length or latentH != self.latent_size or latentW != self.latent_size:
528
+ pos_embed = resize_pos_embed(
529
+ self.pos_embed[:, 1:, :],
530
+ src_shape=(self.latent_length, self.latent_size, self.latent_size),
531
+ target_shape=(latentT, latentH, latentW),
532
+ )
533
+ pos_embed = torch.cat((self.pos_embed[:, 0:1, :], pos_embed), dim=1)
534
+ else:
535
+ pos_embed = self.pos_embed
536
+
537
+ x = x + pos_embed
538
+ x = self.pos_drop(x)
539
+
540
+ for idx, blk in enumerate(self.blocks):
541
+ x = blk(x, feat_shape=(latentT, latentH, latentW))
542
+
543
+ x = self.norm(x)
544
+ x = self.last_layer(x)
545
+
546
+ if self.with_cls_token:
547
+ x = x[:, 1:] # remove cls_token
548
+
549
+ # B L C - > B , lT, lH, lW, zC
550
+ x = x.reshape(B, latentT, latentH, latentW, self.out_channels)
551
+
552
+ # B , lT, lH, lW, zC -> B, zC, lT, lH, lW
553
+ x = x.permute(0, 4, 1, 2, 3)
554
+ if self.norm_code:
555
+ prev_dtype = x.dtype
556
+ x = x.float()
557
+ x = x / torch.norm(x, dim=1, keepdim=True)
558
+ x = x.to(prev_dtype)
559
+ return x
560
+
561
+ def freeze_pretrain(self):
562
+ # Freeze all parameters
563
+ for param in self.parameters():
564
+ param.requires_grad = False
565
+
566
+
567
+ ###################################################
568
+ # ViTDecoder
569
+ ###################################################
570
+ class ViTDecoder(nn.Module):
571
+ """Vision Transformer with support for patch or hybrid CNN input stage"""
572
+
573
+ def __init__(
574
+ self,
575
+ video_size=256,
576
+ video_length=16,
577
+ patch_size=8,
578
+ patch_length=4,
579
+ in_chans=3,
580
+ z_chans=4,
581
+ double_z=True,
582
+ embed_dim=768,
583
+ depth=12,
584
+ num_heads=12,
585
+ mlp_ratio=4.0,
586
+ qkv_bias=False,
587
+ qk_scale=None,
588
+ drop_rate=0.0,
589
+ attn_drop_rate=0.0,
590
+ drop_path_rate=0.0,
591
+ norm_layer=nn.LayerNorm,
592
+ with_cls_token=True,
593
+ norm_code=False,
594
+ ln_in_attn=False,
595
+ conv_last_layer=False,
596
+ use_rope=False,
597
+ use_final_proj=False,
598
+ ):
599
+ super().__init__()
600
+
601
+ self.num_features = self.embed_dim = embed_dim # num_features for consistency with other models
602
+
603
+ self.latent_size = video_size // patch_size
604
+ self.latent_length = video_length // patch_length
605
+ self.patch_size = patch_size
606
+ self.patch_length = patch_length
607
+
608
+ self.proj_in = nn.Linear(z_chans, embed_dim)
609
+
610
+ num_patches = self.latent_size * self.latent_size * self.latent_length
611
+
612
+ self.with_cls_token = with_cls_token
613
+ if with_cls_token:
614
+ self.cls_token_nums = 1
615
+ self.cls_token = nn.Parameter(torch.zeros(1, 1, embed_dim))
616
+ else:
617
+ self.cls_token_nums = 0
618
+ self.cls_token = None
619
+
620
+ self.pos_embed = nn.Parameter(torch.zeros(1, num_patches + self.cls_token_nums, embed_dim))
621
+ self.pos_drop = nn.Dropout(p=drop_rate)
622
+
623
+ dpr = [x.item() for x in torch.linspace(0, drop_path_rate, depth)] # stochastic depth decay rule
624
+ self.blocks = nn.ModuleList(
625
+ [
626
+ Block(
627
+ dim=embed_dim,
628
+ num_heads=num_heads,
629
+ mlp_ratio=mlp_ratio,
630
+ qkv_bias=qkv_bias,
631
+ qk_scale=qk_scale,
632
+ drop=drop_rate,
633
+ attn_drop=attn_drop_rate,
634
+ drop_path=dpr[i],
635
+ norm_layer=norm_layer,
636
+ ln_in_attn=ln_in_attn,
637
+ use_rope=use_rope,
638
+ )
639
+ for i in range(depth)
640
+ ]
641
+ )
642
+ self.norm = norm_layer(embed_dim)
643
+
644
+ assert conv_last_layer == True, "Only support conv_last_layer=True"
645
+
646
+ self.unpatch_channels = embed_dim // (patch_size * patch_size * patch_length)
647
+ self.final_proj = nn.Identity()
648
+ self.final_norm = nn.Identity()
649
+
650
+ self.use_final_proj = use_final_proj
651
+ if self.use_final_proj:
652
+ self.unpatch_channels = 4
653
+ self.final_proj = nn.Linear(embed_dim, self.unpatch_channels * (patch_size * patch_size * patch_length), bias=True)
654
+ self.final_norm = norm_layer(self.unpatch_channels * (patch_size * patch_size * patch_length))
655
+
656
+ self.last_layer = nn.Conv3d(in_channels=self.unpatch_channels, out_channels=3, kernel_size=3, stride=1, padding=1)
657
+
658
+ trunc_normal_(self.pos_embed, std=0.02)
659
+
660
+ if self.with_cls_token:
661
+ trunc_normal_(self.cls_token, std=0.02)
662
+ self.apply(self._init_weights)
663
+
664
+ def _init_weights(self, m):
665
+ if isinstance(m, nn.Linear):
666
+ trunc_normal_(m.weight, std=0.02)
667
+ if isinstance(m, nn.Linear) and m.bias is not None:
668
+ nn.init.constant_(m.bias, 0)
669
+ elif isinstance(m, nn.LayerNorm):
670
+ nn.init.constant_(m.bias, 0)
671
+ nn.init.constant_(m.weight, 1.0)
672
+
673
+ @torch.jit.ignore
674
+ def no_weight_decay(self):
675
+ return {'pos_embed', 'cls_token'}
676
+
677
+ def forward(self, x):
678
+ B, C, latentT, latentH, latentW = x.shape # x: (B, C, latentT, latentH, latenW)
679
+ x = x.permute(0, 2, 3, 4, 1) # x: (B, latentT, latentH, latenW, C)
680
+
681
+ x = x.reshape(B, -1, C)
682
+
683
+ x = self.proj_in(x)
684
+
685
+ if self.with_cls_token:
686
+ cls_tokens = self.cls_token.expand(B, -1, -1) # stole cls_tokens impl from Phil Wang, thanks
687
+ x = torch.cat((cls_tokens, x), dim=1)
688
+
689
+ if latentT != self.latent_length or latentH != self.latent_size or latentW != self.latent_size:
690
+ pos_embed = resize_pos_embed(
691
+ self.pos_embed[:, 1:, :],
692
+ src_shape=(self.latent_length, self.latent_size, self.latent_size),
693
+ target_shape=(latentT, latentH, latentW),
694
+ )
695
+ pos_embed = torch.cat((self.pos_embed[:, 0:1, :], pos_embed), dim=1)
696
+ else:
697
+ pos_embed = self.pos_embed
698
+
699
+ x = x + pos_embed
700
+ x = self.pos_drop(x)
701
+
702
+ for idx, blk in enumerate(self.blocks):
703
+ x = blk(x, feat_shape=(latentT, latentH, latentW))
704
+
705
+ x = self.norm(x)
706
+
707
+ if self.with_cls_token:
708
+ x = x[:, 1:] # remove cls_token
709
+ # B L C - > B, lT, lH, lW, pT, pH, pW, C
710
+ if self.use_final_proj:
711
+ x = self.final_proj(x)
712
+ x = self.final_norm(x)
713
+ x = x.reshape(B, latentT, latentH, latentW, self.patch_length, self.patch_size, self.patch_size, self.unpatch_channels)
714
+ x = rearrange(x, 'B lT lH lW pT pH pW C -> B C (lT pT) (lH pH) (lW pW)', C=self.unpatch_channels)
715
+
716
+ x = self.last_layer(x)
717
+ return x
718
+
719
+
720
+ ###################################################
721
+ # DiagonalGaussianDistribution
722
+ ###################################################
723
+ class DiagonalGaussianDistribution(object):
724
+ def __init__(self, parameters, deterministic=False):
725
+ self.parameters = parameters
726
+ self.mean, self.logvar = torch.chunk(parameters, 2, dim=1)
727
+ self.logvar = torch.clamp(self.logvar, -30.0, 20.0)
728
+ self.deterministic = deterministic
729
+ self.std = torch.exp(0.5 * self.logvar)
730
+ self.var = torch.exp(self.logvar)
731
+ if self.deterministic:
732
+ self.var = self.std = torch.zeros_like(self.mean).to(device=self.parameters.device)
733
+
734
+ def sample(self):
735
+ x = self.mean + self.std * torch.randn(self.mean.shape).to(device=self.parameters.device)
736
+ return x
737
+
738
+ def kl(self, other=None):
739
+ if self.deterministic:
740
+ return torch.Tensor([0.0])
741
+ else:
742
+ if other is None:
743
+ return 0.5 * torch.sum(torch.pow(self.mean, 2) + self.var - 1.0 - self.logvar, dim=[1, 2, 3])
744
+ else:
745
+ return 0.5 * torch.sum(
746
+ torch.pow(self.mean - other.mean, 2) / other.var + self.var / other.var - 1.0 - self.logvar + other.logvar,
747
+ dim=[1, 2, 3],
748
+ )
749
+
750
+ def nll(self, sample, dims=[1, 2, 3]):
751
+ if self.deterministic:
752
+ return torch.Tensor([0.0])
753
+ logtwopi = np.log(2.0 * np.pi)
754
+ return 0.5 * torch.sum(logtwopi + self.logvar + torch.pow(sample - self.mean, 2) / self.var, dim=dims)
755
+
756
+ def mode(self):
757
+ return self.mean
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (353 Bytes). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (366 Bytes). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/entry.cpython-310.pyc ADDED
Binary file (3.29 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/entry.cpython-312.pyc ADDED
Binary file (5.82 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/flowcache.cpython-310.pyc ADDED
Binary file (16.9 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/flowcache.cpython-312.pyc ADDED
Binary file (30.3 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/pipeline.cpython-310.pyc ADDED
Binary file (2.72 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/pipeline.cpython-312.pyc ADDED
Binary file (3.8 kB). View file
 
FlowCache/FlowCache4MAGI-1/inference/pipeline/__pycache__/prompt_process.cpython-310.pyc ADDED
Binary file (6.06 kB). View file