|
Download WEIGHTS.md from Randyhan/ani_data: direct link, hf CLI and curl.
- Browser
- Download file 8.31 kB
-
https://huggingface.co/Randyhan/ani_data/resolve/main/WEIGHTS.md
- Command line
-
hf download hf://Randyhan/ani_data/WEIGHTS.md
-
curl -L -o WEIGHTS.md https://huggingface.co/Randyhan/ani_data/resolve/main/WEIGHTS.md
8.31 kB
| # GraphMem 模型权重:来源登记与恢复 | |
| 目标:把 `GraphMem` 上传到 HuggingFace,模型权重不随仓库上传。 | |
| 全部权重(**63 个文件 / 413.3 GB**)已从项目目录移出,备份在 | |
| `/nfs/yinhanzhang/checkpoint-backup/`,按原相对路径存放(与项目同一文件系统,`rename` 移动,不额外占空间)。 | |
| 项目内保留配置类小文件(`config.json`、`*.safetensors.index.json`、`README.md`、`.gitattributes`、 | |
| `adapter_config.json`、tokenizer 配置等),模型目录结构由脚本自动创建。 | |
| - `weights_manifest.json`:逐文件登记原路径、来源 URL、精确字节数、备份路径 | |
| - `download_weights.py`:恢复脚本,仅依赖 Python 标准库 + `curl` | |
| - 所有来源均已用 HuggingFace API / HTTP HEAD 核对过文件名与字节数 | |
| ## 1. 六个子项目的权重来源 | |
| | 项目 | 本地权重目录 | 下载来源 | 大小 | 组 id | | |
| |---|---|---|---|---| | |
| | JoyAI-Echo | `echo_wm/checkpoints/` | `Echo-Team/Echo-WM`(base / flash 两个 44.5GB safetensors) | 89.0 GB | `echo-wm` | | |
| | JoyAI-Echo | `echo_wm/checkpoints/gemma-3/` | `google/gemma-3-12b-it-qat-q4_0-unquantized`(**gated**) | 22.7 GB | `echo-wm-gemma` | | |
| | lingbot-world-v2 | `ckpt/` | `robbyant/lingbot-world-v2-14b-causal-fast` | 80.1 GB | `lingbot-v2` | | |
| | WorldKV | `lingbot-world-base-cam/` | `robbyant/lingbot-world-base-cam` | 149.2 GB | `worldkv-base-cam` | | |
| | WorldKV | `lingbot-world-base-cam/lingbot_world_fast/` | `robbyant/lingbot-world-fast` | 69.1 GB | `worldkv-fast` | | |
| | dymemv2 | `evaluation/models/`、`evaluation/utils/weights/`、`evaluation/VBench/.../nudenet/` | VBench / DreamSim 评估权重,见下表 | 3.2 GB | `dymemv2-*` | | |
| dymemv2 的评估权重来源: | |
| | 文件 | 来源 | | |
| |---|---| | |
| | `models/checkpoints/cotracker2.pth` | HF `facebook/cotracker` → `cotracker2.pth` | | |
| | `models/checkpoints/dino_vitbase16_pretrain.pth` | DINO 官方 `https://dl.fbaipublicfiles.com/dino/dino_vitbase16_pretrain/dino_vitbase16_pretrain.pth` | | |
| | `models/{clip,open_clip}_vitb16_pretrain.pth.tar`、`models/dino_vitb16_pretrain.pth`、`models/ensemble_lora/adapter_model.safetensors` | HF `meituan-longcat/WBench-weights` 的 `dreamsim/` 目录;官方原始包为 GitHub release `ssundaram21/dreamsim` → `v0.2.0-checkpoints/dreamsim_ensemble_checkpoint.zip`(本地 `models/pretrained.zip` 即该文件,内容已解压,故标为 optional) | | |
| | `utils/weights/i3d_pretrained_400.pt` | HF `Xiaodong/FVD_I3D` → `i3d_pretrained_400.pt` | | |
| | `VBench/.../nudenet/best.onnx` | HF `vladmandic/nudenet` → `nudenet.onnx`(本地改名为 `best.onnx`) | | |
| **项目内没有权重文件的两个项目**(因此无需移动,需要运行时按官方说明下载): | |
| - `HY-WorldPlay`:官方脚本 `python download_models.py --hf_token <token>`,依赖 | |
| `tencent/HY-WorldPlay`、`tencent/HunyuanVideo-1.5`(480P-I2V)、`Qwen/Qwen2.5-VL-7B-Instruct`、 | |
| `google/byt5-small`、`AI-ModelScope/Glyph-SDXL-v2`、`black-forest-labs/FLUX.1-Redux-dev`(gated)。 | |
| 详见 `HY-WorldPlay/README.md` 的 "Download All Required Models"。 | |
| - `lingbot-world`:官方仓库 README 指向 `robbyant/lingbot-world-base-cam` 与 | |
| `robbyant/lingbot-world-fast`(ModelScope: `Robbyant/...`);本项目目录里只有推理输出, | |
| 实际权重在 `WorldKV/lingbot-world-base-cam/`。 | |
| ## 2. 官方等价下载命令 | |
| ```bash | |
| pip install "huggingface_hub[cli]" | |
| hf download Echo-Team/Echo-WM --local-dir checkpoints | |
| hf download google/gemma-3-12b-it-qat-q4_0-unquantized --local-dir checkpoints/gemma-3 # gated | |
| huggingface-cli download robbyant/lingbot-world-v2-14b-causal-fast --local-dir ./ckpt | |
| huggingface-cli download robbyant/lingbot-world-base-cam --local-dir ./lingbot-world-base-cam | |
| huggingface-cli download robbyant/lingbot-world-fast --local-dir ./lingbot-world-base-cam/lingbot_world_fast | |
| wget https://huggingface.co/facebook/cotracker/resolve/main/cotracker2.pth | |
| ``` | |
| 上面的目标目录与本项目路径不完全一致,直接用本脚本 `--mode download` 会按清单放回项目内的正确位置。 | |
| ## 3. 恢复脚本用法 | |
| ```bash | |
| # 查看各组状态(项目内 / 备份内是否齐全、大小是否正确) | |
| python download_weights.py --mode verify | |
| # 查看来源明细 | |
| python download_weights.py --mode list | |
| # 上传 HF 前:把权重从项目移到 /nfs/yinhanzhang/checkpoint-backup | |
| python download_weights.py --mode stash | |
| # 本机继续跑实验:从备份秒级恢复(硬链接,不额外占空间) | |
| python download_weights.py --mode restore | |
| # 换机器 / 没有备份:按登记的开源来源重新下载(支持断点续传、并发、大小校验) | |
| python download_weights.py --mode download --jobs 2 | |
| python download_weights.py --mode download --only echo-wm # 只恢复某一组 | |
| python download_weights.py --mode download --token hf_xxx # gemma-3 gated 仓库需要 | |
| python download_weights.py --mode download --dry-run # 只打印将要下载的内容 | |
| # 从本地文件重新生成清单 | |
| python download_weights.py --mode manifest | |
| ``` | |
| 常用参数:`--only <组id或项目名>`(可重复)、`--backup-dir <路径>`、`--dry-run`、 | |
| `--copy`(restore 时用复制代替硬链接)、`--include-optional`(下载 optional 的 `pretrained.zip`)、 | |
| `--force`(忽略已存在文件重新下载)。`HF_TOKEN` 环境变量等价于 `--token`。 | |
| ## 4. 注意事项 | |
| - `google/gemma-3-12b-it-qat-q4_0-unquantized` 是 gated 仓库,需先在 HF 上同意许可,再用 | |
| `--token` 下载;必须保持 **unquantized** 版本,编码器以 bf16 运行。 | |
| - 下载按 `weights_manifest.json` 中的字节数校验,失败会保留 `.part` 文件供续传。 | |
| - 未移动(不是权重,但体积大,上传前建议另行处理): | |
| `lingbot-world-v2/cases_0923.zip`(8.9 GB)、`com_case.zip`、`more_case 2.zip` 等数据压缩包; | |
| 各项目 `output*/`、`results/`、`checkpoints/../outputs` 等实验输出视频;pose `.npz`;日志。 | |
| - 项目内还有约 2276 个符号链接指向 `/nfs/yinhanzhang/Orignial_Code/...`(推理结果视频), | |
| 上传 HuggingFace 后会断链,上传前需删除、实体化或排除。 | |
| - `.git` 元数据已在上一步清理,各仓库 remote / commit / 本地改动记录在 `GIT_RESTORE_INFO.md`。 | |
| ## 5. 数据压缩包与符号链接排除 | |
| 三个非权重的数据压缩包(都在 `lingbot-world-v2/`,合计约 9.5 GiB / 10.18 GB): | |
| | 文件 | 大小 | | |
| |---|---| | |
| | `lingbot-world-v2/cases_0923.zip` | 9145.6 MiB(8.93 GiB) | | |
| | `lingbot-world-v2/com_case.zip` | 282.4 MiB | | |
| | `lingbot-world-v2/more_case 2.zip` | 280.1 MiB | | |
| | **合计** | 9708.1 MiB = 9.48 GiB ≈ 10.18 GB(十进制) | | |
| 它们是评测用例数据,不是模型权重,因此没有移到 `checkpoint-backup`;上传前单独决定是否保留。 | |
| ### 排除清单 `hf_exclude_symlinks.txt` | |
| 逐行列出 2276 个符号链接的项目内相对路径(无通配符、无空格),可直接用于 | |
| `zip -x@` / `tar --exclude-from` / `rsync --exclude-from`。已验证覆盖 2276/2276 个链接; | |
| `tar --exclude-from` 对比测试中,打包条目数正好减少对应目录的链接数。 | |
| 这些链接**全部是断链**(目标已不存在): | |
| - 490 个指向 `/nfs/yinhanzhang/Orignial_Code/...` | |
| - 1786 个指向 `/nfs/yinhanzhang/dymemv2/...`(旧项目根路径,现项目位于 `GraphMem/dymemv2`) | |
| 链接集中在各项目的 `.../_vbench_long/` 评估目录。本地链接保留,打包时排除即可: | |
| ```bash | |
| cd /nfs/yinhanzhang/GraphMem | |
| zip -r -q /nfs/yinhanzhang/code_backup/dymemv2.zip dymemv2 -x@hf_exclude_symlinks.txt | |
| # 其余项目同理;tar / rsync 用 --exclude-from=hf_exclude_symlinks.txt | |
| ``` | |
| 如需从项目内彻底移除这些断链(可用清单逐条删除,不可逆): | |
| `while IFS= read -r p; do [ -L "$p" ] && rm -- "$p"; done < hf_exclude_symlinks.txt` | |
| ### 打包前必须注意 | |
| - `note.md` 含 HuggingFace token 明文,**不要打进任何上传包**;建议立即在 HF 撤销并轮换该 token。 | |
| - 当前磁盘几乎写满:`/` 仅剩约 152 MB,`/nfs`(Lustre 50T)显示 0 可用。项目本体约 97 GB, | |
| 生成 zip 需要等量空间,执行打包前须先腾出空间,或改用流式打包 / 分批上传。 | |