Xinyi0214 commited on
Commit
653dfe9
·
verified ·
1 Parent(s): d3109a1

Remove README_RUN.md

Browse files
Files changed (1) hide show
  1. README_RUN.md +0 -110
README_RUN.md DELETED
@@ -1,110 +0,0 @@
1
- # Genie-Envisioner 视频生成 · Modal 运行说明
2
-
3
- 用 Modal 云 GPU 跑 GE-Base 视频生成,输入来自数据集
4
- `HuggingFriends/mllm-as-embodied-world-judge`。
5
-
6
- ## 0. 环境(本地,一次性)
7
-
8
- ```bash
9
- pip install modal
10
- ```
11
-
12
- ### 配置 Modal token
13
-
14
- 老师给的标准 Modal token 是 **一对** `token-id` + `token-secret`:
15
-
16
- ```bash
17
- modal token set --token-id ak-xxxxxxxx --token-secret as-xxxxxxxx
18
- ```
19
-
20
- > ⚠️ 你说现在只有「一串字符串」。Modal token 通常是两段,请确认:
21
- > - 如果那串里带冒号 `ak-...:as-...`,前半是 id、后半是 secret。
22
- > - 如果只有一段 `as-...`,可能只给了 secret,需要找老师补 token-id。
23
- > - 也可以走浏览器登录:`modal setup`(会打开网页授权,最省事)。
24
- >
25
- > 验证是否配好:`modal token list` 或随便 `modal run` 一下。
26
-
27
- ## 1. 跑通(先 1-2 条)
28
-
29
- ```bash
30
- modal run ge_modal_app.py --source agibot_world --limit 2
31
- ```
32
-
33
- 第一次会自动:① 下权重到 Volume(GE checkpoint 3.9GB + LTX 组件,约 10 分钟,只下一次)→ ② 取 2 条样本转格式 → ③ A100 上推理出 `video.mp4`。
34
-
35
- 之后再跑可跳过下权重:
36
-
37
- ```bash
38
- modal run ge_modal_app.py --source agibot_world --limit 2 --skip-weights
39
- ```
40
-
41
- ## 2. 取回结果
42
-
43
- ```bash
44
- modal volume get ge-outputs / ./outputs_local
45
- ```
46
-
47
- 每个样本一个文件夹,内含 `video.mp4`(生成视频)和 `prompt.txt`。
48
-
49
- ## 3. 放量 / 换来源 / 选 prompt 版本
50
-
51
- - `--source`:`agibot_world`(原生 3 相机,最契合)、`droid`、`libero`、`egodex`、
52
- `robotwin`、`open_x_embodiment` 等 11 个之一。
53
- - `--limit`:每个来源取多少条 episode。
54
- - `--variants`:用哪些 prompt 版本,逗号分隔,默认 `prefix,rewrite`。
55
-
56
- ### prompt 版本(prefix / rewrite 分开跑)
57
- 数据集每条 episode 的 `summary.json` 里有三种 prompt:`prompt`(原始指令)、
58
- `prompt_prefix`(带机器人场景前缀)、`prompt_rewrite`(详细改写)。我们用 `prefix` 和
59
- `rewrite`,**两者各自独立生成视频**。代码把每条 episode 按版本拆成独立目录
60
- `<id>__prefix` / `<id>__rewrite`(共用同一张 init_frame),所以输出里两者分开、可对照:
61
-
62
- ```
63
- outputs_local/
64
- agibot_world_task_0001_episode_0001__prefix/video.mp4
65
- agibot_world_task_0001_episode_0001__rewrite/video.mp4
66
- ```
67
-
68
- > 注意:`prompt_prefix` 字段在 agibot_world 是字符串、在 droid/egodex 等是列表,
69
- > 代码已统一兼容(`_extract_text`)。
70
-
71
- 只跑其中一种:`--variants prefix` 或 `--variants rewrite`。
72
-
73
- ## 关键设计点(请和老师确认)
74
-
75
- ### 数据桥接:单视角单帧 → GE 的 3 视角×4 帧
76
- - 我们数据每条只有 **1 张 init_frame + 1 条 prompt**。
77
- - GE-Base 训练用的是 **3 相机 × 每相机 4 历史帧**。
78
- - 默认 `bridge_mode="replicate"`:把 init_frame 复制成 3×4,留在模型训练 regime。
79
- 侧视角是复制出来的假视角,**质量需实测**。
80
-
81
- ### 另一条路:单视角单帧推理(OOD,可对比)
82
- 源码确认架构支持 `n_view=1`(`transformer_ltx_multiview.py` 的 `view_embed[:n_view]`),
83
- pipeline 也会在 `mem_size==1 & n_prev>1` 时自动复制帧。改法:
84
- 在 `run_inference` 里把 config 的 `data.train.valid_cam` 改成 `['head']`、
85
- `n_previous` 改 1,并把 `prepare_samples` 的 `valid_cams=("head",)`、`n_previous=1`。
86
- 但权重是 3 视角训练的,单视角属 out-of-distribution,能跑但质量未知。
87
-
88
- ### fast vs slow
89
- 默认 `ge_base_slow_v0.1.safetensors`(质量高、慢)。要快可在 `ge_modal_app.py`
90
- 把 `GE_CKPT_FILE` 改 `GE_base_fast_v0.1.safetensors`,并把 `config_name`
91
- 换成 `video_model_infer_fast.yaml`。
92
-
93
- ## 4. push 到 HF 给老师 review
94
-
95
- 老师要先 review 代码再 inference,所以先把**这个工程**推上去:
96
-
97
- ```bash
98
- pip install huggingface_hub
99
- huggingface-cli login # 用你的 HF token
100
-
101
- # 建一个 model 仓库(或 dataset 仓库)放代码
102
- huggingface-cli repo create ge-envisioner-modal --type model
103
-
104
- git clone https://huggingface.co/<你的用户名>/ge-envisioner-modal
105
- cp ge_modal_app.py README_RUN.md ge-envisioner-modal/
106
- cd ge-envisioner-modal && git add . && git commit -m "GE-Base Modal inference code" && git push
107
- ```
108
-
109
- 老师 review 通过后,再按上面步骤 1 跑推理。生成的视频也可以推到 HF(建议用
110
- dataset 仓库,`huggingface_hub` 的 `upload_folder` 上传 `outputs_local/`)。