Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/cachereuse.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/cachereuse.cpython-312.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/kv_compressor.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/utils.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/__init__.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/kv_compressor.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/kv_compressor.cpython-312.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/modeling.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/monkeypatch.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/utils.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/flowcache_metric_stats_2026-05-19_09-18-01.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/infer_2026-05-19_09-18-01.log +223 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/l1_rel_stats_2026-05-19_09-18-01.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/residual_stats_2026-05-19_09-18-01.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/flowcache_metric_stats_2026-05-19_09-49-14.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/infer_2026-05-19_09-49-14.log +223 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/l1_rel_stats_2026-05-19_09-49-14.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/residual_stats_2026-05-19_09-49-14.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_15-59-05/infer_2026-06-12_15-59-05.log +68 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-11-32/infer_2026-06-12_16-11-32.log +68 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-18-14/infer_2026-06-12_16-18-14.log +68 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-25-27/infer_2026-06-12_16-25-27.log +37 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-25-27/token_l2_change_rate_chunk0_2026-06-12_16-25-27.json +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/flowcache_physicsiq.sh +52 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/flowcache_vbench.sh +80 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/teacache_physicsiq.sh +53 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/teacache_vbench.sh +82 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/flowcache_t2v.sh +119 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/flowcache_v2v.sh +51 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/teacache_t2v.sh +50 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/teacache_v2v.sh +52 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/token_heterogeneity_t2v.sh +69 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/tools/__pycache__/plot_l1_rel.cpython-312.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/tools/__pycache__/plot_residual_norms.cpython-312.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/tools/__pycache__/plot_token_l2_change_rate_density.cpython-312.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/flowcache_physicsiq.yaml +36 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/flowcache_vbench.yaml +36 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/teacache_physicsiq.yaml +23 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/teacache_vbench.yaml +26 -0
- FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/single_run/config.yaml +15 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/config/sample/physicsiq.json +81 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/config/sample/vbench.json +81 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/config/single_run/flowcache_t2v.json +81 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/config/single_run/flowcache_v2v.json +86 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/inference/__init__.py +0 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/inference/__pycache__/__init__.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/inference/__pycache__/__init__.cpython-312.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/inference/common/__init__.py +37 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/inference/common/__pycache__/__init__.cpython-310.pyc +0 -0
- FlowCache/FlowCache4MAGI-1-dev3-motion/inference/common/__pycache__/__init__.cpython-312.pyc +0 -0
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/cachereuse.cpython-310.pyc
ADDED
|
Binary file (17.1 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/cachereuse.cpython-312.pyc
ADDED
|
Binary file (24.5 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/kv_compressor.cpython-310.pyc
ADDED
|
Binary file (9.3 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/cache/__pycache__/utils.cpython-310.pyc
ADDED
|
Binary file (9.84 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (394 Bytes). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/kv_compressor.cpython-310.pyc
ADDED
|
Binary file (6.59 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/kv_compressor.cpython-312.pyc
ADDED
|
Binary file (12.9 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/modeling.cpython-310.pyc
ADDED
|
Binary file (1.68 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/monkeypatch.cpython-310.pyc
ADDED
|
Binary file (706 Bytes). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/kvcompress/__pycache__/utils.cpython-310.pyc
ADDED
|
Binary file (4.68 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/flowcache_metric_stats_2026-05-19_09-18-01.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/infer_2026-05-19_09-18-01.log
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
|
| 2 |
+
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
|
| 3 |
+
[W519 09:18:09.994595319 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())
|
| 4 |
+
[2026-05-19 09:18:09,596 - INFO] Initialize torch distribution and model parallel successfully
|
| 5 |
+
[2026-05-19 09:18:09,597 - INFO] MagiConfig(model_config=ModelConfig(model_name='videodit_ardf', num_layers=34, hidden_size=3072, ffn_hidden_size=12288, num_attention_heads=24, num_query_groups=8, kv_channels=128, layernorm_epsilon=1e-06, apply_layernorm_1p=True, x_rescale_factor=1, half_channel_vae=False, params_dtype=torch.bfloat16, patch_size=2, t_patch_size=1, in_channels=16, out_channels=16, cond_hidden_ratio=0.25, caption_channels=4096, caption_max_length=800, xattn_cond_hidden_ratio=1.0, cond_gating_ratio=1.0, gated_linear_unit=False), runtime_config=RuntimeConfig(cfg_number=1, cfg_t_range=[0.0, 0.0217, 0.1, 0.3, 0.999], prev_chunk_scales=[1.5, 1.5, 1.5, 1.0, 1.0], text_scales=[7.5, 7.5, 7.5, 0.0, 0.0], noise2clean_kvrange=[], clean_chunk_kvrange=1, clean_t=0.9999, seed=1234, num_frames=240, video_size_h=720, video_size_w=720, num_steps=64, window_size=4, fps=24, chunk_width=6, t5_pretrained='./downloads/t5_pretrained', t5_device='cuda', vae_pretrained='./downloads/vae', scale_factor=0.18215, temporal_downsample_factor=4, load='./downloads/4.5B_distill'), engine_config=EngineConfig(distributed_backend='nccl', distributed_timeout_minutes=15, pp_size=1, cp_size=1, cp_strategy='none', ulysses_overlap_degree=1, fp8_quant=False, distill_nearly_clean_chunk_threshold=0.3, shortcut_mode='8,16,16', distill=True, kv_offload=False, enable_cuda_graph=False))
|
| 6 |
+
[2026-05-19 09:18:09,597 - INFO] Precompute validation prompt embeddings
|
| 7 |
+
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
|
| 8 |
+
Loading additional config: {'rel_l1_thresh': 0.015, 'warmup_steps': 5, 'discard_nearly_clean_chunk': True, 'compress_kv_cache': True, 'total_cache_chunk_nums': 5, 'compress_strategy': 'token', 'mix_lambda': 0.07, 'query_granularity': 'frame', 'score_weighting_method': 'no_weight', 'power': 3, 'log': True, 'print_peak_memory': True, 'debug': False}
|
| 9 |
+
Added to args: rel_l1_thresh = 0.015
|
| 10 |
+
Added to args: warmup_steps = 5
|
| 11 |
+
Added to args: discard_nearly_clean_chunk = True
|
| 12 |
+
Added to args: compress_kv_cache = True
|
| 13 |
+
Added to args: total_cache_chunk_nums = 5
|
| 14 |
+
Added to args: compress_strategy = token
|
| 15 |
+
Added to args: mix_lambda = 0.07
|
| 16 |
+
Added to args: query_granularity = frame
|
| 17 |
+
Added to args: score_weighting_method = no_weight
|
| 18 |
+
Added to args: power = 3
|
| 19 |
+
Added to args: log = True
|
| 20 |
+
Added to args: print_peak_memory = True
|
| 21 |
+
Added to args: debug = False
|
| 22 |
+
Running on GPU: NVIDIA H800
|
| 23 |
+
GPU Memory before pipeline: 0.00 GB
|
| 24 |
+
|
| 25 |
+
[2026-05-19 09:18:32,924 - INFO] (cp, pp) rank (0, 0): param count 4459898128, model size 8.34 GB
|
| 26 |
+
[2026-05-19 09:18:32,925 - INFO] Build DiTModel successfully
|
| 27 |
+
[2026-05-19 09:18:32,925 - INFO] After build_dit_model, memory allocated: 0.04 GB, memory reserved: 0.08 GB
|
| 28 |
+
[2026-05-19 09:18:32,925 - INFO] load inference_weight.distill weight from ./downloads/4.5B_distill/inference_weight.distill
|
| 29 |
+
|
| 30 |
+
[2026-05-19 09:18:34,982 - INFO] Load Weight Missing Keys: []
|
| 31 |
+
[2026-05-19 09:18:34,982 - INFO] Load Weight Unexpected Keys: []
|
| 32 |
+
[2026-05-19 09:18:35,401 - INFO] After load_checkpoint, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 33 |
+
[2026-05-19 09:18:35,403 - INFO] After high_precision_promoter, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 34 |
+
[2026-05-19 09:18:35,518 - INFO] Load checkpoint successfully
|
| 35 |
+
[2026-05-19 09:18:35,519 - INFO] Begin to generate per chunk
|
| 36 |
+
[2026-05-19 09:18:35,519 - INFO] special_token = ['HQ_TOKEN', 'DURATION_TOKEN']
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
[2026-05-19 09:26:50,889 - INFO] Saved residual diff stats to outputs/a_woman_dancing/residual_stats_2026-05-19_09-18-01.json
|
| 40 |
+
[2026-05-19 09:26:50,905 - INFO] Saved L1 relative change stats to outputs/a_woman_dancing/l1_rel_stats_2026-05-19_09-18-01.json
|
| 41 |
+
[2026-05-19 09:26:54,663 - INFO] Finish MagiPipeline, max memory allocated: 24.54 GB, max memory reserved: 29.64 GB
|
| 42 |
+
Using no weighting method
|
| 43 |
+
Using no weighting method
|
| 44 |
+
Using no weighting method
|
| 45 |
+
Using no weighting method
|
| 46 |
+
Using no weighting method
|
| 47 |
+
Using no weighting method
|
| 48 |
+
Using no weighting method
|
| 49 |
+
Using no weighting method
|
| 50 |
+
Using no weighting method
|
| 51 |
+
Using no weighting method
|
| 52 |
+
Using no weighting method
|
| 53 |
+
Using no weighting method
|
| 54 |
+
Using no weighting method
|
| 55 |
+
Using no weighting method
|
| 56 |
+
Using no weighting method
|
| 57 |
+
Using no weighting method
|
| 58 |
+
Using no weighting method
|
| 59 |
+
Using no weighting method
|
| 60 |
+
Using no weighting method
|
| 61 |
+
Using no weighting method
|
| 62 |
+
Using no weighting method
|
| 63 |
+
Using no weighting method
|
| 64 |
+
Using no weighting method
|
| 65 |
+
Using no weighting method
|
| 66 |
+
Using no weighting method
|
| 67 |
+
Using no weighting method
|
| 68 |
+
Using no weighting method
|
| 69 |
+
Using no weighting method
|
| 70 |
+
Using no weighting method
|
| 71 |
+
Using no weighting method
|
| 72 |
+
Using no weighting method
|
| 73 |
+
Using no weighting method
|
| 74 |
+
Using no weighting method
|
| 75 |
+
Using no weighting method
|
| 76 |
+
Using no weighting method
|
| 77 |
+
Using no weighting method
|
| 78 |
+
Using no weighting method
|
| 79 |
+
Using no weighting method
|
| 80 |
+
Using no weighting method
|
| 81 |
+
Using no weighting method
|
| 82 |
+
Using no weighting method
|
| 83 |
+
Using no weighting method
|
| 84 |
+
Using no weighting method
|
| 85 |
+
Using no weighting method
|
| 86 |
+
Using no weighting method
|
| 87 |
+
Using no weighting method
|
| 88 |
+
Using no weighting method
|
| 89 |
+
Using no weighting method
|
| 90 |
+
Using no weighting method
|
| 91 |
+
Using no weighting method
|
| 92 |
+
Using no weighting method
|
| 93 |
+
Using no weighting method
|
| 94 |
+
Using no weighting method
|
| 95 |
+
Using no weighting method
|
| 96 |
+
Using no weighting method
|
| 97 |
+
Using no weighting method
|
| 98 |
+
Using no weighting method
|
| 99 |
+
Using no weighting method
|
| 100 |
+
Using no weighting method
|
| 101 |
+
Using no weighting method
|
| 102 |
+
Using no weighting method
|
| 103 |
+
Using no weighting method
|
| 104 |
+
Using no weighting method
|
| 105 |
+
Using no weighting method
|
| 106 |
+
Using no weighting method
|
| 107 |
+
Using no weighting method
|
| 108 |
+
Using no weighting method
|
| 109 |
+
Using no weighting method
|
| 110 |
+
Using no weighting method
|
| 111 |
+
Using no weighting method
|
| 112 |
+
Using no weighting method
|
| 113 |
+
Using no weighting method
|
| 114 |
+
Using no weighting method
|
| 115 |
+
Using no weighting method
|
| 116 |
+
Using no weighting method
|
| 117 |
+
Using no weighting method
|
| 118 |
+
Using no weighting method
|
| 119 |
+
Using no weighting method
|
| 120 |
+
Using no weighting method
|
| 121 |
+
Using no weighting method
|
| 122 |
+
Using no weighting method
|
| 123 |
+
Using no weighting method
|
| 124 |
+
Using no weighting method
|
| 125 |
+
Using no weighting method
|
| 126 |
+
Using no weighting method
|
| 127 |
+
Using no weighting method
|
| 128 |
+
Using no weighting method
|
| 129 |
+
Using no weighting method
|
| 130 |
+
Using no weighting method
|
| 131 |
+
Using no weighting method
|
| 132 |
+
Using no weighting method
|
| 133 |
+
Using no weighting method
|
| 134 |
+
Using no weighting method
|
| 135 |
+
Using no weighting method
|
| 136 |
+
Using no weighting method
|
| 137 |
+
Using no weighting method
|
| 138 |
+
Using no weighting method
|
| 139 |
+
Using no weighting method
|
| 140 |
+
Using no weighting method
|
| 141 |
+
Using no weighting method
|
| 142 |
+
Using no weighting method
|
| 143 |
+
Using no weighting method
|
| 144 |
+
Using no weighting method
|
| 145 |
+
Using no weighting method
|
| 146 |
+
Using no weighting method
|
| 147 |
+
Using no weighting method
|
| 148 |
+
Using no weighting method
|
| 149 |
+
Using no weighting method
|
| 150 |
+
Using no weighting method
|
| 151 |
+
Using no weighting method
|
| 152 |
+
Using no weighting method
|
| 153 |
+
Using no weighting method
|
| 154 |
+
Using no weighting method
|
| 155 |
+
Using no weighting method
|
| 156 |
+
Using no weighting method
|
| 157 |
+
Using no weighting method
|
| 158 |
+
Using no weighting method
|
| 159 |
+
Using no weighting method
|
| 160 |
+
Using no weighting method
|
| 161 |
+
Using no weighting method
|
| 162 |
+
Using no weighting method
|
| 163 |
+
Using no weighting method
|
| 164 |
+
Using no weighting method
|
| 165 |
+
Using no weighting method
|
| 166 |
+
Using no weighting method
|
| 167 |
+
Using no weighting method
|
| 168 |
+
Using no weighting method
|
| 169 |
+
Using no weighting method
|
| 170 |
+
Using no weighting method
|
| 171 |
+
Using no weighting method
|
| 172 |
+
Using no weighting method
|
| 173 |
+
Using no weighting method
|
| 174 |
+
Using no weighting method
|
| 175 |
+
Using no weighting method
|
| 176 |
+
Using no weighting method
|
| 177 |
+
Using no weighting method
|
| 178 |
+
Using no weighting method
|
| 179 |
+
Using no weighting method
|
| 180 |
+
Using no weighting method
|
| 181 |
+
Using no weighting method
|
| 182 |
+
Using no weighting method
|
| 183 |
+
Using no weighting method
|
| 184 |
+
Using no weighting method
|
| 185 |
+
Using no weighting method
|
| 186 |
+
Using no weighting method
|
| 187 |
+
Using no weighting method
|
| 188 |
+
Using no weighting method
|
| 189 |
+
Using no weighting method
|
| 190 |
+
Using no weighting method
|
| 191 |
+
Using no weighting method
|
| 192 |
+
Using no weighting method
|
| 193 |
+
Using no weighting method
|
| 194 |
+
Using no weighting method
|
| 195 |
+
Using no weighting method
|
| 196 |
+
Using no weighting method
|
| 197 |
+
Using no weighting method
|
| 198 |
+
Using no weighting method
|
| 199 |
+
Using no weighting method
|
| 200 |
+
Using no weighting method
|
| 201 |
+
Using no weighting method
|
| 202 |
+
Using no weighting method
|
| 203 |
+
Using no weighting method
|
| 204 |
+
Using no weighting method
|
| 205 |
+
Using no weighting method
|
| 206 |
+
Using no weighting method
|
| 207 |
+
Using no weighting method
|
| 208 |
+
Using no weighting method
|
| 209 |
+
Using no weighting method
|
| 210 |
+
Using no weighting method
|
| 211 |
+
Using no weighting method
|
| 212 |
+
Saved FlowCache metric stats to outputs/a_woman_dancing/flowcache_metric_stats_2026-05-19_09-18-01.json
|
| 213 |
+
✅ Video saved successfully.
|
| 214 |
+
|
| 215 |
+
==================================================
|
| 216 |
+
GPU Memory Usage Summary:
|
| 217 |
+
Peak memory allocated: 24.54 GB
|
| 218 |
+
Current memory allocated: 19.21 GB
|
| 219 |
+
Cached memory reserved: 21.04 GB
|
| 220 |
+
Total GPU memory: 79.11 GB
|
| 221 |
+
Peak memory usage: 31.0%
|
| 222 |
+
==================================================
|
| 223 |
+
Memory after cache cleanup: 0.16 GB
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/l1_rel_stats_2026-05-19_09-18-01.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing/residual_stats_2026-05-19_09-18-01.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/flowcache_metric_stats_2026-05-19_09-49-14.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/infer_2026-05-19_09-49-14.log
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
|
| 2 |
+
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
|
| 3 |
+
[W519 09:49:21.233572971 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())
|
| 4 |
+
[2026-05-19 09:49:21,835 - INFO] Initialize torch distribution and model parallel successfully
|
| 5 |
+
[2026-05-19 09:49:21,835 - INFO] MagiConfig(model_config=ModelConfig(model_name='videodit_ardf', num_layers=34, hidden_size=3072, ffn_hidden_size=12288, num_attention_heads=24, num_query_groups=8, kv_channels=128, layernorm_epsilon=1e-06, apply_layernorm_1p=True, x_rescale_factor=1, half_channel_vae=False, params_dtype=torch.bfloat16, patch_size=2, t_patch_size=1, in_channels=16, out_channels=16, cond_hidden_ratio=0.25, caption_channels=4096, caption_max_length=800, xattn_cond_hidden_ratio=1.0, cond_gating_ratio=1.0, gated_linear_unit=False), runtime_config=RuntimeConfig(cfg_number=1, cfg_t_range=[0.0, 0.0217, 0.1, 0.3, 0.999], prev_chunk_scales=[1.5, 1.5, 1.5, 1.0, 1.0], text_scales=[7.5, 7.5, 7.5, 0.0, 0.0], noise2clean_kvrange=[], clean_chunk_kvrange=1, clean_t=0.9999, seed=1234, num_frames=240, video_size_h=720, video_size_w=720, num_steps=64, window_size=4, fps=24, chunk_width=6, t5_pretrained='./downloads/t5_pretrained', t5_device='cuda', vae_pretrained='./downloads/vae', scale_factor=0.18215, temporal_downsample_factor=4, load='./downloads/4.5B_distill'), engine_config=EngineConfig(distributed_backend='nccl', distributed_timeout_minutes=15, pp_size=1, cp_size=1, cp_strategy='none', ulysses_overlap_degree=1, fp8_quant=False, distill_nearly_clean_chunk_threshold=0.3, shortcut_mode='8,16,16', distill=True, kv_offload=False, enable_cuda_graph=False))
|
| 6 |
+
[2026-05-19 09:49:21,835 - INFO] Precompute validation prompt embeddings
|
| 7 |
+
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
|
| 8 |
+
Loading additional config: {'rel_l1_thresh': 0.015, 'warmup_steps': 5, 'discard_nearly_clean_chunk': True, 'compress_kv_cache': True, 'total_cache_chunk_nums': 5, 'compress_strategy': 'token', 'mix_lambda': 0.07, 'query_granularity': 'frame', 'score_weighting_method': 'no_weight', 'power': 3, 'log': True, 'print_peak_memory': True, 'debug': False}
|
| 9 |
+
Added to args: rel_l1_thresh = 0.015
|
| 10 |
+
Added to args: warmup_steps = 5
|
| 11 |
+
Added to args: discard_nearly_clean_chunk = True
|
| 12 |
+
Added to args: compress_kv_cache = True
|
| 13 |
+
Added to args: total_cache_chunk_nums = 5
|
| 14 |
+
Added to args: compress_strategy = token
|
| 15 |
+
Added to args: mix_lambda = 0.07
|
| 16 |
+
Added to args: query_granularity = frame
|
| 17 |
+
Added to args: score_weighting_method = no_weight
|
| 18 |
+
Added to args: power = 3
|
| 19 |
+
Added to args: log = True
|
| 20 |
+
Added to args: print_peak_memory = True
|
| 21 |
+
Added to args: debug = False
|
| 22 |
+
Running on GPU: NVIDIA H800
|
| 23 |
+
GPU Memory before pipeline: 0.00 GB
|
| 24 |
+
|
| 25 |
+
[2026-05-19 09:49:41,988 - INFO] (cp, pp) rank (0, 0): param count 4459898128, model size 8.34 GB
|
| 26 |
+
[2026-05-19 09:49:41,988 - INFO] Build DiTModel successfully
|
| 27 |
+
[2026-05-19 09:49:41,988 - INFO] After build_dit_model, memory allocated: 0.04 GB, memory reserved: 0.08 GB
|
| 28 |
+
[2026-05-19 09:49:41,988 - INFO] load inference_weight.distill weight from ./downloads/4.5B_distill/inference_weight.distill
|
| 29 |
+
|
| 30 |
+
[2026-05-19 09:49:43,746 - INFO] Load Weight Missing Keys: []
|
| 31 |
+
[2026-05-19 09:49:43,747 - INFO] Load Weight Unexpected Keys: []
|
| 32 |
+
[2026-05-19 09:49:43,899 - INFO] After load_checkpoint, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 33 |
+
[2026-05-19 09:49:43,902 - INFO] After high_precision_promoter, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 34 |
+
[2026-05-19 09:49:44,004 - INFO] Load checkpoint successfully
|
| 35 |
+
[2026-05-19 09:49:44,005 - INFO] Begin to generate per chunk
|
| 36 |
+
[2026-05-19 09:49:44,005 - INFO] special_token = ['HQ_TOKEN', 'DURATION_TOKEN']
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
[2026-05-19 09:58:00,789 - INFO] Saved residual diff stats to outputs/a_woman_dancing_2026-05-19_09-49-14/residual_stats_2026-05-19_09-49-14.json
|
| 40 |
+
[2026-05-19 09:58:00,806 - INFO] Saved L1 relative change stats to outputs/a_woman_dancing_2026-05-19_09-49-14/l1_rel_stats_2026-05-19_09-49-14.json
|
| 41 |
+
[2026-05-19 09:58:04,567 - INFO] Finish MagiPipeline, max memory allocated: 24.54 GB, max memory reserved: 29.64 GB
|
| 42 |
+
Using no weighting method
|
| 43 |
+
Using no weighting method
|
| 44 |
+
Using no weighting method
|
| 45 |
+
Using no weighting method
|
| 46 |
+
Using no weighting method
|
| 47 |
+
Using no weighting method
|
| 48 |
+
Using no weighting method
|
| 49 |
+
Using no weighting method
|
| 50 |
+
Using no weighting method
|
| 51 |
+
Using no weighting method
|
| 52 |
+
Using no weighting method
|
| 53 |
+
Using no weighting method
|
| 54 |
+
Using no weighting method
|
| 55 |
+
Using no weighting method
|
| 56 |
+
Using no weighting method
|
| 57 |
+
Using no weighting method
|
| 58 |
+
Using no weighting method
|
| 59 |
+
Using no weighting method
|
| 60 |
+
Using no weighting method
|
| 61 |
+
Using no weighting method
|
| 62 |
+
Using no weighting method
|
| 63 |
+
Using no weighting method
|
| 64 |
+
Using no weighting method
|
| 65 |
+
Using no weighting method
|
| 66 |
+
Using no weighting method
|
| 67 |
+
Using no weighting method
|
| 68 |
+
Using no weighting method
|
| 69 |
+
Using no weighting method
|
| 70 |
+
Using no weighting method
|
| 71 |
+
Using no weighting method
|
| 72 |
+
Using no weighting method
|
| 73 |
+
Using no weighting method
|
| 74 |
+
Using no weighting method
|
| 75 |
+
Using no weighting method
|
| 76 |
+
Using no weighting method
|
| 77 |
+
Using no weighting method
|
| 78 |
+
Using no weighting method
|
| 79 |
+
Using no weighting method
|
| 80 |
+
Using no weighting method
|
| 81 |
+
Using no weighting method
|
| 82 |
+
Using no weighting method
|
| 83 |
+
Using no weighting method
|
| 84 |
+
Using no weighting method
|
| 85 |
+
Using no weighting method
|
| 86 |
+
Using no weighting method
|
| 87 |
+
Using no weighting method
|
| 88 |
+
Using no weighting method
|
| 89 |
+
Using no weighting method
|
| 90 |
+
Using no weighting method
|
| 91 |
+
Using no weighting method
|
| 92 |
+
Using no weighting method
|
| 93 |
+
Using no weighting method
|
| 94 |
+
Using no weighting method
|
| 95 |
+
Using no weighting method
|
| 96 |
+
Using no weighting method
|
| 97 |
+
Using no weighting method
|
| 98 |
+
Using no weighting method
|
| 99 |
+
Using no weighting method
|
| 100 |
+
Using no weighting method
|
| 101 |
+
Using no weighting method
|
| 102 |
+
Using no weighting method
|
| 103 |
+
Using no weighting method
|
| 104 |
+
Using no weighting method
|
| 105 |
+
Using no weighting method
|
| 106 |
+
Using no weighting method
|
| 107 |
+
Using no weighting method
|
| 108 |
+
Using no weighting method
|
| 109 |
+
Using no weighting method
|
| 110 |
+
Using no weighting method
|
| 111 |
+
Using no weighting method
|
| 112 |
+
Using no weighting method
|
| 113 |
+
Using no weighting method
|
| 114 |
+
Using no weighting method
|
| 115 |
+
Using no weighting method
|
| 116 |
+
Using no weighting method
|
| 117 |
+
Using no weighting method
|
| 118 |
+
Using no weighting method
|
| 119 |
+
Using no weighting method
|
| 120 |
+
Using no weighting method
|
| 121 |
+
Using no weighting method
|
| 122 |
+
Using no weighting method
|
| 123 |
+
Using no weighting method
|
| 124 |
+
Using no weighting method
|
| 125 |
+
Using no weighting method
|
| 126 |
+
Using no weighting method
|
| 127 |
+
Using no weighting method
|
| 128 |
+
Using no weighting method
|
| 129 |
+
Using no weighting method
|
| 130 |
+
Using no weighting method
|
| 131 |
+
Using no weighting method
|
| 132 |
+
Using no weighting method
|
| 133 |
+
Using no weighting method
|
| 134 |
+
Using no weighting method
|
| 135 |
+
Using no weighting method
|
| 136 |
+
Using no weighting method
|
| 137 |
+
Using no weighting method
|
| 138 |
+
Using no weighting method
|
| 139 |
+
Using no weighting method
|
| 140 |
+
Using no weighting method
|
| 141 |
+
Using no weighting method
|
| 142 |
+
Using no weighting method
|
| 143 |
+
Using no weighting method
|
| 144 |
+
Using no weighting method
|
| 145 |
+
Using no weighting method
|
| 146 |
+
Using no weighting method
|
| 147 |
+
Using no weighting method
|
| 148 |
+
Using no weighting method
|
| 149 |
+
Using no weighting method
|
| 150 |
+
Using no weighting method
|
| 151 |
+
Using no weighting method
|
| 152 |
+
Using no weighting method
|
| 153 |
+
Using no weighting method
|
| 154 |
+
Using no weighting method
|
| 155 |
+
Using no weighting method
|
| 156 |
+
Using no weighting method
|
| 157 |
+
Using no weighting method
|
| 158 |
+
Using no weighting method
|
| 159 |
+
Using no weighting method
|
| 160 |
+
Using no weighting method
|
| 161 |
+
Using no weighting method
|
| 162 |
+
Using no weighting method
|
| 163 |
+
Using no weighting method
|
| 164 |
+
Using no weighting method
|
| 165 |
+
Using no weighting method
|
| 166 |
+
Using no weighting method
|
| 167 |
+
Using no weighting method
|
| 168 |
+
Using no weighting method
|
| 169 |
+
Using no weighting method
|
| 170 |
+
Using no weighting method
|
| 171 |
+
Using no weighting method
|
| 172 |
+
Using no weighting method
|
| 173 |
+
Using no weighting method
|
| 174 |
+
Using no weighting method
|
| 175 |
+
Using no weighting method
|
| 176 |
+
Using no weighting method
|
| 177 |
+
Using no weighting method
|
| 178 |
+
Using no weighting method
|
| 179 |
+
Using no weighting method
|
| 180 |
+
Using no weighting method
|
| 181 |
+
Using no weighting method
|
| 182 |
+
Using no weighting method
|
| 183 |
+
Using no weighting method
|
| 184 |
+
Using no weighting method
|
| 185 |
+
Using no weighting method
|
| 186 |
+
Using no weighting method
|
| 187 |
+
Using no weighting method
|
| 188 |
+
Using no weighting method
|
| 189 |
+
Using no weighting method
|
| 190 |
+
Using no weighting method
|
| 191 |
+
Using no weighting method
|
| 192 |
+
Using no weighting method
|
| 193 |
+
Using no weighting method
|
| 194 |
+
Using no weighting method
|
| 195 |
+
Using no weighting method
|
| 196 |
+
Using no weighting method
|
| 197 |
+
Using no weighting method
|
| 198 |
+
Using no weighting method
|
| 199 |
+
Using no weighting method
|
| 200 |
+
Using no weighting method
|
| 201 |
+
Using no weighting method
|
| 202 |
+
Using no weighting method
|
| 203 |
+
Using no weighting method
|
| 204 |
+
Using no weighting method
|
| 205 |
+
Using no weighting method
|
| 206 |
+
Using no weighting method
|
| 207 |
+
Using no weighting method
|
| 208 |
+
Using no weighting method
|
| 209 |
+
Using no weighting method
|
| 210 |
+
Using no weighting method
|
| 211 |
+
Using no weighting method
|
| 212 |
+
Saved FlowCache metric stats to outputs/a_woman_dancing_2026-05-19_09-49-14/flowcache_metric_stats_2026-05-19_09-49-14.json
|
| 213 |
+
✅ Video saved successfully.
|
| 214 |
+
|
| 215 |
+
==================================================
|
| 216 |
+
GPU Memory Usage Summary:
|
| 217 |
+
Peak memory allocated: 24.54 GB
|
| 218 |
+
Current memory allocated: 19.21 GB
|
| 219 |
+
Cached memory reserved: 21.04 GB
|
| 220 |
+
Total GPU memory: 79.11 GB
|
| 221 |
+
Peak memory usage: 31.0%
|
| 222 |
+
==================================================
|
| 223 |
+
Memory after cache cleanup: 0.16 GB
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/l1_rel_stats_2026-05-19_09-49-14.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_2026-05-19_09-49-14/residual_stats_2026-05-19_09-49-14.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_15-59-05/infer_2026-06-12_15-59-05.log
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
|
| 2 |
+
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
|
| 3 |
+
[W612 15:59:24.671841781 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())
|
| 4 |
+
[2026-06-12 15:59:24,380 - INFO] Initialize torch distribution and model parallel successfully
|
| 5 |
+
[2026-06-12 15:59:24,380 - INFO] MagiConfig(model_config=ModelConfig(model_name='videodit_ardf', num_layers=34, hidden_size=3072, ffn_hidden_size=12288, num_attention_heads=24, num_query_groups=8, kv_channels=128, layernorm_epsilon=1e-06, apply_layernorm_1p=True, x_rescale_factor=1, half_channel_vae=False, params_dtype=torch.bfloat16, patch_size=2, t_patch_size=1, in_channels=16, out_channels=16, cond_hidden_ratio=0.25, caption_channels=4096, caption_max_length=800, xattn_cond_hidden_ratio=1.0, cond_gating_ratio=1.0, gated_linear_unit=False), runtime_config=RuntimeConfig(cfg_number=1, cfg_t_range=[0.0, 0.0217, 0.1, 0.3, 0.999], prev_chunk_scales=[1.5, 1.5, 1.5, 1.0, 1.0], text_scales=[7.5, 7.5, 7.5, 0.0, 0.0], noise2clean_kvrange=[], clean_chunk_kvrange=1, clean_t=0.9999, seed=1234, num_frames=240, video_size_h=720, video_size_w=720, num_steps=64, window_size=4, fps=24, chunk_width=6, t5_pretrained='./downloads/t5_pretrained', t5_device='cuda', vae_pretrained='./downloads/vae', scale_factor=0.18215, temporal_downsample_factor=4, load='./downloads/4.5B_distill'), engine_config=EngineConfig(distributed_backend='nccl', distributed_timeout_minutes=15, pp_size=1, cp_size=1, cp_strategy='none', ulysses_overlap_degree=1, fp8_quant=False, distill_nearly_clean_chunk_threshold=0.3, shortcut_mode='8,16,16', distill=True, kv_offload=False, enable_cuda_graph=False))
|
| 6 |
+
[2026-06-12 15:59:24,380 - INFO] Precompute validation prompt embeddings
|
| 7 |
+
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
|
| 8 |
+
Running on GPU: NVIDIA H800
|
| 9 |
+
GPU Memory before pipeline: 0.00 GB allocated
|
| 10 |
+
|
| 11 |
+
[2026-06-12 16:01:00,822 - INFO] (cp, pp) rank (0, 0): param count 4459898128, model size 8.34 GB
|
| 12 |
+
[2026-06-12 16:01:00,822 - INFO] Build DiTModel successfully
|
| 13 |
+
[2026-06-12 16:01:00,822 - INFO] After build_dit_model, memory allocated: 0.04 GB, memory reserved: 0.08 GB
|
| 14 |
+
[2026-06-12 16:01:00,822 - INFO] load inference_weight.distill weight from ./downloads/4.5B_distill/inference_weight.distill
|
| 15 |
+
|
| 16 |
+
[2026-06-12 16:01:23,540 - INFO] Load Weight Missing Keys: []
|
| 17 |
+
[2026-06-12 16:01:23,541 - INFO] Load Weight Unexpected Keys: []
|
| 18 |
+
[2026-06-12 16:01:23,724 - INFO] After load_checkpoint, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 19 |
+
[2026-06-12 16:01:23,726 - INFO] After high_precision_promoter, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 20 |
+
[2026-06-12 16:01:23,815 - INFO] Load checkpoint successfully
|
| 21 |
+
[2026-06-12 16:01:23,815 - INFO] Begin to generate per chunk
|
| 22 |
+
[2026-06-12 16:01:23,815 - INFO] special_token = ['HQ_TOKEN', 'DURATION_TOKEN']
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/entry.py", line 117, in <module>
|
| 26 |
+
[rank0]: main()
|
| 27 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/entry.py", line 81, in main
|
| 28 |
+
[rank0]: pipeline.run_text_to_video(prompt=args.prompt, output_path=args.output_path)
|
| 29 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 47, in run_text_to_video
|
| 30 |
+
[rank0]: self._run(prompt, None, output_path)
|
| 31 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 61, in _run
|
| 32 |
+
[rank0]: [
|
| 33 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 61, in <listcomp>
|
| 34 |
+
[rank0]: [
|
| 35 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1357, in generate_per_chunk
|
| 36 |
+
[rank0]: for _, _, chunk in sample_transport.walk():
|
| 37 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1327, in walk
|
| 38 |
+
[rank0]: velocity = self.forward_velocity(work_status.infer_idx, work_status.cur_denoise_step + 1)
|
| 39 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1171, in forward_velocity
|
| 40 |
+
[rank0]: velocity = forward_fn(
|
| 41 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_model.py", line 573, in forward_dispatcher
|
| 42 |
+
[rank0]: cat_out = self.forward(
|
| 43 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
|
| 44 |
+
[rank0]: return func(*args, **kwargs)
|
| 45 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_model.py", line 399, in forward
|
| 46 |
+
[rank0]: x = self.videodit_blocks.forward(
|
| 47 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
|
| 48 |
+
[rank0]: return func(*args, **kwargs)
|
| 49 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1585, in forward
|
| 50 |
+
[rank0]: hidden_states = layer(
|
| 51 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
|
| 52 |
+
[rank0]: return self._call_impl(*args, **kwargs)
|
| 53 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
|
| 54 |
+
[rank0]: return forward_call(*args, **kwargs)
|
| 55 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1473, in forward
|
| 56 |
+
[rank0]: hidden_states = self.attn_post_process(core_attn_out, cross_attn_out, residual, condition, condition_map)
|
| 57 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1486, in attn_post_process
|
| 58 |
+
[rank0]: hidden_states = self.gating_and_mlp(hidden_states, residual, condition, condition_map)
|
| 59 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1520, in gating_and_mlp
|
| 60 |
+
[rank0]: hidden_states = self.mlp(hidden_states)
|
| 61 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
|
| 62 |
+
[rank0]: return self._call_impl(*args, **kwargs)
|
| 63 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
|
| 64 |
+
[rank0]: return forward_call(*args, **kwargs)
|
| 65 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 554, in forward
|
| 66 |
+
[rank0]: hidden_states = torch.nn.functional.gelu(hidden_states)
|
| 67 |
+
[rank0]: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.67 GiB. GPU 0 has a total capacity of 79.11 GiB of which 1.66 GiB is free. Including non-PyTorch memory, this process has 30.81 GiB memory in use. Process 565617 has 46.62 GiB memory in use. Of the allocated memory 29.34 GiB is allocated by PyTorch, and 427.19 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
|
| 68 |
+
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-11-32/infer_2026-06-12_16-11-32.log
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
|
| 2 |
+
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
|
| 3 |
+
[W612 16:11:38.402380501 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())
|
| 4 |
+
[2026-06-12 16:11:38,097 - INFO] Initialize torch distribution and model parallel successfully
|
| 5 |
+
[2026-06-12 16:11:38,097 - INFO] MagiConfig(model_config=ModelConfig(model_name='videodit_ardf', num_layers=34, hidden_size=3072, ffn_hidden_size=12288, num_attention_heads=24, num_query_groups=8, kv_channels=128, layernorm_epsilon=1e-06, apply_layernorm_1p=True, x_rescale_factor=1, half_channel_vae=False, params_dtype=torch.bfloat16, patch_size=2, t_patch_size=1, in_channels=16, out_channels=16, cond_hidden_ratio=0.25, caption_channels=4096, caption_max_length=800, xattn_cond_hidden_ratio=1.0, cond_gating_ratio=1.0, gated_linear_unit=False), runtime_config=RuntimeConfig(cfg_number=1, cfg_t_range=[0.0, 0.0217, 0.1, 0.3, 0.999], prev_chunk_scales=[1.5, 1.5, 1.5, 1.0, 1.0], text_scales=[7.5, 7.5, 7.5, 0.0, 0.0], noise2clean_kvrange=[], clean_chunk_kvrange=1, clean_t=0.9999, seed=1234, num_frames=240, video_size_h=720, video_size_w=720, num_steps=64, window_size=4, fps=24, chunk_width=6, t5_pretrained='./downloads/t5_pretrained', t5_device='cuda', vae_pretrained='./downloads/vae', scale_factor=0.18215, temporal_downsample_factor=4, load='./downloads/4.5B_distill'), engine_config=EngineConfig(distributed_backend='nccl', distributed_timeout_minutes=15, pp_size=1, cp_size=1, cp_strategy='none', ulysses_overlap_degree=1, fp8_quant=False, distill_nearly_clean_chunk_threshold=0.3, shortcut_mode='8,16,16', distill=True, kv_offload=False, enable_cuda_graph=False))
|
| 6 |
+
[2026-06-12 16:11:38,097 - INFO] Precompute validation prompt embeddings
|
| 7 |
+
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
|
| 8 |
+
Running on GPU: NVIDIA H800
|
| 9 |
+
GPU Memory before pipeline: 0.00 GB allocated
|
| 10 |
+
|
| 11 |
+
[2026-06-12 16:11:58,165 - INFO] (cp, pp) rank (0, 0): param count 4459898128, model size 8.34 GB
|
| 12 |
+
[2026-06-12 16:11:58,165 - INFO] Build DiTModel successfully
|
| 13 |
+
[2026-06-12 16:11:58,165 - INFO] After build_dit_model, memory allocated: 0.04 GB, memory reserved: 0.08 GB
|
| 14 |
+
[2026-06-12 16:11:58,166 - INFO] load inference_weight.distill weight from ./downloads/4.5B_distill/inference_weight.distill
|
| 15 |
+
|
| 16 |
+
[2026-06-12 16:12:01,980 - INFO] Load Weight Missing Keys: []
|
| 17 |
+
[2026-06-12 16:12:01,981 - INFO] Load Weight Unexpected Keys: []
|
| 18 |
+
[2026-06-12 16:12:02,398 - INFO] After load_checkpoint, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 19 |
+
[2026-06-12 16:12:02,401 - INFO] After high_precision_promoter, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 20 |
+
[2026-06-12 16:12:02,496 - INFO] Load checkpoint successfully
|
| 21 |
+
[2026-06-12 16:12:02,496 - INFO] Begin to generate per chunk
|
| 22 |
+
[2026-06-12 16:12:02,496 - INFO] special_token = ['HQ_TOKEN', 'DURATION_TOKEN']
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/entry.py", line 117, in <module>
|
| 26 |
+
[rank0]: main()
|
| 27 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/entry.py", line 81, in main
|
| 28 |
+
[rank0]: pipeline.run_text_to_video(prompt=args.prompt, output_path=args.output_path)
|
| 29 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 47, in run_text_to_video
|
| 30 |
+
[rank0]: self._run(prompt, None, output_path)
|
| 31 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 61, in _run
|
| 32 |
+
[rank0]: [
|
| 33 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 61, in <listcomp>
|
| 34 |
+
[rank0]: [
|
| 35 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1357, in generate_per_chunk
|
| 36 |
+
[rank0]: for _, _, chunk in sample_transport.walk():
|
| 37 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1327, in walk
|
| 38 |
+
[rank0]: velocity = self.forward_velocity(work_status.infer_idx, work_status.cur_denoise_step + 1)
|
| 39 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1171, in forward_velocity
|
| 40 |
+
[rank0]: velocity = forward_fn(
|
| 41 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_model.py", line 573, in forward_dispatcher
|
| 42 |
+
[rank0]: cat_out = self.forward(
|
| 43 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
|
| 44 |
+
[rank0]: return func(*args, **kwargs)
|
| 45 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_model.py", line 399, in forward
|
| 46 |
+
[rank0]: x = self.videodit_blocks.forward(
|
| 47 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
|
| 48 |
+
[rank0]: return func(*args, **kwargs)
|
| 49 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1585, in forward
|
| 50 |
+
[rank0]: hidden_states = layer(
|
| 51 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
|
| 52 |
+
[rank0]: return self._call_impl(*args, **kwargs)
|
| 53 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
|
| 54 |
+
[rank0]: return forward_call(*args, **kwargs)
|
| 55 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1473, in forward
|
| 56 |
+
[rank0]: hidden_states = self.attn_post_process(core_attn_out, cross_attn_out, residual, condition, condition_map)
|
| 57 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1486, in attn_post_process
|
| 58 |
+
[rank0]: hidden_states = self.gating_and_mlp(hidden_states, residual, condition, condition_map)
|
| 59 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1520, in gating_and_mlp
|
| 60 |
+
[rank0]: hidden_states = self.mlp(hidden_states)
|
| 61 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
|
| 62 |
+
[rank0]: return self._call_impl(*args, **kwargs)
|
| 63 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
|
| 64 |
+
[rank0]: return forward_call(*args, **kwargs)
|
| 65 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 554, in forward
|
| 66 |
+
[rank0]: hidden_states = torch.nn.functional.gelu(hidden_states)
|
| 67 |
+
[rank0]: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.67 GiB. GPU 0 has a total capacity of 79.11 GiB of which 1.66 GiB is free. Including non-PyTorch memory, this process has 30.81 GiB memory in use. Process 576875 has 46.62 GiB memory in use. Of the allocated memory 29.34 GiB is allocated by PyTorch, and 427.19 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
|
| 68 |
+
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-18-14/infer_2026-06-12_16-18-14.log
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
|
| 2 |
+
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
|
| 3 |
+
[W612 16:18:20.531242725 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())
|
| 4 |
+
[2026-06-12 16:18:20,226 - INFO] Initialize torch distribution and model parallel successfully
|
| 5 |
+
[2026-06-12 16:18:20,226 - INFO] MagiConfig(model_config=ModelConfig(model_name='videodit_ardf', num_layers=34, hidden_size=3072, ffn_hidden_size=12288, num_attention_heads=24, num_query_groups=8, kv_channels=128, layernorm_epsilon=1e-06, apply_layernorm_1p=True, x_rescale_factor=1, half_channel_vae=False, params_dtype=torch.bfloat16, patch_size=2, t_patch_size=1, in_channels=16, out_channels=16, cond_hidden_ratio=0.25, caption_channels=4096, caption_max_length=800, xattn_cond_hidden_ratio=1.0, cond_gating_ratio=1.0, gated_linear_unit=False), runtime_config=RuntimeConfig(cfg_number=1, cfg_t_range=[0.0, 0.0217, 0.1, 0.3, 0.999], prev_chunk_scales=[1.5, 1.5, 1.5, 1.0, 1.0], text_scales=[7.5, 7.5, 7.5, 0.0, 0.0], noise2clean_kvrange=[], clean_chunk_kvrange=1, clean_t=0.9999, seed=1234, num_frames=240, video_size_h=720, video_size_w=720, num_steps=64, window_size=4, fps=24, chunk_width=6, t5_pretrained='./downloads/t5_pretrained', t5_device='cuda', vae_pretrained='./downloads/vae', scale_factor=0.18215, temporal_downsample_factor=4, load='./downloads/4.5B_distill'), engine_config=EngineConfig(distributed_backend='nccl', distributed_timeout_minutes=15, pp_size=1, cp_size=1, cp_strategy='none', ulysses_overlap_degree=1, fp8_quant=False, distill_nearly_clean_chunk_threshold=0.3, shortcut_mode='8,16,16', distill=True, kv_offload=False, enable_cuda_graph=False))
|
| 6 |
+
[2026-06-12 16:18:20,226 - INFO] Precompute validation prompt embeddings
|
| 7 |
+
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
|
| 8 |
+
Running on GPU: NVIDIA H800
|
| 9 |
+
GPU Memory before pipeline: 0.00 GB allocated
|
| 10 |
+
|
| 11 |
+
[2026-06-12 16:18:38,668 - INFO] (cp, pp) rank (0, 0): param count 4459898128, model size 8.34 GB
|
| 12 |
+
[2026-06-12 16:18:38,668 - INFO] Build DiTModel successfully
|
| 13 |
+
[2026-06-12 16:18:38,669 - INFO] After build_dit_model, memory allocated: 0.04 GB, memory reserved: 0.08 GB
|
| 14 |
+
[2026-06-12 16:18:38,669 - INFO] load inference_weight.distill weight from ./downloads/4.5B_distill/inference_weight.distill
|
| 15 |
+
|
| 16 |
+
[2026-06-12 16:18:41,413 - INFO] Load Weight Missing Keys: []
|
| 17 |
+
[2026-06-12 16:18:41,413 - INFO] Load Weight Unexpected Keys: []
|
| 18 |
+
[2026-06-12 16:18:41,594 - INFO] After load_checkpoint, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 19 |
+
[2026-06-12 16:18:41,596 - INFO] After high_precision_promoter, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 20 |
+
[2026-06-12 16:18:41,683 - INFO] Load checkpoint successfully
|
| 21 |
+
[2026-06-12 16:18:41,683 - INFO] Begin to generate per chunk
|
| 22 |
+
[2026-06-12 16:18:41,683 - INFO] special_token = ['HQ_TOKEN', 'DURATION_TOKEN']
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/entry.py", line 117, in <module>
|
| 26 |
+
[rank0]: main()
|
| 27 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/entry.py", line 81, in main
|
| 28 |
+
[rank0]: pipeline.run_text_to_video(prompt=args.prompt, output_path=args.output_path)
|
| 29 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 47, in run_text_to_video
|
| 30 |
+
[rank0]: self._run(prompt, None, output_path)
|
| 31 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 61, in _run
|
| 32 |
+
[rank0]: [
|
| 33 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/pipeline.py", line 61, in <listcomp>
|
| 34 |
+
[rank0]: [
|
| 35 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1357, in generate_per_chunk
|
| 36 |
+
[rank0]: for _, _, chunk in sample_transport.walk():
|
| 37 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1327, in walk
|
| 38 |
+
[rank0]: velocity = self.forward_velocity(work_status.infer_idx, work_status.cur_denoise_step + 1)
|
| 39 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/pipeline/video_generate.py", line 1171, in forward_velocity
|
| 40 |
+
[rank0]: velocity = forward_fn(
|
| 41 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_model.py", line 573, in forward_dispatcher
|
| 42 |
+
[rank0]: cat_out = self.forward(
|
| 43 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
|
| 44 |
+
[rank0]: return func(*args, **kwargs)
|
| 45 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_model.py", line 399, in forward
|
| 46 |
+
[rank0]: x = self.videodit_blocks.forward(
|
| 47 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
|
| 48 |
+
[rank0]: return func(*args, **kwargs)
|
| 49 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1585, in forward
|
| 50 |
+
[rank0]: hidden_states = layer(
|
| 51 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
|
| 52 |
+
[rank0]: return self._call_impl(*args, **kwargs)
|
| 53 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
|
| 54 |
+
[rank0]: return forward_call(*args, **kwargs)
|
| 55 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1473, in forward
|
| 56 |
+
[rank0]: hidden_states = self.attn_post_process(core_attn_out, cross_attn_out, residual, condition, condition_map)
|
| 57 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1486, in attn_post_process
|
| 58 |
+
[rank0]: hidden_states = self.gating_and_mlp(hidden_states, residual, condition, condition_map)
|
| 59 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 1520, in gating_and_mlp
|
| 60 |
+
[rank0]: hidden_states = self.mlp(hidden_states)
|
| 61 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
|
| 62 |
+
[rank0]: return self._call_impl(*args, **kwargs)
|
| 63 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
|
| 64 |
+
[rank0]: return forward_call(*args, **kwargs)
|
| 65 |
+
[rank0]: File "/home/dyvm6xra/dyvm6xrauser11/workspace/cz/FlowCache/FlowCache4MAGI-1-dev-V2/inference/model/dit/dit_module.py", line 554, in forward
|
| 66 |
+
[rank0]: hidden_states = torch.nn.functional.gelu(hidden_states)
|
| 67 |
+
[rank0]: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.67 GiB. GPU 0 has a total capacity of 79.11 GiB of which 1.66 GiB is free. Including non-PyTorch memory, this process has 30.81 GiB memory in use. Process 582212 has 46.62 GiB memory in use. Of the allocated memory 29.34 GiB is allocated by PyTorch, and 427.19 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
|
| 68 |
+
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-25-27/infer_2026-06-12_16-25-27.log
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/dyvm6xra/dyvm6xrauser11/miniforge3/envs/magi/lib/python3.10/site-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
|
| 2 |
+
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
|
| 3 |
+
[W612 16:25:34.392444672 CUDAAllocatorConfig.h:28] Warning: expandable_segments not supported on this platform (function operator())
|
| 4 |
+
[2026-06-12 16:25:34,098 - INFO] Initialize torch distribution and model parallel successfully
|
| 5 |
+
[2026-06-12 16:25:34,098 - INFO] MagiConfig(model_config=ModelConfig(model_name='videodit_ardf', num_layers=34, hidden_size=3072, ffn_hidden_size=12288, num_attention_heads=24, num_query_groups=8, kv_channels=128, layernorm_epsilon=1e-06, apply_layernorm_1p=True, x_rescale_factor=1, half_channel_vae=False, params_dtype=torch.bfloat16, patch_size=2, t_patch_size=1, in_channels=16, out_channels=16, cond_hidden_ratio=0.25, caption_channels=4096, caption_max_length=800, xattn_cond_hidden_ratio=1.0, cond_gating_ratio=1.0, gated_linear_unit=False), runtime_config=RuntimeConfig(cfg_number=1, cfg_t_range=[0.0, 0.0217, 0.1, 0.3, 0.999], prev_chunk_scales=[1.5, 1.5, 1.5, 1.0, 1.0], text_scales=[7.5, 7.5, 7.5, 0.0, 0.0], noise2clean_kvrange=[], clean_chunk_kvrange=1, clean_t=0.9999, seed=1234, num_frames=240, video_size_h=720, video_size_w=720, num_steps=64, window_size=4, fps=24, chunk_width=6, t5_pretrained='./downloads/t5_pretrained', t5_device='cuda', vae_pretrained='./downloads/vae', scale_factor=0.18215, temporal_downsample_factor=4, load='./downloads/4.5B_distill'), engine_config=EngineConfig(distributed_backend='nccl', distributed_timeout_minutes=15, pp_size=1, cp_size=1, cp_strategy='none', ulysses_overlap_degree=1, fp8_quant=False, distill_nearly_clean_chunk_threshold=0.3, shortcut_mode='8,16,16', distill=True, kv_offload=False, enable_cuda_graph=False))
|
| 6 |
+
[2026-06-12 16:25:34,098 - INFO] Precompute validation prompt embeddings
|
| 7 |
+
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
|
| 8 |
+
Running on GPU: NVIDIA H800
|
| 9 |
+
GPU Memory before pipeline: 0.00 GB allocated
|
| 10 |
+
|
| 11 |
+
[2026-06-12 16:25:51,566 - INFO] (cp, pp) rank (0, 0): param count 4459898128, model size 8.34 GB
|
| 12 |
+
[2026-06-12 16:25:51,567 - INFO] Build DiTModel successfully
|
| 13 |
+
[2026-06-12 16:25:51,567 - INFO] After build_dit_model, memory allocated: 0.04 GB, memory reserved: 0.08 GB
|
| 14 |
+
[2026-06-12 16:25:51,567 - INFO] load inference_weight.distill weight from ./downloads/4.5B_distill/inference_weight.distill
|
| 15 |
+
|
| 16 |
+
[2026-06-12 16:25:53,057 - INFO] Load Weight Missing Keys: []
|
| 17 |
+
[2026-06-12 16:25:53,057 - INFO] Load Weight Unexpected Keys: []
|
| 18 |
+
[2026-06-12 16:25:53,302 - INFO] After load_checkpoint, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 19 |
+
[2026-06-12 16:25:53,305 - INFO] After high_precision_promoter, memory allocated: 8.39 GB, memory reserved: 8.40 GB
|
| 20 |
+
[2026-06-12 16:25:53,396 - INFO] Load checkpoint successfully
|
| 21 |
+
[2026-06-12 16:25:53,396 - INFO] Begin to generate per chunk
|
| 22 |
+
[2026-06-12 16:25:53,396 - INFO] special_token = ['HQ_TOKEN', 'DURATION_TOKEN']
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
[2026-06-12 16:45:03,238 - INFO] Saved token L2 norm change-rate stats to outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-25-27/token_l2_change_rate_chunk0_2026-06-12_16-25-27.json
|
| 26 |
+
[2026-06-12 16:45:06,713 - INFO] Finish MagiPipeline, max memory allocated: 45.59 GB, max memory reserved: 55.60 GB
|
| 27 |
+
✅ Video saved successfully.
|
| 28 |
+
|
| 29 |
+
==================================================
|
| 30 |
+
GPU Memory Usage Summary:
|
| 31 |
+
Peak memory allocated: 45.59 GB
|
| 32 |
+
Current memory allocated: 0.03 GB
|
| 33 |
+
Cached memory reserved: 30.49 GB
|
| 34 |
+
Total GPU memory: 79.11 GB
|
| 35 |
+
Peak memory usage: 57.6%
|
| 36 |
+
==================================================
|
| 37 |
+
Memory after cache cleanup: 0.03 GB
|
FlowCache/FlowCache4MAGI-1-dev-V2/outputs/a_woman_dancing_token_heterogeneity_2026-06-12_16-25-27/token_l2_change_rate_chunk0_2026-06-12_16-25-27.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/flowcache_physicsiq.sh
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# FlowCache PhysicsIQ sampling script
|
| 4 |
+
# Usage: bash flowcache_physicsiq.sh [yaml_config_path]
|
| 5 |
+
# Default config: yaml_config/sample/flowcache_physicsiq.yaml
|
| 6 |
+
|
| 7 |
+
export DEVICES="0,1,2,3,4"
|
| 8 |
+
|
| 9 |
+
export XDG_CACHE_HOME="/path/to/tmp"
|
| 10 |
+
|
| 11 |
+
export PAD_HQ=1
|
| 12 |
+
export PAD_DURATION=1
|
| 13 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 14 |
+
export OFFLOAD_T5_CACHE=true
|
| 15 |
+
export OFFLOAD_VAE_CACHE=true
|
| 16 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 17 |
+
|
| 18 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 19 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 20 |
+
export MAGI_ROOT="$MAGI_ROOT"
|
| 21 |
+
|
| 22 |
+
# YAML config file path (can be overridden via command line argument)
|
| 23 |
+
YAML_CONFIG="${1:-yaml_config/sample/flowcache_physicsiq.yaml}"
|
| 24 |
+
|
| 25 |
+
if [ ! -f "$YAML_CONFIG" ]; then
|
| 26 |
+
echo "❌ YAML config file not found: $YAML_CONFIG"
|
| 27 |
+
exit 1
|
| 28 |
+
fi
|
| 29 |
+
|
| 30 |
+
echo "📋 Using YAML config: $YAML_CONFIG"
|
| 31 |
+
|
| 32 |
+
# Create log directory
|
| 33 |
+
LOG_DIR="./logs"
|
| 34 |
+
mkdir -p "$LOG_DIR"
|
| 35 |
+
LOG_FILE="$LOG_DIR/flowcache_physicsiq_$(date +%Y%m%d_%H%M%S).log"
|
| 36 |
+
exec > >(tee -a "$LOG_FILE") 2>&1
|
| 37 |
+
|
| 38 |
+
echo "🚀 Starting multi-GPU benchmark sampling"
|
| 39 |
+
echo "🎮 GPUs: $DEVICES"
|
| 40 |
+
|
| 41 |
+
# Run sampling
|
| 42 |
+
python sample_video.py "$YAML_CONFIG"
|
| 43 |
+
|
| 44 |
+
if [ $? -eq 0 ]; then
|
| 45 |
+
echo "✅ Sampling completed successfully."
|
| 46 |
+
else
|
| 47 |
+
echo "❌ Sampling failed. Check log: $LOG_FILE"
|
| 48 |
+
exit 1
|
| 49 |
+
fi
|
| 50 |
+
|
| 51 |
+
echo "---"
|
| 52 |
+
echo "🎉 All sampling tasks completed."
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/flowcache_vbench.sh
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# FlowCache VBench sampling script
|
| 4 |
+
# Usage: bash flowcache_vbench.sh [yaml_config_path]
|
| 5 |
+
# Default config: yaml_config/sample/flowcache_vbench.yaml
|
| 6 |
+
|
| 7 |
+
export PAD_HQ=1
|
| 8 |
+
export PAD_DURATION=1
|
| 9 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 10 |
+
export OFFLOAD_T5_CACHE=true
|
| 11 |
+
export OFFLOAD_VAE_CACHE=true
|
| 12 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 13 |
+
|
| 14 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 15 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 16 |
+
export MAGI_ROOT="$MAGI_ROOT"
|
| 17 |
+
|
| 18 |
+
# YAML config file path (can be overridden via command line argument)
|
| 19 |
+
YAML_CONFIG="${1:-yaml_config/sample/flowcache_vbench.yaml}"
|
| 20 |
+
|
| 21 |
+
if [ ! -f "$YAML_CONFIG" ]; then
|
| 22 |
+
echo "❌ YAML config file not found: $YAML_CONFIG"
|
| 23 |
+
exit 1
|
| 24 |
+
fi
|
| 25 |
+
|
| 26 |
+
echo "📋 Using YAML config: $YAML_CONFIG"
|
| 27 |
+
|
| 28 |
+
# Create log directory
|
| 29 |
+
LOG_DIR="./logs"
|
| 30 |
+
mkdir -p "$LOG_DIR"
|
| 31 |
+
LOG_FILE="$LOG_DIR/flowcache_vbench_$(date +%Y%m%d_%H%M%S).log"
|
| 32 |
+
exec > >(tee -a "$LOG_FILE") 2>&1
|
| 33 |
+
|
| 34 |
+
echo "🚀 Starting multi-GPU benchmark sampling"
|
| 35 |
+
|
| 36 |
+
# Define list of dimensions to process
|
| 37 |
+
DIMENSIONS=("overall_consistency" "subject_consistency" "scene")
|
| 38 |
+
|
| 39 |
+
echo "🔢 Total dimensions to process: ${#DIMENSIONS[@]}"
|
| 40 |
+
echo "📋 Dimensions: ${DIMENSIONS[*]}"
|
| 41 |
+
|
| 42 |
+
# Loop through each dimension
|
| 43 |
+
for DIMENSION in "${DIMENSIONS[@]}"; do
|
| 44 |
+
echo "🔍 Processing dimension: $DIMENSION"
|
| 45 |
+
|
| 46 |
+
# Use Python to temporarily modify the dimension in YAML, then run sampling
|
| 47 |
+
python3 -c "
|
| 48 |
+
import yaml
|
| 49 |
+
import sys
|
| 50 |
+
|
| 51 |
+
# Read YAML config
|
| 52 |
+
with open('$YAML_CONFIG', 'r') as f:
|
| 53 |
+
config = yaml.safe_load(f)
|
| 54 |
+
|
| 55 |
+
# Modify dimension
|
| 56 |
+
config['dimension'] = '$DIMENSION'
|
| 57 |
+
|
| 58 |
+
# Save to temporary file
|
| 59 |
+
temp_config = '$YAML_CONFIG.tmp'
|
| 60 |
+
with open(temp_config, 'w') as f:
|
| 61 |
+
yaml.dump(config, f, default_flow_style=False)
|
| 62 |
+
print(temp_config)
|
| 63 |
+
" > /tmp/temp_config_path.txt
|
| 64 |
+
|
| 65 |
+
TEMP_CONFIG=$(cat /tmp/temp_config_path.txt)
|
| 66 |
+
python sample_video.py "$TEMP_CONFIG"
|
| 67 |
+
rm "$TEMP_CONFIG"
|
| 68 |
+
|
| 69 |
+
if [ $? -eq 0 ]; then
|
| 70 |
+
echo "✅ Completed: $DIMENSION"
|
| 71 |
+
else
|
| 72 |
+
echo "❌ Failed: $DIMENSION"
|
| 73 |
+
echo "🛑 Script paused due to error. Fix the issue and rerun."
|
| 74 |
+
exit 1
|
| 75 |
+
fi
|
| 76 |
+
|
| 77 |
+
echo "---"
|
| 78 |
+
done
|
| 79 |
+
|
| 80 |
+
echo "🎉 All sampling tasks completed."
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/teacache_physicsiq.sh
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# TeaCache PhysicsIQ sampling script
|
| 4 |
+
# Usage: bash teacache_physicsiq.sh [yaml_config_path]
|
| 5 |
+
# Default config: yaml_config/sample/teacache_physicsiq.yaml
|
| 6 |
+
|
| 7 |
+
export DEVICES="0,1,2,3,4,5,6,7"
|
| 8 |
+
|
| 9 |
+
export PAD_HQ=1
|
| 10 |
+
export PAD_DURATION=1
|
| 11 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 12 |
+
export OFFLOAD_T5_CACHE=true
|
| 13 |
+
export OFFLOAD_VAE_CACHE=true
|
| 14 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 15 |
+
|
| 16 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 17 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 18 |
+
export MAGI_ROOT="$MAGI_ROOT"
|
| 19 |
+
|
| 20 |
+
export XDG_CACHE_HOME="/path/to/tmp"
|
| 21 |
+
mkdir -p "$XDG_CACHE_HOME"
|
| 22 |
+
|
| 23 |
+
# YAML config file path (can be overridden via command line argument)
|
| 24 |
+
YAML_CONFIG="${1:-yaml_config/sample/teacache_physicsiq.yaml}"
|
| 25 |
+
|
| 26 |
+
if [ ! -f "$YAML_CONFIG" ]; then
|
| 27 |
+
echo "❌ YAML config file not found: $YAML_CONFIG"
|
| 28 |
+
exit 1
|
| 29 |
+
fi
|
| 30 |
+
|
| 31 |
+
echo "📋 Using YAML config: $YAML_CONFIG"
|
| 32 |
+
|
| 33 |
+
# Create log directory
|
| 34 |
+
LOG_DIR="./logs"
|
| 35 |
+
mkdir -p "$LOG_DIR"
|
| 36 |
+
LOG_FILE="$LOG_DIR/teacache_physicsiq_$(date +%Y%m%d_%H%M%S).log"
|
| 37 |
+
exec > >(tee -a "$LOG_FILE") 2>&1
|
| 38 |
+
|
| 39 |
+
echo "🚀 Starting multi-GPU benchmark sampling"
|
| 40 |
+
echo "🎮 GPUs: $DEVICES"
|
| 41 |
+
|
| 42 |
+
# Run sampling
|
| 43 |
+
python sample_video.py "$YAML_CONFIG"
|
| 44 |
+
|
| 45 |
+
if [ $? -eq 0 ]; then
|
| 46 |
+
echo "✅ Sampling completed successfully."
|
| 47 |
+
else
|
| 48 |
+
echo "❌ Sampling failed. Check log: $LOG_FILE"
|
| 49 |
+
exit 1
|
| 50 |
+
fi
|
| 51 |
+
|
| 52 |
+
echo "---"
|
| 53 |
+
echo "🎉 All sampling tasks completed."
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/sample/teacache_vbench.sh
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# TeaCache VBench sampling script
|
| 4 |
+
# Usage: bash teacache_vbench.sh [yaml_config_path]
|
| 5 |
+
# Default config: yaml_config/sample/teacache_vbench.yaml
|
| 6 |
+
|
| 7 |
+
export DEVICES="4,5,7"
|
| 8 |
+
|
| 9 |
+
export PAD_HQ=1
|
| 10 |
+
export PAD_DURATION=1
|
| 11 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 12 |
+
export OFFLOAD_T5_CACHE=true
|
| 13 |
+
export OFFLOAD_VAE_CACHE=true
|
| 14 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 15 |
+
|
| 16 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 17 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 18 |
+
export MAGI_ROOT="$MAGI_ROOT"
|
| 19 |
+
|
| 20 |
+
# YAML config file path (can be overridden via command line argument)
|
| 21 |
+
YAML_CONFIG="${1:-yaml_config/sample/teacache_vbench.yaml}"
|
| 22 |
+
|
| 23 |
+
if [ ! -f "$YAML_CONFIG" ]; then
|
| 24 |
+
echo "❌ YAML config file not found: $YAML_CONFIG"
|
| 25 |
+
exit 1
|
| 26 |
+
fi
|
| 27 |
+
|
| 28 |
+
echo "📋 Using YAML config: $YAML_CONFIG"
|
| 29 |
+
|
| 30 |
+
# Create log directory
|
| 31 |
+
LOG_DIR="./logs"
|
| 32 |
+
mkdir -p "$LOG_DIR"
|
| 33 |
+
LOG_FILE="$LOG_DIR/teacache_vbench_$(date +%Y%m%d_%H%M%S).log"
|
| 34 |
+
exec > >(tee -a "$LOG_FILE") 2>&1
|
| 35 |
+
|
| 36 |
+
echo "🚀 Starting multi-GPU benchmark sampling"
|
| 37 |
+
echo "🎮 GPUs: $DEVICES"
|
| 38 |
+
|
| 39 |
+
# Define list of dimensions to process
|
| 40 |
+
DIMENSIONS=("overall_consistency" "subject_consistency" "scene")
|
| 41 |
+
|
| 42 |
+
echo "🔢 Total dimensions to process: ${#DIMENSIONS[@]}"
|
| 43 |
+
|
| 44 |
+
# Loop through each dimension
|
| 45 |
+
for DIMENSION in "${DIMENSIONS[@]}"; do
|
| 46 |
+
echo "📌 Processing dimension: $DIMENSION"
|
| 47 |
+
|
| 48 |
+
# Use Python to temporarily modify the dimension in YAML, then run sampling
|
| 49 |
+
python3 -c "
|
| 50 |
+
import yaml
|
| 51 |
+
import sys
|
| 52 |
+
|
| 53 |
+
# Read YAML config
|
| 54 |
+
with open('$YAML_CONFIG', 'r') as f:
|
| 55 |
+
config = yaml.safe_load(f)
|
| 56 |
+
|
| 57 |
+
# Modify dimension
|
| 58 |
+
config['dimension'] = '$DIMENSION'
|
| 59 |
+
|
| 60 |
+
# Save to temporary file
|
| 61 |
+
temp_config = '$YAML_CONFIG.tmp'
|
| 62 |
+
with open(temp_config, 'w') as f:
|
| 63 |
+
yaml.dump(config, f, default_flow_style=False)
|
| 64 |
+
print(temp_config)
|
| 65 |
+
" > /tmp/temp_config_path.txt
|
| 66 |
+
|
| 67 |
+
TEMP_CONFIG=$(cat /tmp/temp_config_path.txt)
|
| 68 |
+
python sample_video.py "$TEMP_CONFIG"
|
| 69 |
+
rm "$TEMP_CONFIG"
|
| 70 |
+
|
| 71 |
+
if [ $? -eq 0 ]; then
|
| 72 |
+
echo "✅ Successfully completed: $DIMENSION"
|
| 73 |
+
else
|
| 74 |
+
echo "❌ Failed: $DIMENSION"
|
| 75 |
+
echo "🛑 Script paused due to error. Fix the issue and rerun."
|
| 76 |
+
exit 1
|
| 77 |
+
fi
|
| 78 |
+
|
| 79 |
+
echo "---"
|
| 80 |
+
done
|
| 81 |
+
|
| 82 |
+
echo "🎉 All sampling tasks completed."
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/flowcache_t2v.sh
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
export MASTER_ADDR=localhost
|
| 16 |
+
export MASTER_PORT=6005
|
| 17 |
+
export GPUS_PER_NODE=1
|
| 18 |
+
export NNODES=1
|
| 19 |
+
export WORLD_SIZE=1
|
| 20 |
+
export CUDA_VISIBLE_DEVICES=0
|
| 21 |
+
|
| 22 |
+
export PAD_HQ=1
|
| 23 |
+
export PAD_DURATION=1
|
| 24 |
+
|
| 25 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 26 |
+
export OFFLOAD_T5_CACHE=true
|
| 27 |
+
export OFFLOAD_VAE_CACHE=true
|
| 28 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 29 |
+
|
| 30 |
+
set -euo pipefail
|
| 31 |
+
|
| 32 |
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 33 |
+
MAGI_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
| 34 |
+
cd "$MAGI_ROOT"
|
| 35 |
+
|
| 36 |
+
PROMPT="${PROMPT:-a woman dancing.}"
|
| 37 |
+
TIMESTAMP="${RUN_ID:-$(date "+%Y-%m-%d_%H-%M-%S")}"
|
| 38 |
+
PROMPT_DIR_NAME="${PROMPT_DIR_NAME:-$(python3 - "$PROMPT" <<'PY'
|
| 39 |
+
import re
|
| 40 |
+
import sys
|
| 41 |
+
import unicodedata
|
| 42 |
+
|
| 43 |
+
prompt = unicodedata.normalize("NFKC", sys.argv[1]).strip()
|
| 44 |
+
prompt = re.sub(r"[\\/:\*\?\"<>\|\x00-\x1f]+", "_", prompt)
|
| 45 |
+
prompt = re.sub(r"\s+", "_", prompt)
|
| 46 |
+
prompt = prompt.strip("._")
|
| 47 |
+
print((prompt or "prompt")[:120])
|
| 48 |
+
PY
|
| 49 |
+
)}"
|
| 50 |
+
OUTPUT_ROOT="${OUTPUT_ROOT:-outputs}"
|
| 51 |
+
EXP_DIR="${RUN_DIR:-$OUTPUT_ROOT/${PROMPT_DIR_NAME}_$TIMESTAMP}"
|
| 52 |
+
mkdir -p "$EXP_DIR"
|
| 53 |
+
|
| 54 |
+
OUTPUT_PATH="${OUTPUT_PATH:-$EXP_DIR/output_$TIMESTAMP.mp4}"
|
| 55 |
+
RESIDUAL_JSON="${RESIDUAL_JSON:-$EXP_DIR/residual_stats_$TIMESTAMP.json}"
|
| 56 |
+
RESIDUAL_PNG="${RESIDUAL_PNG:-$EXP_DIR/residual_norms_$TIMESTAMP.png}"
|
| 57 |
+
L1_REL_JSON="${L1_REL_JSON:-$EXP_DIR/l1_rel_stats_$TIMESTAMP.json}"
|
| 58 |
+
L1_REL_PNG="${L1_REL_PNG:-$EXP_DIR/l1_rel_$TIMESTAMP.png}"
|
| 59 |
+
L1_REL_RATIO_PNG="${L1_REL_RATIO_PNG:-$EXP_DIR/l1_rel_ratio_$TIMESTAMP.png}"
|
| 60 |
+
X_EMBEDDER_L1_REL_PNG="${X_EMBEDDER_L1_REL_PNG:-$EXP_DIR/x_embedder_l1_rel_$TIMESTAMP.png}"
|
| 61 |
+
X_EMBEDDER_L1_REL_RATIO_PNG="${X_EMBEDDER_L1_REL_RATIO_PNG:-$EXP_DIR/x_embedder_l1_rel_ratio_$TIMESTAMP.png}"
|
| 62 |
+
FLOWCACHE_METRIC_JSON="${FLOWCACHE_METRIC_JSON:-$EXP_DIR/flowcache_metric_stats_$TIMESTAMP.json}"
|
| 63 |
+
FLOWCACHE_REL_L1_PNG="${FLOWCACHE_REL_L1_PNG:-$EXP_DIR/flowcache_rel_l1_$TIMESTAMP.png}"
|
| 64 |
+
FLOWCACHE_REL_L1_RATIO_PNG="${FLOWCACHE_REL_L1_RATIO_PNG:-$EXP_DIR/flowcache_rel_l1_ratio_$TIMESTAMP.png}"
|
| 65 |
+
FLOWCACHE_ACCUMULATED_REL_L1_PNG="${FLOWCACHE_ACCUMULATED_REL_L1_PNG:-$EXP_DIR/flowcache_accumulated_rel_l1_$TIMESTAMP.png}"
|
| 66 |
+
LOG_FILE="${LOG_FILE:-$EXP_DIR/infer_$TIMESTAMP.log}"
|
| 67 |
+
|
| 68 |
+
export PYTHONPATH="$MAGI_ROOT:${PYTHONPATH:-}"
|
| 69 |
+
python3 inference/pipeline/flowcache.py \
|
| 70 |
+
--config_file config/single_run/flowcache_t2v.json \
|
| 71 |
+
--mode t2v \
|
| 72 |
+
--prompt "$PROMPT" \
|
| 73 |
+
--output_path "$OUTPUT_PATH" \
|
| 74 |
+
--additional_config yaml_config/single_run/config.yaml \
|
| 75 |
+
--residual_stats_path "$RESIDUAL_JSON" \
|
| 76 |
+
--l1_rel_stats_path "$L1_REL_JSON" \
|
| 77 |
+
--flowcache_metric_stats_path "$FLOWCACHE_METRIC_JSON" \
|
| 78 |
+
2>&1 | tee "$LOG_FILE"
|
| 79 |
+
|
| 80 |
+
python3 tools/plot_residual_norms.py "$RESIDUAL_JSON" -o "$RESIDUAL_PNG"
|
| 81 |
+
python3 tools/plot_l1_rel.py "$L1_REL_JSON" -o "$L1_REL_PNG"
|
| 82 |
+
python3 tools/plot_l1_rel.py "$L1_REL_JSON" --y-field l1_rel_ratio -o "$L1_REL_RATIO_PNG"
|
| 83 |
+
python3 tools/plot_l1_rel.py "$L1_REL_JSON" --y-field x_embedder_l1_rel -o "$X_EMBEDDER_L1_REL_PNG"
|
| 84 |
+
python3 tools/plot_l1_rel.py "$L1_REL_JSON" --y-field x_embedder_l1_rel_ratio -o "$X_EMBEDDER_L1_REL_RATIO_PNG"
|
| 85 |
+
python3 tools/plot_l1_rel.py "$FLOWCACHE_METRIC_JSON" --x-field cur_denoise_step --y-field flowcache_rel_l1 -o "$FLOWCACHE_REL_L1_PNG"
|
| 86 |
+
python3 tools/plot_l1_rel.py "$FLOWCACHE_METRIC_JSON" --x-field cur_denoise_step --y-field flowcache_rel_l1_ratio -o "$FLOWCACHE_REL_L1_RATIO_PNG"
|
| 87 |
+
python3 tools/plot_l1_rel.py "$FLOWCACHE_METRIC_JSON" --x-field cur_denoise_step --y-field flowcache_accumulated_rel_l1 -o "$FLOWCACHE_ACCUMULATED_REL_L1_PNG"
|
| 88 |
+
|
| 89 |
+
python3 - "$FLOWCACHE_METRIC_JSON" <<'PY'
|
| 90 |
+
import json
|
| 91 |
+
import sys
|
| 92 |
+
|
| 93 |
+
with open(sys.argv[1], "r") as f:
|
| 94 |
+
payload = json.load(f)
|
| 95 |
+
|
| 96 |
+
summary = payload.get("chunk_execution_summary", {})
|
| 97 |
+
print("FlowCache actual execution summary:")
|
| 98 |
+
for chunk_id in sorted(summary, key=lambda value: int(value)):
|
| 99 |
+
item = summary[chunk_id]
|
| 100 |
+
print(
|
| 101 |
+
" chunk {chunk_idx}: reuse={reuse_steps}, compute={compute_steps}, "
|
| 102 |
+
"total={total_steps}, reuse_rate={reuse_rate:.2%}".format(**item)
|
| 103 |
+
)
|
| 104 |
+
PY
|
| 105 |
+
|
| 106 |
+
echo "Done."
|
| 107 |
+
echo " log: $LOG_FILE"
|
| 108 |
+
echo " video: $OUTPUT_PATH"
|
| 109 |
+
echo " residual json: $RESIDUAL_JSON"
|
| 110 |
+
echo " residual plot: $RESIDUAL_PNG"
|
| 111 |
+
echo " L1 rel json: $L1_REL_JSON"
|
| 112 |
+
echo " L1 rel plot: $L1_REL_PNG"
|
| 113 |
+
echo " L1 rel ratio plot: $L1_REL_RATIO_PNG"
|
| 114 |
+
echo " x_embedder L1 rel plot: $X_EMBEDDER_L1_REL_PNG"
|
| 115 |
+
echo " x_embedder L1 rel ratio plot: $X_EMBEDDER_L1_REL_RATIO_PNG"
|
| 116 |
+
echo " FlowCache metric json: $FLOWCACHE_METRIC_JSON"
|
| 117 |
+
echo " FlowCache rel L1 plot: $FLOWCACHE_REL_L1_PNG"
|
| 118 |
+
echo " FlowCache rel L1 ratio plot: $FLOWCACHE_REL_L1_RATIO_PNG"
|
| 119 |
+
echo " FlowCache accumulated rel L1 plot: $FLOWCACHE_ACCUMULATED_REL_L1_PNG"
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/flowcache_v2v.sh
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
export MASTER_ADDR=localhost
|
| 16 |
+
export MASTER_PORT=6001
|
| 17 |
+
export GPUS_PER_NODE=1
|
| 18 |
+
export NNODES=1
|
| 19 |
+
export WORLD_SIZE=1
|
| 20 |
+
export CUDA_VISIBLE_DEVICES=7
|
| 21 |
+
|
| 22 |
+
export PAD_HQ=1
|
| 23 |
+
export PAD_DURATION=1
|
| 24 |
+
|
| 25 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 26 |
+
export OFFLOAD_T5_CACHE=true
|
| 27 |
+
export OFFLOAD_VAE_CACHE=true
|
| 28 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 29 |
+
|
| 30 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
OUTPUT_NAME=flowcache
|
| 34 |
+
TIMESTAMP=$(date "+%Y-%m-%d_%H-%M-%S")
|
| 35 |
+
EXP_DIR="/path/to/output/magi/${TIMESTAMP}_${OUTPUT_NAME}"
|
| 36 |
+
mkdir -p "$EXP_DIR"
|
| 37 |
+
|
| 38 |
+
LOG_FILE="$EXP_DIR/log_${TIMESTAMP}.log"
|
| 39 |
+
OUTPUT_PATH="$EXP_DIR/output.mp4"
|
| 40 |
+
|
| 41 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 42 |
+
python3 inference/pipeline/flowcache.py \
|
| 43 |
+
--config_file config/single_run/flowcache_v2v.json \
|
| 44 |
+
--mode v2v \
|
| 45 |
+
--prompt "Two pillows on a table and two grabber tools hanging above them from which a brown tennis ball and an orange block are suspended. The grabber tools let go of the ball and block. Static shot with no camera movement." \
|
| 46 |
+
--prefix_video_path "/path/to/physicsiq/conditioning_video.mp4" \
|
| 47 |
+
--output_path $OUTPUT_PATH \
|
| 48 |
+
--additional_config addconfig/config.yaml \
|
| 49 |
+
2>&1 | tee $LOG_FILE
|
| 50 |
+
|
| 51 |
+
# a cat sitting on the grass
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/teacache_t2v.sh
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
export MASTER_ADDR=localhost
|
| 16 |
+
export MASTER_PORT=6002
|
| 17 |
+
export GPUS_PER_NODE=1
|
| 18 |
+
export NNODES=1
|
| 19 |
+
export WORLD_SIZE=1
|
| 20 |
+
export CUDA_VISIBLE_DEVICES=2
|
| 21 |
+
|
| 22 |
+
export PAD_HQ=1
|
| 23 |
+
export PAD_DURATION=1
|
| 24 |
+
|
| 25 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 26 |
+
export OFFLOAD_T5_CACHE=true
|
| 27 |
+
export OFFLOAD_VAE_CACHE=true
|
| 28 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 29 |
+
|
| 30 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
OUTPUT_NAME=allreuse
|
| 34 |
+
TIMESTAMP=$(date "+%Y-%m-%d_%H-%M-%S")
|
| 35 |
+
EXP_DIR="/path/to/output/magi/${TIMESTAMP}_${OUTPUT_NAME}"
|
| 36 |
+
mkdir -p "$EXP_DIR"
|
| 37 |
+
|
| 38 |
+
LOG_FILE="$EXP_DIR/log_${TIMESTAMP}.log"
|
| 39 |
+
exec > >(tee -a "$LOG_FILE") 2>&1
|
| 40 |
+
OUTPUT_PATH="$EXP_DIR/output.mp4"
|
| 41 |
+
|
| 42 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 43 |
+
python3 inference/pipeline/teacache_all.py \
|
| 44 |
+
--rel_l1_thresh 0.01 \
|
| 45 |
+
--warmup_steps 5 \
|
| 46 |
+
--config_file config/single_run/flowcache_t2v.json \
|
| 47 |
+
--mode t2v \
|
| 48 |
+
--prompt "A fantasy landscape" \
|
| 49 |
+
--log \
|
| 50 |
+
--output_path $OUTPUT_PATH \
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/teacache_v2v.sh
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
export MASTER_ADDR=localhost
|
| 16 |
+
export MASTER_PORT=6012
|
| 17 |
+
export GPUS_PER_NODE=1
|
| 18 |
+
export NNODES=1
|
| 19 |
+
export WORLD_SIZE=1
|
| 20 |
+
export CUDA_VISIBLE_DEVICES=1
|
| 21 |
+
export CUDA_HOME="/usr/local/cuda-12.1"
|
| 22 |
+
|
| 23 |
+
export PAD_HQ=1
|
| 24 |
+
export PAD_DURATION=1
|
| 25 |
+
|
| 26 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 27 |
+
export OFFLOAD_T5_CACHE=true
|
| 28 |
+
export OFFLOAD_VAE_CACHE=true
|
| 29 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 30 |
+
|
| 31 |
+
MAGI_ROOT=$(git rev-parse --show-toplevel)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
OUTPUT_NAME=allreuse
|
| 35 |
+
TIMESTAMP=$(date "+%Y-%m-%d_%H-%M-%S")
|
| 36 |
+
EXP_DIR="/path/to/output/magi/${TIMESTAMP}_${OUTPUT_NAME}"
|
| 37 |
+
mkdir -p "$EXP_DIR"
|
| 38 |
+
|
| 39 |
+
LOG_FILE="$EXP_DIR/log_${TIMESTAMP}.log"
|
| 40 |
+
exec > >(tee -a "$LOG_FILE") 2>&1
|
| 41 |
+
OUTPUT_PATH="$EXP_DIR/output.mp4"
|
| 42 |
+
|
| 43 |
+
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
|
| 44 |
+
python3 inference/pipeline/teacache_all.py \
|
| 45 |
+
--rel_l1_thresh 0.01 \
|
| 46 |
+
--warmup_steps 5 \
|
| 47 |
+
--config_file config/single_run/all_reuse.json \
|
| 48 |
+
--mode v2v \
|
| 49 |
+
--prompt "Two pillows on a table and two grabber tools hanging above them from which a brown tennis ball and an orange block are suspended. The grabber tools let go of the ball and block. Static shot with no camera movement." \
|
| 50 |
+
--prefix_video_path "/path/to/physicsiq/conditioning_video.mp4" \
|
| 51 |
+
--output_path $OUTPUT_PATH \
|
| 52 |
+
--log \
|
FlowCache/FlowCache4MAGI-1-dev-V2/scripts/single_run/token_heterogeneity_t2v.sh
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Collect per-token L2 norm change-rate stats for chunk 0 and plot the density curve.
|
| 3 |
+
# Usage: bash scripts/single_run/token_heterogeneity_t2v.sh
|
| 4 |
+
|
| 5 |
+
export MASTER_ADDR=localhost
|
| 6 |
+
export MASTER_PORT=6006
|
| 7 |
+
export GPUS_PER_NODE=1
|
| 8 |
+
export NNODES=1
|
| 9 |
+
export WORLD_SIZE=1
|
| 10 |
+
export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0}
|
| 11 |
+
|
| 12 |
+
export PAD_HQ=1
|
| 13 |
+
export PAD_DURATION=1
|
| 14 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 15 |
+
export OFFLOAD_T5_CACHE=true
|
| 16 |
+
export OFFLOAD_VAE_CACHE=true
|
| 17 |
+
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
|
| 18 |
+
|
| 19 |
+
set -euo pipefail
|
| 20 |
+
|
| 21 |
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 22 |
+
MAGI_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
| 23 |
+
cd "$MAGI_ROOT"
|
| 24 |
+
|
| 25 |
+
PROMPT="${PROMPT:-a woman dancing.}"
|
| 26 |
+
TIMESTAMP="${RUN_ID:-$(date "+%Y-%m-%d_%H-%M-%S")}"
|
| 27 |
+
PROMPT_DIR_NAME="${PROMPT_DIR_NAME:-$(python3 - "$PROMPT" <<'PY'
|
| 28 |
+
import re
|
| 29 |
+
import sys
|
| 30 |
+
import unicodedata
|
| 31 |
+
|
| 32 |
+
prompt = unicodedata.normalize("NFKC", sys.argv[1]).strip()
|
| 33 |
+
prompt = re.sub(r"[\\/:\*\?\"<>\|\x00-\x1f]+", "_", prompt)
|
| 34 |
+
prompt = re.sub(r"\s+", "_", prompt)
|
| 35 |
+
prompt = prompt.strip("._")
|
| 36 |
+
print((prompt or "prompt")[:120])
|
| 37 |
+
PY
|
| 38 |
+
)}"
|
| 39 |
+
OUTPUT_ROOT="${OUTPUT_ROOT:-outputs}"
|
| 40 |
+
EXP_DIR="${RUN_DIR:-$OUTPUT_ROOT/${PROMPT_DIR_NAME}_token_heterogeneity_$TIMESTAMP}"
|
| 41 |
+
mkdir -p "$EXP_DIR"
|
| 42 |
+
|
| 43 |
+
OUTPUT_PATH="${OUTPUT_PATH:-$EXP_DIR/output_$TIMESTAMP.mp4}"
|
| 44 |
+
TOKEN_STATS_JSON="${TOKEN_STATS_JSON:-$EXP_DIR/token_l2_change_rate_chunk0_$TIMESTAMP.json}"
|
| 45 |
+
TOKEN_DENSITY_PNG="${TOKEN_DENSITY_PNG:-$EXP_DIR/token_l2_change_rate_density_chunk0_$TIMESTAMP.png}"
|
| 46 |
+
LOG_FILE="${LOG_FILE:-$EXP_DIR/infer_$TIMESTAMP.log}"
|
| 47 |
+
CHUNK_IDX="${CHUNK_IDX:-0}"
|
| 48 |
+
|
| 49 |
+
export PYTHONPATH="$MAGI_ROOT:${PYTHONPATH:-}"
|
| 50 |
+
python3 inference/pipeline/entry.py \
|
| 51 |
+
--config_file config/single_run/flowcache_t2v.json \
|
| 52 |
+
--mode t2v \
|
| 53 |
+
--prompt "$PROMPT" \
|
| 54 |
+
--output_path "$OUTPUT_PATH" \
|
| 55 |
+
--token_l2_change_rate_stats_path "$TOKEN_STATS_JSON" \
|
| 56 |
+
--token_l2_change_rate_chunk_idx "$CHUNK_IDX" \
|
| 57 |
+
--print_peak_memory \
|
| 58 |
+
2>&1 | tee "$LOG_FILE"
|
| 59 |
+
|
| 60 |
+
python3 tools/plot_token_l2_change_rate_density.py \
|
| 61 |
+
"$TOKEN_STATS_JSON" \
|
| 62 |
+
-o "$TOKEN_DENSITY_PNG" \
|
| 63 |
+
--chunk-idx "$CHUNK_IDX"
|
| 64 |
+
|
| 65 |
+
echo "Done."
|
| 66 |
+
echo " log: $LOG_FILE"
|
| 67 |
+
echo " video: $OUTPUT_PATH"
|
| 68 |
+
echo " token stats json: $TOKEN_STATS_JSON"
|
| 69 |
+
echo " density plot: $TOKEN_DENSITY_PNG"
|
FlowCache/FlowCache4MAGI-1-dev-V2/tools/__pycache__/plot_l1_rel.cpython-312.pyc
ADDED
|
Binary file (7.88 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/tools/__pycache__/plot_residual_norms.cpython-312.pyc
ADDED
|
Binary file (7.66 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/tools/__pycache__/plot_token_l2_change_rate_density.cpython-312.pyc
ADDED
|
Binary file (4.73 kB). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/flowcache_physicsiq.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FlowCache PhysicsIQ configuration file
|
| 2 |
+
# Usage: bash scripts/sample/flowcache_physicsiq.sh <path_to_this_yaml>
|
| 3 |
+
|
| 4 |
+
# Basic configuration
|
| 5 |
+
benchmark: physicsiq
|
| 6 |
+
config_file: config/sample/5s_physicsiq.json
|
| 7 |
+
|
| 8 |
+
# GPU configuration
|
| 9 |
+
gpus: all
|
| 10 |
+
|
| 11 |
+
# PhysicsIQ dataset configuration
|
| 12 |
+
physicsiq_data_dir: /path/to/physicsiq
|
| 13 |
+
|
| 14 |
+
# Output path configuration
|
| 15 |
+
base_save_path: /path/to/output/physicsiq
|
| 16 |
+
|
| 17 |
+
# Reuse strategy configuration
|
| 18 |
+
reuse_strategy: chunkwise
|
| 19 |
+
rel_l1_thresh: 0.01
|
| 20 |
+
warmup_steps: 5
|
| 21 |
+
|
| 22 |
+
# KV cache compression configuration
|
| 23 |
+
compress_kv_cache: true
|
| 24 |
+
total_cache_chunk_nums: 6
|
| 25 |
+
compress_strategy: token
|
| 26 |
+
query_granularity: token
|
| 27 |
+
mix_lambda: 0.07
|
| 28 |
+
score_weighting_method: no_weight
|
| 29 |
+
power: 3
|
| 30 |
+
|
| 31 |
+
# Sampling range control
|
| 32 |
+
start: 150
|
| 33 |
+
end: 200
|
| 34 |
+
|
| 35 |
+
# Log configuration
|
| 36 |
+
log: false
|
FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/flowcache_vbench.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FlowCache VBench configuration file
|
| 2 |
+
# Usage: bash scripts/sample/flowcache_vbench.sh <path_to_this_yaml>
|
| 3 |
+
|
| 4 |
+
# Basic configuration
|
| 5 |
+
benchmark: vbench
|
| 6 |
+
config_file: config/sample/vbench.json
|
| 7 |
+
|
| 8 |
+
# GPU configuration
|
| 9 |
+
gpus: all
|
| 10 |
+
|
| 11 |
+
# VBench dataset configuration
|
| 12 |
+
vbench_prompt_dir: downloads/vbench/prompts_per_dimension
|
| 13 |
+
|
| 14 |
+
# Dimension configuration (specify the current dimension to process)
|
| 15 |
+
dimension: overall_consistency # Options: subject_consistency, scene, object_class, multiple_objects, color, spatial_relationship, temporal_style, human_action, temporal_flickering, appearance_style
|
| 16 |
+
|
| 17 |
+
# Output path configuration
|
| 18 |
+
base_save_path: outputs/vbench
|
| 19 |
+
|
| 20 |
+
# Reuse strategy configuration
|
| 21 |
+
reuse_strategy: chunkwise
|
| 22 |
+
rel_l1_thresh: 0.01
|
| 23 |
+
warmup_steps: 5
|
| 24 |
+
|
| 25 |
+
# KV cache compression configuration
|
| 26 |
+
compress_kv_cache: true
|
| 27 |
+
total_cache_chunk_nums: 6
|
| 28 |
+
budget_cache_chunk_nums: 1
|
| 29 |
+
compress_strategy: token
|
| 30 |
+
query_granularity: chunk
|
| 31 |
+
mix_lambda: 0.07
|
| 32 |
+
score_weighting_method: no_weight
|
| 33 |
+
discard_nearly_clean_chunk: true
|
| 34 |
+
|
| 35 |
+
# Log configuration
|
| 36 |
+
log: false
|
FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/teacache_physicsiq.yaml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TeaCache PhysicsIQ configuration file
|
| 2 |
+
# Usage: bash scripts/sample/teacache_physicsiq.sh <path_to_this_yaml>
|
| 3 |
+
|
| 4 |
+
# Basic configuration
|
| 5 |
+
benchmark: physicsiq
|
| 6 |
+
config_file: config/sample/5s_physicsiq.json
|
| 7 |
+
|
| 8 |
+
# GPU configuration
|
| 9 |
+
gpus: all
|
| 10 |
+
|
| 11 |
+
# PhysicsIQ dataset configuration
|
| 12 |
+
physicsiq_data_dir: /path/to/physicsiq
|
| 13 |
+
|
| 14 |
+
# Output path configuration
|
| 15 |
+
base_save_path: /path/to/output/physicsiq
|
| 16 |
+
|
| 17 |
+
# Reuse strategy configuration
|
| 18 |
+
reuse_strategy: all
|
| 19 |
+
rel_l1_thresh: 0.01
|
| 20 |
+
warmup_steps: 5
|
| 21 |
+
|
| 22 |
+
# Log configuration
|
| 23 |
+
log: false
|
FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/sample/teacache_vbench.yaml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TeaCache VBench configuration file
|
| 2 |
+
# Usage: bash scripts/sample/teacache_vbench.sh <path_to_this_yaml>
|
| 3 |
+
|
| 4 |
+
# Basic configuration
|
| 5 |
+
benchmark: vbench
|
| 6 |
+
config_file: config/sample/vbench.json
|
| 7 |
+
|
| 8 |
+
# GPU configuration
|
| 9 |
+
gpus: all
|
| 10 |
+
|
| 11 |
+
# VBench dataset configuration
|
| 12 |
+
vbench_prompt_dir: downloads/vbench/prompts_per_dimension
|
| 13 |
+
|
| 14 |
+
# Dimension configuration (specify the current dimension to process)
|
| 15 |
+
dimension: overall_consistency # Options: subject_consistency, scene, object_class, multiple_objects, color, spatial_relationship, temporal_style, human_action, temporal_flickering, appearance_style
|
| 16 |
+
|
| 17 |
+
# Output path configuration
|
| 18 |
+
base_save_path: /path/to/output/vbench
|
| 19 |
+
|
| 20 |
+
# Reuse strategy configuration
|
| 21 |
+
reuse_strategy: all
|
| 22 |
+
rel_l1_thresh: 0.01
|
| 23 |
+
warmup_steps: 5
|
| 24 |
+
|
| 25 |
+
# Log configuration
|
| 26 |
+
log: false
|
FlowCache/FlowCache4MAGI-1-dev-V2/yaml_config/single_run/config.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
rel_l1_thresh: 0.015
|
| 2 |
+
warmup_steps: 5
|
| 3 |
+
discard_nearly_clean_chunk: true
|
| 4 |
+
|
| 5 |
+
compress_kv_cache: true
|
| 6 |
+
total_cache_chunk_nums: 5
|
| 7 |
+
compress_strategy: token
|
| 8 |
+
mix_lambda: 0.07
|
| 9 |
+
query_granularity: frame
|
| 10 |
+
score_weighting_method: no_weight
|
| 11 |
+
power: 3
|
| 12 |
+
|
| 13 |
+
log: true
|
| 14 |
+
print_peak_memory: true
|
| 15 |
+
debug: false
|
FlowCache/FlowCache4MAGI-1-dev3-motion/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": "./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": true,
|
| 79 |
+
"enable_cuda_graph": false
|
| 80 |
+
}
|
| 81 |
+
}
|
FlowCache/FlowCache4MAGI-1-dev3-motion/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": "./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": true,
|
| 79 |
+
"enable_cuda_graph": false
|
| 80 |
+
}
|
| 81 |
+
}
|
FlowCache/FlowCache4MAGI-1-dev3-motion/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-dev3-motion/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": "./downloads/4.5B_distill",
|
| 66 |
+
"t5_pretrained": "./downloads/t5_pretrained",
|
| 67 |
+
"t5_device": "cuda",
|
| 68 |
+
"vae_pretrained": "./downloads/vae",
|
| 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-dev3-motion/inference/__init__.py
ADDED
|
File without changes
|
FlowCache/FlowCache4MAGI-1-dev3-motion/inference/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (196 Bytes). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev3-motion/inference/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (200 Bytes). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev3-motion/inference/common/__init__.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 .common_utils import divide, env_is_true, set_random_seed
|
| 16 |
+
from .config import EngineConfig, MagiConfig, ModelConfig, RuntimeConfig
|
| 17 |
+
from .dataclass import InferenceParams, ModelMetaArgs, PackedCoreAttnParams, PackedCrossAttnParams
|
| 18 |
+
from .logger import magi_logger, print_per_rank, print_rank_0
|
| 19 |
+
from .timer import event_path_timer
|
| 20 |
+
|
| 21 |
+
__all__ = [
|
| 22 |
+
"MagiConfig",
|
| 23 |
+
"ModelConfig",
|
| 24 |
+
"EngineConfig",
|
| 25 |
+
"RuntimeConfig",
|
| 26 |
+
"magi_logger",
|
| 27 |
+
"print_per_rank",
|
| 28 |
+
"print_rank_0",
|
| 29 |
+
"event_path_timer",
|
| 30 |
+
"divide",
|
| 31 |
+
"env_is_true",
|
| 32 |
+
"set_random_seed",
|
| 33 |
+
"PackedCoreAttnParams",
|
| 34 |
+
"PackedCrossAttnParams",
|
| 35 |
+
"ModelMetaArgs",
|
| 36 |
+
"InferenceParams",
|
| 37 |
+
]
|
FlowCache/FlowCache4MAGI-1-dev3-motion/inference/common/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (772 Bytes). View file
|
|
|
FlowCache/FlowCache4MAGI-1-dev3-motion/inference/common/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (802 Bytes). View file
|
|
|