sdfwasdf commited on
Commit
67b9ee0
·
verified ·
1 Parent(s): 0635a72

Upload trained step_14000.pt with config and SHA-256

Browse files
Files changed (5) hide show
  1. README.md +49 -0
  2. SHA256SUMS +4 -0
  3. checkpoint_info.json +28 -0
  4. stage2_mix.yaml +73 -0
  5. step_14000.pt +3 -0
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - zh
4
+ - en
5
+ base_model: Wan-AI/Wan2.1-T2V-1.3B
6
+ tags:
7
+ - stereo
8
+ - wan2.1
9
+ - pytorch
10
+ - image-to-image
11
+ ---
12
+
13
+ # 3D VAE Step2
14
+
15
+ 图像与视频混合训练的左目生成右目,训练至 **14,000 steps** 的原始 full checkpoint。
16
+
17
+ 代码与完整准备流程:[WangHaiyan378/3D_VAE](https://github.com/WangHaiyan378/3D_VAE),发布时对应提交 `77f53f5`。
18
+
19
+ - 权重文件:`step_14000.pt`,17,030,129,902 bytes。
20
+ - Wan2.1-T2V-1.3B DiT,全量微调;32 通道输入由噪声 latent(16)与左目 latent(16)拼接。
21
+ - checkpoint 包含 `model`、`optim`、`step`、`finetune`、`cfg`,保留完整优化器状态。
22
+ - 配套 `stage2_mix.yaml` 是代码仓库的可迁移配置模板;原始训练配置保存在 checkpoint 的 `cfg` 中,包含原训练环境路径,使用时请按本机路径调整。
23
+ - 本仓库只提供该阶段 checkpoint;官方 Wan/VAE/T5 权重和文本缓存需要按代码仓库说明准备。
24
+ - 文件是项目自定义 PyTorch checkpoint,需要先安装并在代码仓库内使用;不是 Diffusers 或 Transformers 的 `from_pretrained` 格式。原始配置包含项目 Config 对象,项目加载器使用 `weights_only=False`。
25
+
26
+ ## 下载及使用
27
+
28
+ 在代码仓库根目录、安装依赖后执行:
29
+
30
+ ```python
31
+ from huggingface_hub import hf_hub_download
32
+ from pathlib import Path
33
+ import shutil
34
+
35
+ downloaded = hf_hub_download('sdfwasdf/3D_VAE_Step2_model', 'step_14000.pt')
36
+ target = Path('output/mix_1.3b_full/checkpoints/latest.pt')
37
+ target.parent.mkdir(parents=True, exist_ok=True)
38
+ shutil.copyfile(downloaded, target)
39
+ ```
40
+
41
+ 按代码仓库 README 准备官方权重与文本缓存,再运行:
42
+
43
+ ```bash
44
+ python -m video.stereo_mix.infer.infer_video --config configs/stage2_mix.yaml --ckpt output/mix_1.3b_full/checkpoints/latest.pt --input left.mp4 --output right.mp4 --num-frames 81 --steps 30
45
+ ```
46
+
47
+ 本阶段从 [Step1 的 step_4000.pt](https://huggingface.co/sdfwasdf/3D_VAE_Step1_model) 初始化。可直接作为代码仓库 Stage3 深度条件训练的 `model.init_from`。
48
+
49
+ 文件字节数与 SHA-256 见 `checkpoint_info.json` 和 `SHA256SUMS`。
SHA256SUMS ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ 67df9a81ca47b715617a3c7020274b8a6a166b92931ba05decee686688a395ee README.md
2
+ fe5353ab444328dd2a96bd8c3cb219b1e052d5b39b487c684abc57161ebaffe3 checkpoint_info.json
3
+ 8c2618a9462489fee7d130e2b39b05269fd5f0c4f0a5b1bcbdd36e9b2cad22a7 stage2_mix.yaml
4
+ b05f711da2a2af2ae0d2d92b8c8ced48eb051ffcf5ad238fcb667666e4ee7f82 step_14000.pt
checkpoint_info.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo_id": "sdfwasdf/3D_VAE_Step2_model",
3
+ "stage": 2,
4
+ "step": 14000,
5
+ "finetune": "full",
6
+ "filename": "step_14000.pt",
7
+ "size_bytes": 17030129902,
8
+ "sha256": "b05f711da2a2af2ae0d2d92b8c8ced48eb051ffcf5ad238fcb667666e4ee7f82",
9
+ "checkpoint_keys": [
10
+ "model",
11
+ "optim",
12
+ "step",
13
+ "finetune",
14
+ "cfg"
15
+ ],
16
+ "model_parameter_keys": 825,
17
+ "patch_embedding_shape": [
18
+ 1536,
19
+ 32,
20
+ 1,
21
+ 2,
22
+ 2
23
+ ],
24
+ "includes_optimizer": true,
25
+ "code_repository": "https://github.com/WangHaiyan378/3D_VAE",
26
+ "code_revision": "77f53f5e2cc759f6418e0bd0e73eec1def63016a",
27
+ "initialization": "sdfwasdf/3D_VAE_Step1_model/step_4000.pt"
28
+ }
stage2_mix.yaml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ============================================================================
2
+ # 图像+视频混合 左目->右目(Wan2.1-T2V-1.3B 主干)—— 全量微调 DiT
3
+ # 结构与单帧图像模型完全一致:输入 32 通道 = [噪声(16) | 左目(16)],
4
+ # 不改 Conv3d;一次送入整段 clip(视频81帧->21潜时片;图像->1潜时片)。
5
+ # 无历史/mask 通道;损失只在潜空间做 flow-matching MSE。
6
+ # 按 video_ratio 混合图像 batch 与视频 batch,保留原图像左转右能力。
7
+ # ============================================================================
8
+ seed: 42
9
+
10
+ # ---- 数据 ----
11
+ data:
12
+ # 图像:stereo_concat.prepare_data 产出的预处理根目录(uuid/left.jpg,right.jpg + splits.json)
13
+ image_processed_root: datasets/picture_480x832
14
+ image_max_items: null
15
+ # 视频:下载脚本产出的左右目视频根目录 + scan_videos 生成的 splits.json
16
+ video_root: datasets/videos
17
+ video_split_file: null # 留空则默认 <video_root>/splits.json
18
+ video_max_items: null
19
+ size: [480, 832] # 统一分辨率 [H, W](横屏),图像/视频一致
20
+ num_frames: 81 # 视频每 clip 帧数,需 4k+1
21
+ samples_per_video: 4 # 每段视频每 epoch 随机采样次数
22
+ video_ratio: 0.5 # 每个优化步选「视频 batch」的概率(其余为图像 batch)
23
+
24
+ # eval 集(从各自 train 划分预留,不参与训练)
25
+ eval_images: 20 # 预留作 eval 的图像对数量
26
+ eval_videos: 5 # 预留作 eval 的视频段数量
27
+
28
+ # ---- 模型(与图像模型一致)----
29
+ model:
30
+ backbone: t2v-1.3B
31
+ checkpoint_dir: checkpoints/Wan2.1
32
+ wan_repo: third_party/Wan2.1
33
+ vae_checkpoint: null
34
+ text_cache: datasets/text_ctx_1.3b.pt
35
+ # 用预训练图像模型 checkpoint 初始化(结构一致,键完全对齐)
36
+ init_from: output/concat_1.3b_full/checkpoints/latest.pt
37
+ dtype: bfloat16
38
+ device: cuda
39
+
40
+ finetune: full # full | lora
41
+
42
+ flow_match:
43
+ scheme: logit_normal
44
+ logit_mean: 0.0
45
+ logit_std: 1.0
46
+ shift: 1.0
47
+ infer:
48
+ shift: 5.0
49
+
50
+ lora: # finetune=lora 时生效
51
+ r: 16
52
+ alpha: 16
53
+ dropout: 0.0
54
+ targets: [q, k, v, o, ffn]
55
+
56
+ # ---- 训练 ----
57
+ train:
58
+ output_dir: output/mix_1.3b_full
59
+ lr: 2.0e-5 # 已有图像能力,做视频泛化用更小 lr
60
+ beta2: 0.95
61
+ weight_decay: 0.0
62
+ image_batch_size: 16 # 图像 batch(单帧,显存小)
63
+ video_batch_size: 2 # 视频 batch(81帧,显存重)
64
+ num_workers: 4
65
+ grad_accum: 2
66
+ max_steps: 40000
67
+ log_every: 20
68
+ save_every: 1000
69
+ eval_every: 500 # 每多少步在 eval 集上算一次 图像/视频 loss
70
+ max_grad_norm: 1.0
71
+ grad_checkpointing: true
72
+ ddp_find_unused: false
73
+ resume: auto
step_14000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b05f711da2a2af2ae0d2d92b8c8ced48eb051ffcf5ad238fcb667666e4ee7f82
3
+ size 17030129902