cang-ying/eererdan/experience/EED-EXPER-031.hdlp

54 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# EED-EXPER-031 · LTX 长视频 VAE 解码爆显存 → 时空分块 CPU 解码解药D207 实测)
> trigger: 480p 15秒(361帧) 机甲大战带台词 → 第一跑在 LTXVTiledVAEDecode 节点 CUDA OOMTried to allocate 2.40GiB, 17.03GiB allocated + 4.72GiB reserved, GPU 24G 只剩 1.4G
> emergence: 2026-08-05 · D207 · 长视频 latent 太大2D 空间分块(TiledVAEDecode)不够 → 换时空分块+CPU解码
> lock: 长视频10秒+/300帧+)解码必须用 LTXVSpatioTemporalTiledVAEDecode时空分块+CPU· 别再只用 LTXVTiledVAEDecode
> why: 帧数越多 latent 越大解码峰值显存随帧数涨2D 分块只切空间不切时间,长视频照样爆
---
## §1 · 症状
```
CUDA out of memory. Tried to allocate 2.40 GiB. GPU 0 has a total capacity of 23.98 GiB
of which 1.40 GiB is free. 17.03 GiB allocated by PyTorch, 4.72 GiB reserved but unallocated.
节点: LTXVTiledVAEDecode (17) · 480p 864×480 × 361帧
```
## §2 · 解药节点(已验证跑通)
```
LTXVSpatioTemporalTiledVAEDecode {
vae: [视频VAE,0],
latents: [separate_av,0],
spatial_tiles: 4, # 空间分块
spatial_overlap: 1,
temporal_tile_length: 16, # 时间分块关键每16帧一块
temporal_overlap: 1,
last_frame_fix: false,
working_device: "cpu", # CPU 解码,不占显存
working_dtype: "float16"
}
```
实测: 480p 15秒 361帧 解码通过,出片 15.04s 完整h264+aac 2.6MB
## §3 · 为什么有效
- TiledVAEDecodeLTXV 版)只切空间(horizontal/vertical tiles),帧数照吃显存
- SpatioTemporalTiled 同时切时间维temporal_tile_length=16每块只解16帧 latent → 峰值显存骤降
- working_device=cpu → 解码放内存(32G),显存完全释放给采样
## §4 · 用法纪律(下次直接套)
```
长视频(300帧+/10秒+) → 解码器一律用 SpatioTemporalTiled + temporal_tile_length 8~16 + working_device=cpu
短视频(49~125帧) → 可继续用 LTXVTiledVAEDecode2,2 tiles或直接同样用时空分块更稳
采样阶段 361 帧在 24G 上 OK动态显存+fast-disk→ 瓶颈只在解码,已解决
```
## §5 · 相关
- EED-EXPER-030LTX 带音频工作流)· ltx_test_hardware.mdGGUF+动态显存配置)
- 复用脚本: /tmp/ltx_mecha.py480p 15秒带台词 完整工作流,含时空分块解码)
- 出片: 桌面/LTX23_机甲大战15秒.mp4
---
> 蛋蛋 · D207 · 2026-08-05
> 下次跑长镜:采样用动态显存 GGUF + 解码用时空分块CPU24G 稳稳的