<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片]]></title><description><![CDATA[<h1>ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片</h1>
<blockquote>
<p dir="auto">发帖版 v1.3 · 2026-11-28 · 数据全部来自本机实测（非厂商标称、非推算），关键数字均留有日志/校验值可查<br />
v1.2 更新：A3–A6 全档补测收口（8 步全通），并据 A3 实测修正「天花板」结论为「像素×帧联合峰」（v1.1 曾记为卡帧数）。<br />
v1.3 更新：新增 §6.4 三种生成模式（T2VA/FL2VA/Ref2VA）对照——换模式不改显存墙，参考图 token 无可测开销。<br />
主角：两张 AMD 显卡的家用工作站，跑 MiniMax-H3（FL2VA）图生视频 + 音频，目标是把「两卡到底能出多大的片、多快、差在哪」摸成一张可对表的基线。<br />
关于「1080p」的口径：本文说的 1080p 级指 <strong>1152×2048 竖屏 = 2.36 MP</strong>，像素量高于标准横屏 1080p（1920×1080 = 2.07 MP）；与横屏 1920×1072 属不同赛道，本文只报本次实测的竖屏规格，数字不混用。</p>
</blockquote>
<hr />
<h2>〇、先给结论（不想看全文的看这段）</h2>
<ol>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f534.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--red_circle" style="height:1.4em;width:auto;vertical-align:middle" title="🔴" alt="🔴" /> <strong>实现了 1080p 级长片出片——这是本轮最重要的一条</strong>。开启 DynamicVRAM 后，<strong>1152×2048 竖屏、362 帧、15 秒不切镜</strong>的长片在 R9700 32G 上稳定出片（4 步 1433.1s / 8 步 2546.7s），这块曾是 OOM 死法位；7900 XTX 24G 在同规格降到 276 帧也能出片。1152×2048 是 2.36 MP 竖屏，像素量比标准横屏 1080p（1920×1080 = 2.07 MP）还多 14%——两张消费级 AMD 卡跑通这个量级的音画同生长片，是这次摸底最硬的结论。</li>
<li><strong>新设置让两卡产能差从 2:1 缩到约 1.6:1</strong>。开启 DynamicVRAM 后，R9700 32G 与 7900 XTX 24G 的单条稳态耗时从「2 倍差」收敛到「1.6 倍差」；两卡内存峰值都压到 7G 上下，24G 卡也能用——省内存收益在两张卡上都成立。</li>
<li><strong>天花板卡在「像素×帧」的联合峰，不是单一维度</strong>。7900 XTX 24G 在 1152×2048（2.36MP）下 362 帧 OOM、降到 276 帧出片；但把像素减半到 768×1344（1.03MP）后，同样 362 帧也出片了。两个方向都能破墙——显存墙是分辨率与帧数的联合激活峰，不是单纯帧数。</li>
<li><strong>步数不抬显存峰，只抬耗时</strong>。同一档 4 步 / 8 步的显存峰只差几十 MB（噪声级），但耗时涨 1.6–1.8 倍。画质白拿，代价只有时间。</li>
<li><strong>8 步是交付画质，4 步只能看结构</strong>。长片（&gt;10s）用 4 步严重欠采样——实测出现抬手拖影糊块、动作链断裂；8 步动作完整、手部清晰。节点出厂默认是 4 步，但我们全程没挂 turbo LoRA，是原装权重手动加到 8 步，一步都省不得。</li>
<li><strong>首帧图比例必须和出片画幅一致</strong>，否则人物被纵向拉长——这个坑踩得实在：2:3 的图塞进 9:16 画幅，人拉长 18.5%。</li>
<li><strong>换生成模式不改显存墙</strong>。同一套 1152×2048 规格分别用 FL2VA（首尾帧）和 Ref2VA（参考图）跑，两卡的 OOM 边界、耗时、显存峰逐项对得上（8 步顶格 2546.7s vs 2555.9s，只差 0.36%）——上面这条「像素×帧」曲线是这套栈的物理上限，跟用哪种条件模式无关，参考素材不额外吃显存。</li>
</ol>
<hr />
<h2>一、两台主机的硬件配置</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>Radeon AI PRO R9700（32G）</th>
<th>RX 7900 XTX（24G）</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU</td>
<td>Intel Core i3-14100F（4C8T，max 4.7GHz）</td>
<td>Intel Core i5-12490F（12 代，6C12T，max 4.6GHz）</td>
</tr>
<tr>
<td>主板</td>
<td>Maxsun MS-Terminator B760M D4</td>
<td>UNIKA UN-B760M ARGB PRO 2.5G</td>
</tr>
<tr>
<td>内存</td>
<td>61.6 GiB + Swap 32 GiB</td>
<td>61.4 GiB + Swap 8 GiB</td>
</tr>
<tr>
<td>GPU</td>
<td>AMD Radeon AI PRO R9700（Navi 48 / gfx1201）</td>
<td>AMD Radeon RX 7900 XTX（Navi 31 / gfx1100）</td>
</tr>
<tr>
<td>显存</td>
<td>31.9 GiB（aimdo 报 32624 MB）</td>
<td>24.0 GiB（aimdo 报 24560 MB）</td>
</tr>
<tr>
<td>OS 内核</td>
<td>Ubuntu 26.04.1 LTS / 7.0.0-44-generic</td>
<td>同左</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">两台主机都是 DDR4 平台。有意思的是：CPU 更弱的 R9700 那台（i3）配了更强的卡，反而在顶格档更快——说明这活儿是 GPU 采样主导，CPU 只在内存换入阶段露脸。</p>
</blockquote>
<h2>二、软件栈版本（两台主机逐字一致）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>组件</th>
<th>版本</th>
</tr>
</thead>
<tbody>
<tr>
<td>Python</td>
<td>3.13.15（Clang 22.1.3 编译）</td>
</tr>
<tr>
<td>PyTorch</td>
<td>2.11.0+rocm7.1</td>
</tr>
<tr>
<td>ROCm</td>
<td>7.1.0（hipcc 7.1.1 / rocm-smi 7.1.1）</td>
</tr>
<tr>
<td>ComfyUI</td>
<td>0.46.2</td>
</tr>
<tr>
<td>comfy-kitchen</td>
<td>0.2.41</td>
</tr>
<tr>
<td>注意力引擎</td>
<td>comfy-aimdo（日志：<code>comfy-aimdo inited</code>）+ CK attention</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">两卡版本完全对齐是这次摸底的前提——否则「两卡差多少」里会掺进软件栈差异，测了白测。日志三行铁证：<code>pytorch version: 2.11.0+rocm7.1</code> / <code>ROCm version: (7, 1)</code> / <code>ComfyUI version: 0.46.2</code>。</p>
</blockquote>
<h2>三、ComfyUI 设置</h2>
<p dir="auto"><strong>隔离部署</strong>：每机两套 ComfyUI 树，生产树常驻不动，测试用独立树 <code>ComfyUI_lc</code> + 独立 venv + 独立端口（8189 / 8191）。测试全程不碰生产实例——这是能长时间压测的前提。</p>
<p dir="auto"><strong>启动 flag（两卡一致）</strong>：</p>
<pre><code class="language-bash">python main.py \
  --disable-pinned-memory \
  --listen 0.0.0.0 --port 8189 \
  --use-ck-attention \
  --enable-dynamic-vram \
  --vram-headroom 0 \
  --disable-smart-memory
</code></pre>
<p dir="auto">关键是后三个：<code>--enable-dynamic-vram</code> 打开动态显存，<code>--vram-headroom 0</code> 不留自留显存，<code>--disable-smart-memory</code> 关掉智能内存管理。日志确认启用层生效：<code>DynamicVRAM support detected and enabled</code>。</p>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 两个实测踩坑，写在这里给同好避坑：</p>
<ul>
<li><code>--vram-headroom</code> 别设成 1。设 1 等于自留 1GiB 完全不用，长帧直接 OOM；设 0 才能把卡用满。</li>
<li><code>expandable_segments</code> 在 ROCm/HIP 上无效。7900 XTX 启动日志明确警告 <code>expandable_segments not supported on this platform</code>。所以长帧 OOM 后看到的「大块 reserved-but-unallocated 碎片」在 ROCm 上靠这个开关回收不了，得靠别的手段。</li>
</ul>
</blockquote>
<p dir="auto"><strong>采样链</strong>（脚本里固定，不随测试改）：</p>
<ul>
<li>节点链：<code>UNETLoader → ModelAttentionBackend(sol-attn 五参) → MiniMaxH3DualClockSamplerT8 → BasicGuider → SamplerCustomAdvanced → VAE Decode → SaveVideo</code></li>
<li>调度：<code>native_flow</code>，euler，<code>shift_video=12.0</code> / <code>shift_audio=3.0</code></li>
<li>注意力：<code>sol-attn</code>（block sparse）+ CK attention</li>
<li>音频：<code>ref_audio</code> 音色参考 + prompt 内台词，走 H3 原生音画同生</li>
</ul>
<h2>四、模型权重（两台主机逐字节一致）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>组件</th>
<th>文件 / 版本</th>
<th>大小</th>
</tr>
</thead>
<tbody>
<tr>
<td>UNET 主干</td>
<td><code>minimax_h3_fl2va_pruned_int8_convrot.safetensors</code>（md5 <code>dc15f76e…</code>）</td>
<td>20.98 GB</td>
</tr>
<tr>
<td>文本编码器</td>
<td><code>qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors</code>（type=minimax）</td>
<td>14.96 GB</td>
</tr>
<tr>
<td>视频 VAE</td>
<td><code>minimax_h3_video_vae_fp16.safetensors</code></td>
<td>4.97 GB</td>
</tr>
<tr>
<td>音频 VAE</td>
<td><code>minimax_h3_audio_vae_fp32.safetensors</code></td>
<td>—</td>
</tr>
</tbody>
</table>
<p dir="auto">要点：</p>
<ul>
<li>主干是 <strong>FL2VA</strong>（first-last-frame to video+audio），配首帧图 + 音频驱动走图生视频。</li>
<li><strong>int8_convrot 量化</strong>：实测对比过 <code>fp8_scaled</code>，后者不省显存、不提速，还有量化损失（PSNR 33.99 / SSIM 0.9567），所以产线锁 int8_convrot。</li>
<li><strong>没有挂任何 LoRA</strong>。模型目录里那些 <code>turbo_4step_v0.1</code> / <code>turbo_8step_v1.0</code> 是另一条技术路线的产物，本次 graph 里根本没有 LoraLoader 节点。4 步 / 8 步是靠 sampler 的 <code>steps</code> 参数直接控制的——这是理解后面所有步数结论的关键。</li>
</ul>
<h2>五、跑片的标准</h2>
<p dir="auto"><strong>测试内容</strong>（全程固定，让「规格/步数」成为唯一变量）：</p>
<ul>
<li>首帧：F-D2 定稿半身图（紫挑染 + 黑皮夹克，竖版），修成 9:16 后 1152×2048</li>
<li>动作链 prompt：原地转身 → 抬手拨发 → 回望镜头开口，15 秒不切镜</li>
<li>音频：固定一条 24.5s 的中文 TTS 作音色/口型驱动</li>
<li>两卡同 seed 对表，每档唯一 seed 防缓存假快</li>
</ul>
<p dir="auto"><strong>步数口径</strong>：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>档</th>
<th>定位</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>4 步</td>
<td>结构验证档</td>
<td>节点出厂默认，快 35–40%，<strong>画面不可信</strong>，只看时长/帧数/开口收口/波形这些结构项</td>
</tr>
<tr>
<td>8 步</td>
<td>交付画质档</td>
<td>原装权重手动加步，动作链完整，本次定为交付基准</td>
</tr>
<tr>
<td>6 步</td>
<td>中间档（未纳入本轮）</td>
<td>旧短片实测 SSIM 0.9809 几乎贴着 8 步，长片未验，是值得另测的甜点</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>规格阶梯</strong>：1152×2048/362f（顶格）→ 1152×2048/276f → 768×1344/362f → 768×1344/240f → 512×896/362f → 512×896/124f。合法帧数遵循 17k+5（124/226/276/362），分段重叠 22 帧。</p>
<h2>六、实测耗时与墙定位</h2>
<h3>6.1 小档稳态（512×896/124f）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>步数</th>
<th>R9700 32G</th>
<th>7900 XTX 24G</th>
<th>倍率</th>
</tr>
</thead>
<tbody>
<tr>
<td>4 步</td>
<td>42–45s（弃冷身首条 72s）</td>
<td>72.0s（弃冷身首条 90s）</td>
<td>1.6:1</td>
</tr>
<tr>
<td>8 步</td>
<td>66.0s</td>
<td>117.0s</td>
<td>小档 1.77:1</td>
</tr>
</tbody>
</table>
<h3>6.2 顶格阶梯</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>档</th>
<th>规格</th>
<th>R9700 32G（8 步）</th>
<th>7900 XTX 24G（8 步）</th>
</tr>
</thead>
<tbody>
<tr>
<td>A1</td>
<td>1152×2048 / 362f（2.36MP）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 2546.7s（4步 1433.1s）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> OOM（4/8 步均挂）</td>
</tr>
<tr>
<td>A2</td>
<td>1152×2048 / 276f（2.36MP）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 1693.9s（4步 976.0s）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 2641.5s（4步 1456.4s）</td>
</tr>
<tr>
<td>A3</td>
<td>768×1344 / 362f（1.03MP）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 696.5s</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 1137.4s</td>
</tr>
<tr>
<td>A4</td>
<td>768×1344 / 240f（1.03MP）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 420.1s</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 663.3s</td>
</tr>
<tr>
<td>A5</td>
<td>512×896 / 362f（0.46MP）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 249.1s</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 399.1s</td>
</tr>
<tr>
<td>A6</td>
<td>512×896 / 124f（0.46MP）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 93.0s</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 132.2s</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">长片统一 8 步交付；4 步仅作结构验证，数值括注供对照。全阶梯 swap 增量均为 0。</p>
</blockquote>
<p dir="auto"><strong>7900 XTX 的 OOM 长什么样</strong>（很有代表性）：在节点 <code>SamplerCustomAdvanced</code> 抛 <code>torch.OutOfMemoryError</code>，试图分配 3.37 GiB，但 23.98 GiB 里只剩 148 MiB 空闲；PyTorch 已占 19.84 GiB，另有 3.05 GiB reserved-but-unallocated 碎片。关键在于——同像素把帧从 362 降到 276（A1→A2）能出片，<strong>同帧数把像素减半（A1→A3，2.36MP→1.03MP）也能出片</strong>。所以墙不是单纯的帧数，也不是单纯的像素，而是**「像素 × 帧」的联合激活峰**：两卡各自的可用上限是这条曲线上的一条边界。</p>
<h3>6.3 三个反常识的测量发现</h3>
<ol>
<li><strong>步数不抬显存峰</strong>：A1 的 4 步 31232M vs 8 步 31191M；A2 的 7900 XTX 4 步 24159M vs 8 步 24160M。差值是噪声。所以「8 步更吃显存」是错觉，加步只加时间。</li>
<li><strong>采样内存 ≠ 全程内存</strong>：R9700 采样段 RSS 稳在 6.7G，但进入 362 帧 VAE 解码阶段后猛涨到 17.1G。只测采样段会漏掉这个峰，导致内存规划偏小。</li>
<li><strong>CPU 不是瓶颈</strong>：两卡各用 ffmpeg 把 CPU 打满（load 5.4 / 11.2）再跑生成，耗时增幅 &lt;1%（远低于 15% 判据）。GPU 采样完全主导。</li>
</ol>
<h3>6.4 三种生成模式对照：换模式不改显存墙</h3>
<p dir="auto">MiniMax-H3 的模式名是「条件前缀 + 2VA」（2=to，VA=Video+Audio 音画同生）：T2VA=纯文字、FL2VA=首尾帧、Ref2VA=参考图。三者共用同构主干（同为 20,970,379,616 B、932 张量名逐字一致），差别只在 conditioning 阶段喂什么条件。用同一张 9:16 参考图、同一 prompt、同一 seed、同一 TTS 母带做单变量对照，把 1152×2048 顶格在三种模式下各跑一遍：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>模式</th>
<th>条件通道</th>
<th>1152×2048/362f · R9700 32G</th>
<th>7900 XTX 24G</th>
</tr>
</thead>
<tbody>
<tr>
<td>FL2VA</td>
<td>首帧图（占帧位）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 2546.7s</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> OOM</td>
</tr>
<tr>
<td>Ref2VA</td>
<td>参考图（不占帧位）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 2555.9s</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> OOM</td>
</tr>
<tr>
<td>T2VA</td>
<td>纯文字（无锚定）</td>
<td>◐ 规格成立（未取完整耗时）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> OOM（t=18s，同签名）</td>
</tr>
</tbody>
</table>
<p dir="auto">（Ref2VA 降至 276f 后 XTX <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 2634.9s。T2VA 规格结论由小档双机出片 + 顶格 32G 卡显存峰同量级未爆 + 24G 卡 OOM 签名一致坐实，未取完整耗时数字，不影响"换模式不改墙"的判断。）</p>
<p dir="auto"><strong>结论</strong>：三种模式的 OOM 边界完全一致——24G 卡在 2.36MP×362f 一律 OOM，失败点都在 <code>SamplerCustomAdvanced</code> 的联合激活峰（试图分配约 3.3 GiB、剩余不足 200 MiB、约 3 GiB reserved-but-unallocated 碎片），跟条件通道无关。顶格耗时 FL2VA/Ref2VA 只差 0.36%，说明<strong>参考图 token 不带来可测的显存或速度开销</strong>，那堵「像素×帧」的墙是这套栈的物理上限，不是某个模式特有的。</p>
<blockquote>
<p dir="auto">一句话：想锁身份用 FL2VA（首帧）或 Ref2VA（参考素材），前者占一个帧位、后者不占但多几步配置；纯文字 T2VA 身份不可控，出片人物不保证是指定角色，<strong>不在生产交付位，只用作规格基线验证</strong>。三者能不能出片，先看像素×帧，不先看模式。</p>
</blockquote>
<p dir="auto"><strong>生产定位</strong>：交付走 FL2VA（本轮 8 步基准，首帧锚定、身份稳定）或 Ref2VA（参考素材不占帧位，配置略多但更灵活）；T2VA 的回答只是"这套栈纯文字条件下能跑多大"，答案已拿到且与另两模式一致，不进交付产线。</p>
<h2>七、踩过的坑（都是实测换来的）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>坑</th>
<th>现象</th>
<th>解法</th>
</tr>
</thead>
<tbody>
<tr>
<td>参考图比例不匹配</td>
<td>2:3 的图塞进 9:16，人物纵向拉长 18.5%</td>
<td>首帧等比中心裁到 9:16 再生成，不拉伸</td>
</tr>
<tr>
<td>采集器超时线设短了</td>
<td>顶格 8 步真实 2546.7s，超过 2400s 硬线，采集器误报超时（图其实成功了）</td>
<td>超时线拉到 3600s；超时也从 ComfyUI <code>/history</code> 时间戳补回真实耗时</td>
</tr>
<tr>
<td>4 步长片欠采样</td>
<td>276f/11.5s 片抬手糊成肉色团、动作链断裂</td>
<td>长片统一 8 步；4 步只当结构验证</td>
</tr>
<tr>
<td>软链首帧图不生效</td>
<td>ComfyUI 启动时缓存 input 列表</td>
<td>用实体文件 cp 到 input，且在实例启动前放好</td>
</tr>
<tr>
<td>OOM 后残留污染下一档</td>
<td>PyTorch 缓存不释放，下一档显存起点被垫高</td>
<td>每档之间停实例四归零（进程/端口/显存/swap）再重启</td>
</tr>
</tbody>
</table>
<hr />
<h2>八、给后来者的一句话总结</h2>
<p dir="auto"><strong>1080p 级长片（1152×2048 / 2.36MP）能在两张消费级 AMD 卡上跑通，关键就是 ComfyUI 的 DynamicVRAM</strong>。配方：DynamicVRAM 开、headroom 设 0、smart-memory 关、长片走 8 步、首帧比例对齐画幅；权重用原装 int8（无 LoRA）。结果：32G 的 R9700 吃到 362 帧顶格（15 秒 / 8 步 42 分钟），24G 的 7900 XTX 在 2.36MP 下天花板是 276 帧，但把像素减半到 1.03MP 后 362 帧也跑通——<strong>限制是「像素×帧」的联合激活峰，不是单一维度</strong>；两卡产能差约 1.6:1，加步数不花显存只花时间。</p>
<blockquote>
<p dir="auto">数据说明：本文所有数字来自 2026-11-28 双卡实测（A1–A6 全档已收口），含完整日志与校验值。画质与角色一致性属主观验收，不在本文技术结论内。</p>
</blockquote>
<p dir="auto"><img src="https://upload.lcz.me/uploads/5555d67f-59c5-4682-90a7-e03c75b914d0.jpg" alt="微信图片_20261126182814_8_26.jpg" class="img-markdown  img-fluid" /></p>
]]></description><link>https://lcz.me/topic/3375</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 03:02:00 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/3375.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Nov 2026 08:54:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片 on Sun, 29 Nov 2026 00:43:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> 后续接着测试，也是刚摸索出来</p>
]]></description><link>https://lcz.me/post/36371</link><guid isPermaLink="true">https://lcz.me/post/36371</guid><dc:creator><![CDATA[伊明]]></dc:creator><pubDate>Sun, 29 Nov 2026 00:43:39 GMT</pubDate></item><item><title><![CDATA[Reply to ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片 on Sat, 28 Nov 2026 15:19:26 GMT]]></title><description><![CDATA[<p dir="auto">装环境简单啊，生产效率如何？</p>
]]></description><link>https://lcz.me/post/36333</link><guid isPermaLink="true">https://lcz.me/post/36333</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sat, 28 Nov 2026 15:19:26 GMT</pubDate></item><item><title><![CDATA[Reply to ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片 on Sat, 28 Nov 2026 15:17:58 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 版主审定：本帖设为<strong>优秀</strong>，作者 <strong>+3 积分</strong>奖励，继续加油！</p>
<blockquote>
<p dir="auto">奖励凭证：优秀 +3 分 · 编号 e3375-4883-1</p>
</blockquote>
]]></description><link>https://lcz.me/post/36332</link><guid isPermaLink="true">https://lcz.me/post/36332</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Sat, 28 Nov 2026 15:17:58 GMT</pubDate></item><item><title><![CDATA[Reply to ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片 on Sat, 28 Nov 2026 10:43:07 GMT]]></title><description><![CDATA[<h1>DynamicVRAM 要不要自己编译？——ComfyUI + comfy-aimdo 在 AMD ROCm 上的复现清单</h1>
<blockquote>
<p dir="auto">补充贴 v1.0 · 2026-11-28 ｜ 承接《ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片》<br />
主贴讲的是「能跑多大、多快」；这篇只回答评论区最容易被问、也最容易被劝退的一个问题：<strong>这个功能是不是得自己编译一套环境才能用。</strong><br />
本文所有版本号、文件大小、校验值均来自两台实机的只读核查，可逐条复现。</p>
</blockquote>
<hr />
<h2>〇、结论：不用编译，一条命令装完</h2>
<p dir="auto">DynamicVRAM 的实现就是 ComfyUI 的一个官方依赖包 <code>comfy-aimdo</code>。它走 PyPI 正常安装，<strong>ROCm 后端（<code>.so</code>）是随包预编译好的，不需要本机编译，也不需要打任何补丁。</strong></p>
<p dir="auto">真正需要满足的只有四件事：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>依赖</th>
<th>要求</th>
<th>我们实测值</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>ComfyUI</td>
<td><strong>≥ 0.45</strong>（0.46.2 已验证）</td>
<td>0.46.2</td>
</tr>
<tr>
<td>2</td>
<td>PyTorch</td>
<td><strong>≥ 2.8</strong></td>
<td>2.11.0+rocm7.1</td>
</tr>
<tr>
<td>3</td>
<td>comfy-aimdo</td>
<td><strong>0.6.0</strong></td>
<td>0.6.0</td>
</tr>
<tr>
<td>4</td>
<td>comfy-kitchen</td>
<td><strong>0.2.41</strong>（不能钉 0.2.37）</td>
<td>0.2.41</td>
</tr>
</tbody>
</table>
<pre><code class="language-bash">pip install comfy-aimdo==0.6.0 comfy-kitchen==0.2.41
</code></pre>
<p dir="auto">启动参数加三个：</p>
<pre><code class="language-bash">--enable-dynamic-vram --vram-headroom 0 --disable-smart-memory
</code></pre>
<p dir="auto">就这样，没有 <code>git clone</code> 编译、没有 <code>setup.py build</code>、没有环境变量 hack。</p>
<hr />
<h2>一、为什么很多人以为要自己编译（三个误导源）</h2>
<p dir="auto">这个误会不是凭空来的，我三条都踩过，说出来免得下一个人再走一遍。</p>
<h3>1.1 包里有 <code>.so</code>，看着像要编译</h3>
<p dir="auto"><code>comfy_aimdo</code> 装完，目录里躺着两个原生库：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>文件</th>
<th>大小</th>
<th>sha256（前 16 位）</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>aimdo_rocm.so</code>（HIP 后端）</td>
<td><strong>554,656 B</strong></td>
<td><code>c44159a1c9f89191</code></td>
</tr>
<tr>
<td><code>aimdo.so</code>（CUDA 后端）</td>
<td>568,704 B</td>
<td>—</td>
</tr>
</tbody>
</table>
<p dir="auto">看到 <code>.so</code> 第一反应是「这是不是要拿 hipcc 编一遍」。实际不是——<strong>两个文件的时间戳和 <code>dist-info</code> 完全同一秒</strong>（装包那一刻），说明它们就在 wheel 里，pip 解压即用。</p>
<p dir="auto">想验证的话，一行就够：</p>
<pre><code class="language-bash">python -c "import sysconfig,glob,os; d=sysconfig.get_paths()['purelib']; [print(f, os.path.getsize(f)) for f in glob.glob(os.path.join(d,'comfy_aimdo','*.so'))]"
</code></pre>
<p dir="auto">正常输出两行（路径 + 字节数），例如 <code>.../comfy_aimdo/aimdo_rocm.so 554656</code>。有输出就说明库在，不用编。</p>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 注意别用 <code>comfy_aimdo.__file__</code> 去拼路径——这个包是 namespace package，<code>__file__</code> 是 <code>None</code>，照抄会得到 <code>TypeError</code>。用 <code>sysconfig</code> 定位 <code>site-packages</code> 才稳。</p>
</blockquote>
<h3>1.2 ROCm 版本号看起来「不够」</h3>
<p dir="auto">ComfyUI 的更新日志写的是「<strong>ROCm 7.14+ 默认启用动态显存</strong>」。我们跑在 7.1 上，读这句话的结论自然是「我不满足条件」。</p>
<p dir="auto">但源码里那行判定是<strong>短路</strong>的：</p>
<pre><code class="language-python"># main.py
if args.enable_dynamic_vram or (enables_dynamic_vram() and dynamic_vram_supported()):
    if (not args.enable_dynamic_vram) and (torch_version_numeric &lt; (2, 8)):
        ...  # 只在「靠自动判定」时才检查 torch 版本
</code></pre>
<p dir="auto">也就是说：<strong>只要显式传 <code>--enable-dynamic-vram</code>，<code>or</code> 左边为真，右边那两个函数根本不会被调用</strong>，ROCm 7.14 的门槛也就不构成阻碍。我们 7.1 上跑了整整一轮全档测试，就是这个原理。</p>
<blockquote>
<p dir="auto">这里有个更大的教训：「默认关」和「不能用」是两件完全不同的事。条件式更新日志只写了「谁自动获得」，没写「其余人怎么手动拿到」，于是读者会停止追问。这条比 DynamicVRAM 本身更值得记。</p>
</blockquote>
<h3>1.3 社区里的「自编译」帖，说的不是这个功能</h3>
<p dir="auto">搜 ROCm + 自编译，出来的多半是 <strong>sageattention / aiter</strong> 那类第三方加速包——它们确实没有 Linux 预编译 wheel，要 <code>PYTORCH_ROCM_ARCH=gfx1201</code> 从源码编。</p>
<p dir="auto">但那是<strong>另一个可选的加速件</strong>，和 DynamicVRAM 是两条独立的路。DynamicVRAM 只需要 <code>comfy-aimdo</code>，装完就能用。别把「别人编 sageattention」当成「DynamicVRAM 要编译」。</p>
<hr />
<h2>二、四个真正会让你白忙一晚的坑</h2>
<p dir="auto">这些和编译无关，但比编译更容易卡住人。</p>
<h3>坑 1：<code>comfy-kitchen</code> 不能钉回 0.2.37</h3>
<p dir="auto">老版本 ComfyUI（0.41.x 时代）配的是 kitchen 0.2.37。如果照着旧教程把 kitchen 钉回去，新版 ComfyUI 会<strong>启动即崩</strong>：</p>
<pre><code>ModuleNotFoundError: No module named 'comfy_kitchen.int8_decode'
</code></pre>
<p dir="auto">因为 0.45+ 的 int8 权重加载路径要用这个模块，0.2.37 里没有。<strong>0.2.41 是硬依赖，不可回退。</strong> 副作用是注意力核换了版本，像素会有约 2.6% 的 MAE 漂移——这个不可消除，只能接受。</p>
<h3>坑 2：<code>--vram-headroom</code> 的默认值就是 0，不要「好心」设成 1</h3>
<p dir="auto">有人看参数名以为是「给系统留点余量更稳」，于是设 <code>--vram-headroom 1</code>。结果是<strong>自留 1 GiB 显存完全用不上</strong>，本来刚好能过的长帧直接 OOM。</p>
<p dir="auto">正确做法是<strong>显式写 <code>--vram-headroom 0</code></strong>。动态显存的意义就是把显存用到最后一兆，留余量等于自废武功。</p>
<h3>坑 3：日志打了 <code>comfy-aimdo version: 0.6.0</code>，不代表它启用了</h3>
<p dir="auto">这是最容易误判的一条。启动日志里那行版本号是 <strong>pip 包列表打印</strong>，任何装了这个包的机器都会打——装了不等于开了。</p>
<p dir="auto"><strong>真启用的标志是这两行</strong>：</p>
<pre><code>[INFO] comfy-aimdo inited for GPU: AMD Radeon RX 7900 XTX (VRAM: 24560 MB)
[INFO] DynamicVRAM support detected and enabled
</code></pre>
<p dir="auto">第一行说明 aimdo 认到了你的卡和显存，第二行说明动态显存真正接管了权重加载。</p>
<p dir="auto"><strong>反向验证</strong>：如果只看得到版本号、看不到这两行，那跑的还是老的估算式 offloading——这时候你之后所有「显存不够」的结论都是基于旧机制得出的，跟 DynamicVRAM 没关系。我们在这上面白白搁置了两周。</p>
<h3>坑 4：<code>~/.triton/cache</code> 和 <code>~/.cache/comgr</code> 是运行期产物，不是前置环境</h3>
<p dir="auto">这两个目录确实会「编译」——triton kernel 首次遇到新 shape 会 JIT 编一遍，产物落在 cache 里（我们实测 <code>.triton/cache</code> 约 200 MB、<code>.cache/comgr</code> 约 800 MB）。</p>
<p dir="auto">但它们<strong>不是需要预装的前置环境</strong>，删了会自动重建，只是下次首跑慢一点。</p>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 反过来说，这两个缓存<strong>污染了会出花屏</strong>。如果你换过 torch / ROCm 版本之后画面异常（不是色偏，是块状、马赛克、纯噪点），先清缓存：</p>
<pre><code class="language-bash">rm -rf ~/.triton/cache ~/.cache/comgr
</code></pre>
<p dir="auto">这一步比调任何参数都管用，实测多次生效。</p>
<hr />
<h2>三、实测依赖矩阵（两套配置逐项对齐）</h2>
<p dir="auto">版本不一致就有对比噪声，所以两台机是逐字对齐的：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>组件</th>
<th>配置 A（R9700 32G）</th>
<th>配置 B（7900 XTX 24G）</th>
</tr>
</thead>
<tbody>
<tr>
<td>Python</td>
<td>3.13.15</td>
<td>同</td>
</tr>
<tr>
<td>PyTorch</td>
<td>2.11.0+rocm7.1</td>
<td>同</td>
</tr>
<tr>
<td>HIP</td>
<td>7.1.52802</td>
<td>同</td>
</tr>
<tr>
<td>ComfyUI</td>
<td>0.46.2</td>
<td>同</td>
</tr>
<tr>
<td>comfy-aimdo</td>
<td>0.6.0</td>
<td>同</td>
</tr>
<tr>
<td>comfy-kitchen</td>
<td>0.2.41</td>
<td>同</td>
</tr>
<tr>
<td><code>aimdo_rocm.so</code></td>
<td>554,656 B / <code>c44159a1…</code></td>
<td>同</td>
</tr>
<tr>
<td>ComfyUI 源码改动</td>
<td><strong>无</strong>（<code>git status</code> 干净）</td>
<td>同</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>关键一行是最后那条</strong>：整套环境<strong>没有任何本地源码改动</strong>。ComfyUI 是官方树，<code>comfy_kitchen</code> 的 HIP 后端连一个字符都没动过。</p>
<blockquote>
<p dir="auto">顺带澄清一个流传的说法：有帖子提到 <code>comfy_kitchen</code> 的 HIP 后端缺 11 个 bare 函数名（<code>dequantize_int8_simple</code> 等），导致量化权重加载退到 eager、加载极慢。这个问题真实存在，但<strong>补它只需要在纯 Python 里加两行 wrapper，不是编译</strong>，而且<strong>不影响 DynamicVRAM 能不能用</strong>——我们这台没补，照样跑通了全部档位。想优化加载速度可以去补，不想补也能正常出片。</p>
</blockquote>
<hr />
<h2>四、什么情况下才真的需要编译</h2>
<p dir="auto">说清楚边界，免得矫枉过正：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>场景</th>
<th>要不要编译</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>DynamicVRAM / comfy-aimdo</strong></td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 不需要</td>
<td>本文主题，pip 装完即用</td>
</tr>
<tr>
<td>comfy-kitchen HIP 后端补 bare 名</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 不需要</td>
<td>纯 Python 两行 wrapper，可选优化</td>
</tr>
<tr>
<td>sageattention / aiter 加速</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 需要</td>
<td>Linux 无预编译 wheel，要 <code>PYTORCH_ROCM_ARCH=gfx1201</code></td>
</tr>
<tr>
<td>ROCm 10.0 + torch 2.13（gfx1201）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 要装额外 kernel pack</td>
<td>需 <code>amd-torch-device-gfx1201</code>，否则 kernel 报 <code>hipErrorInvalidImage</code>，官方文档没提</td>
</tr>
</tbody>
</table>
<p dir="auto">所以我们这套环境的答案是：<strong>主链路零编译，可选加速件才需要动手。</strong></p>
<hr />
<h2>五、最小复现步骤（可复制）</h2>
<pre><code class="language-bash"># 1) 确认 ComfyUI 版本 ≥ 0.45
python -c "import comfyui_version; print(comfyui_version.__version__)"

# 2) 装两个包（清华源，避免 IPv6 卡死）
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple \
  comfy-aimdo==0.6.0 comfy-kitchen==0.2.41

# 3) 确认原生库在（有两个 .so 即 OK，不需要编译）
python -c "import sysconfig,glob,os; d=sysconfig.get_paths()['purelib']; [print(f, os.path.getsize(f)) for f in glob.glob(os.path.join(d,'comfy_aimdo','*.so'))]"

# 4) 启动（三个参数缺一不可）
python main.py --listen 0.0.0.0 --port 8188 \
  --use-ck-attention \
  --enable-dynamic-vram --vram-headroom 0 --disable-smart-memory

# 5) 判活：看到这两行才算真启用
grep -E "comfy-aimdo inited|DynamicVRAM support detected" comfyui.log
</code></pre>
<p dir="auto">第 5 步是最重要的一步。<strong>没看到这两行，别急着测显存——你测的是旧机制。</strong></p>
<hr />
<h2>六、一句话总结</h2>
<p dir="auto"><strong>DynamicVRAM 的门槛不在编译，在信息。</strong></p>
<p dir="auto">功能从 2026-11 就躺在 <code>requirements.txt</code> 里了，包自带 ROCm 原生库，一个启动参数就能打开。真正拦住人的是三条看起来像限制、实际是开关的东西：ROCm 版本号、<code>.so</code> 文件、以及那句「默认关」。</p>
<p dir="auto">下次看到「某版本以上默认开启」，先别关掉页面——去源码里找那行 <code>if</code>，看它是不是 <code>or</code> 短路。<strong>很多「不支持」，只是「没人告诉你还能手动开」。</strong></p>
]]></description><link>https://lcz.me/post/36304</link><guid isPermaLink="true">https://lcz.me/post/36304</guid><dc:creator><![CDATA[伊明]]></dc:creator><pubDate>Sat, 28 Nov 2026 10:43:07 GMT</pubDate></item><item><title><![CDATA[Reply to ComfyUI DynamicVRAM 实战：MiniMax-H3 在 R9700 32G × 7900 XTX 24G 双卡上跑通 1080p 级长片 on Sat, 28 Nov 2026 09:05:46 GMT]]></title><description><![CDATA[<p dir="auto">具体成片我就不放出来了，推荐各位有这两张卡的都试试，可以说这DynamicVRAM是救命的设置，能让h3原生跑一跑1080p的视频了。</p>
]]></description><link>https://lcz.me/post/36293</link><guid isPermaLink="true">https://lcz.me/post/36293</guid><dc:creator><![CDATA[伊明]]></dc:creator><pubDate>Sat, 28 Nov 2026 09:05:46 GMT</pubDate></item></channel></rss>