Download runs/scripts/package_release.sh from BlueSourceJY/ERCBench-LongLive-400: direct link, hf CLI and curl.
- Browser
- Download file 5.59 kB
-
https://huggingface.co/datasets/BlueSourceJY/ERCBench-LongLive-400/resolve/main/runs/scripts/package_release.sh
- Command line
-
hf download hf://datasets/BlueSourceJY/ERCBench-LongLive-400/runs/scripts/package_release.sh
-
curl -L -o package_release.sh https://huggingface.co/datasets/BlueSourceJY/ERCBench-LongLive-400/resolve/main/runs/scripts/package_release.sh
5.59 kB
| # Builds ~/longlive_run/release (same layout as ERCBench-ShotStream-400). Fails if any episode is invalid. | |
| set -euo pipefail | |
| W=~/longlive_run; R=$W/release; LL=$W/LongLive/LongLive1.0 | |
| rm -rf $R; mkdir -p $R/inputs $R/runs/logs $R/runs/scripts | |
| python3 $W/finalize.py | tee $W/logs/finalize.log | |
| cp $W/inputs/prompts_{4,6,8}shot.jsonl $W/inputs/longlive_{4,6,8}shot.yaml $R/inputs/ | |
| cp $W/interactive_episode.diff $R/runs/ | |
| cp $W/logs/run.log $W/logs/tokens.jsonl $W/logs/finalize.log $R/runs/logs/ | |
| # multi-GPU worker logs exist only if the "eval finished early -> all GPUs on LongLive" switch fired | |
| for f in $W/logs/run_gpu*.log $W/logs/tokens_gpu*.jsonl; do [ -f "$f" ] && cp "$f" $R/runs/logs/; done | |
| [ -f ~/gen_common/ll_boost.log ] && cp ~/gen_common/ll_boost.log $R/runs/logs/ | |
| cp ~/gen_common/pre_restart_logs/run.log $R/runs/logs/run_killed_by_instance_restart_20261116.log | |
| python3 - <<'EOF' | |
| import csv, os | |
| # memory samples of the GPUs that generated LongLive episodes (gpu column of timing.csv) | |
| W = os.path.expanduser("~/longlive_run") | |
| used = sorted({r["gpu"] for r in csv.DictReader(open(f"{W}/release/runs/timing.csv"))}) | |
| rows = [r for r in csv.reader(open(os.path.expanduser("~/gen_common/gpu_mem.csv"))) if len(r) > 1 and r[1].strip() in used] | |
| with open(f"{W}/release/runs/logs/gpu{'_'.join(used)}_mem.csv", "w", newline="") as f: | |
| w = csv.writer(f); w.writerow(["timestamp_utc", "gpu", "memory_used", "utilization"]); w.writerows(rows) | |
| EOF | |
| cp $W/finalize.py $W/package_release.sh $W/run_all.sh $W/worker.sh ~/gen_common/ll_boost.sh ~/gen_common/make_inputs.py ~/gen_common/tok_hook_run.py \ | |
| $LL/interactive_episode.py ~/shotstream_run/scripts/verify_dataset.py $R/runs/scripts/ | |
| $W/venv/bin/pip freeze > $R/runs/pip_freeze.txt | |
| $W/venv/bin/python - <<'EOF' | |
| import csv, json, os, subprocess, sys, torch, torchvision, flash_attn, av | |
| W = os.path.expanduser("~/longlive_run") | |
| t = list(csv.DictReader(open(f"{W}/release/runs/timing.csv"))) | |
| drv = subprocess.run(["nvidia-smi", "--query-gpu=driver_version", "--format=csv,noheader"], capture_output=True, text=True).stdout.split()[0] | |
| m = { | |
| "longlive": {"repo": "https://github.com/NVlabs/LongLive", "commit": "31c70d9071cd7851d82939806dc9fac645fcabe5", "subdir": "LongLive1.0"}, | |
| "models": {"Wan-AI/Wan2.1-T2V-1.3B": "37ec512624d61f7aa208f7ea8140a131f93afc9a", | |
| "Efficient-Large-Model/LongLive-1.3B (models/longlive_base.pt, models/lora.pt)": "cda9138d93872ef109d9a74c270184eb3a5acc6e"}, | |
| "prompt_dataset": {"repo": "BlueSourceJY/ERCBench-StoryMem-400", "revision": "c96eccaf5f9de67181aa6bdcd22fae85252d5821", | |
| "zip": "storymem_inputs_400.zip", "zip_sha256": "50ac67c03afc261a0228fc894596832676f4126ebf1a0edc5bf2628decc71c2f", | |
| "episode_list": "storymem_inputs/priority_200.ids.txt", "files_verified": 2045, "prompts_verified": 1000}, | |
| "software": {"python": sys.version.split()[0], "torch": torch.__version__, "torch_cuda": torch.version.cuda, | |
| "torchvision": torchvision.__version__, "flash_attn": flash_attn.__version__, "pyav": av.__version__, | |
| "cudnn": torch.backends.cudnn.version(), "nvidia_driver": drv, | |
| "note": "torchao removed (peft 0.21.3 rejects torchao<0.16; torchao>=0.16 needs newer torch; LongLive does not import it)"}, | |
| "attention_backend": "FlashAttention-2 (flash_attn 2.8.3.post2)", | |
| "video_writer": "torchvision.io.write_video(fps=16) unchanged", | |
| "gpu": {"model": "NVIDIA H200", "used": sorted({int(r["gpu"]) for r in t}), | |
| "processes": "one process per shot-count config, run 4-shot -> 6-shot -> 8-shot" + ("" if {r["gpu"] for r in t} == {"1"} else | |
| "; after the ShotStream eval finished, GPU 1 was joined by claim-based workers on GPUs 0-3 (one process per config per GPU, every process draws the noise of all episodes in order, so per-episode noise is unchanged)")}, | |
| "generation_settings": {"config": "configs/longlive_interactive_inference.yaml with only data_path, output_folder, num_output_frames and switch_frame_indices changed (inputs/longlive_{4,6,8}shot.yaml)", | |
| "latent_frames_per_shot": 21, "num_output_frames": "21 x shot_count latent frames", "switch_frame_indices": "21, 42, ... (one prompt per 21 latents)", | |
| "pixel_frames": "4 x latent_frames - 3 (333 / 501 / 669 for 4 / 6 / 8 shots)", | |
| "denoising_step_list": [1000, 750, 500, 250], "num_frame_per_block": 3, "local_attn_size": 12, "sink_size": 3, "global_sink": True, | |
| "seed": 1, "seed_policy": "config default; torch seeded once per process (one process per shot-count config); the noise for skipped episodes is still drawn so a resumed run matches an uninterrupted one", | |
| "fps": 16, "resolution": "832x480", "cut_type": "prompt switch, not a hard cut"}, | |
| "episodes": len(t), "shots": sum(int(r["shot_count"]) for r in t), | |
| "generation_seconds_total": round(sum(float(r["seconds"]) for r in t), 1), | |
| "start_dubai": min(r["start_dubai"] for r in t), "end_dubai": max(r["end_dubai"] for r in t), | |
| } | |
| json.dump(m, open(f"{W}/release/runs/run_manifest.json", "w"), indent=2) | |
| print("manifest ok", m["episodes"], m["shots"], m["start_dubai"], m["end_dubai"]) | |
| EOF | |
| cp $W/README_release.md $R/README.md | |
| ls $W/logs/run_gpu*.log >/dev/null 2>&1 && sed -i 's/One NVIDIA H200 (GPU 1)\./NVIDIA H200: GPU 1 alone, then GPUs 0-3 (claim-based workers) after the ShotStream evaluation finished; `gpu_index` per episode in metadata.json and timing.csv./' $R/README.md | |
| n_mp4=$(find $R/episodes -name episode.mp4 | wc -l); n_md=$(find $R/episodes -name metadata.json | wc -l) | |
| echo "release: $n_mp4 mp4, $n_md metadata.json, $(du -sh $R | cut -f1)" | |
| [ "$n_mp4" = 200 ] && [ "$n_md" = 200 ] | |