- images
- guide
- images
- report
Most ways of hiding a bad seam are lies. Cross-dissolve two frames and you've split one jump into two visible jumps. Crop the blurry settle frames and you've traded a soft blur for a visible skip. Both of those change the timeline, which means they can't be undone and they compound across segments.
H3RelayPost is the honest alternative: it works purely in the image domain, on already-decoded frames. Frame count unchanged, audio untouched, no extra sampling. If you leave every dial at 0 - which is the default - it is a bit-exact pass-through and costs you nothing but a graph node. When it does fire, it's applying statistics and convolution, not generating anything, so whatever it does is deterministic and instant. That's the argument the post-processing essay makes for the whole layer: reach for the cheap deterministic primitive before the expensive generative one.
It goes after Trim AV, taking the cropped images, and it's one of the optional four in the pack - delete it and the film still renders.
The knobs, grouped by what they're actually for
Required: just images - wire it from Trim AV's images.
Cross-segment (needs guide): match_prev is a Reinhard-style statistics match - first and second moments, per channel - aligning the head of this segment to the seam's other side. lowfreq_pull is the gentler additive version, aligning only the low-frequency grade. Both are off. Both are also gated by cross_seg_ack, which defaults false and makes them abstain entirely. That gate is the most interesting thing in this node, and I'll come back to it.
Within-segment (no guide needed): hist_match aligns the head's tonal distribution to the segment body, wb_match fixes the R:G:B ratio - these two are orthogonal, one handles level, one handles colour temperature. Both act over head_zone_frames (24) with a linear falloff, and both are off.
High frequency: deconv_strength is Wiener deconvolution - inverse-filtering under an assumed PSF, which can genuinely recover detail rather than just amplifying it, at the risk of ringing if you push it. detail_borrow swaps the head's high-frequency structure for the body's. Complementary: one restores, one transplants. Both off.
The blur-zone fix: settle_auto (and the cruder settle_sharpen) is the one you'll actually want. Redrawn heads come back soft for the first ~15 frames. These apply an unsharp pass over settle_sharpen_frames (24) and, with settle_auto, measure each frame's sharpness deficit against the segment body and scale the compensation to it - the measured curve isn't linear, which is why the fixed settle_sharpen never matched it well. Try settle_auto at 0.5–1.0. Honest limitation, stated by the author: sharpening recovers contrast, not detail that's gone. If the structure is there and merely soft, it helps.
Outputs: images and report. Wire the guide from Trim AV's prev_tail - the last frame of the pinned region, i.e. the other side of the seam. Without it, the cross-segment pair silently skips.
The cross_seg_ack gate is the good idea here
The pack has two bridging routes, and prev_tail means different things in each. Under the copy bridge, the pinned frames are a bit-exact copy of the previous segment's tail - so prev_tail is the real reference. Under the conditioning-only route, those frames are this segment's own redraw, so prev_tail is only an approximation.
The author measured the proxy error at 0.006, against a seam step of 0.0007 that he was trying to fix. Aligning to a worse reference than the error you're correcting doesn't help - it made the first frame worse. So cross_seg_ack defaults to false, and match_prev/lowfreq_pull abstain rather than act on a bad reference. Tick it when your guide is genuinely the previous segment's last frame. The baseline field is the same instinct applied to the within-segment work: robust (default) computes dispersion and lets groups abstain if the reference isn't trustworthy, rather than moving pixels on a bad baseline.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/ZenHG/ComfyUI-H3-Latent-Relay.git
ComfyUI Manager → search h3-latent-relay, restart the backend. No models, no extra packages - this node is pure image maths on your existing install, which is part of why it's the cheapest of the optional four.
Traps
Keep every dial at 0 until you've looked at the seam and can name what's wrong with it. Enabling match_prev and lowfreq_pull together is discouraged - their scopes overlap, pick one. And if hist_match feels slow, it's the high-resolution subsampling path kicking in above roughly 0.8 MP; it's a fixed couple of seconds per segment, not proportional to resolution. Paying for a fix you can't see is worse than the seam.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | 【接法】接 Trim AV 的 images 输出(裁后的画面)。 它只改画质,不改帧数、不动音频。 | |
| guideopt | IMAGE | 【接法】接 Trim AV 第 4 路输出 prev_tail。 = 复制区最后一帧,也就是缝的另一侧;只有跨段统计匹配与低频残差需要它。 ⚠ 它是不是「上一段末帧」取决于走哪条桥:拷贝桥下是,Latent 桥下只是近似。 | |
| match_prevopt | FLOAT | 0.000–1 | 【按需开,默认 0】跨段统计匹配:把本段开头亮度/色档对齐 guide。 只对齐统计量、不复制姿态 ⇒ 无重影;带噪声闸,阶跃小就不动手。 ⚠ 走 Latent 桥请保持 0:guide 只是近似,对齐它反而更差(0.0007→0.0039)。 ⚠ 拷贝桥下尚无正向实测 ⇒ 别当万能药。 |
| match_prev_framesopt | INT | 121–96 | 【配合跨段统计匹配】作用帧数:从首帧起,权重衰减到 0。 |
| match_prev_gain_maxopt | FLOAT | 1.151–2 | 【护栏】逐通道对比度增益上限,防止把已对好的内容改坏。 |
| match_prev_offset_maxopt | FLOAT | 0.060–0.3 | 【护栏】逐通道亮度/色度偏移上限,防止整段换色。 |
| lowfreq_pullopt | FLOAT | 0.000–1 | 【按需开,默认 0】低频残差传递。 只把本段开头的低频色档对齐 guide,不动细节与姿态 ⇒ 无重影。 与跨段统计匹配作用域重叠,建议二选一。 ⚠ 需要 guide,也受跨段总闸约束。 |
| lowfreq_framesopt | INT | 121–96 | 【配合低频残差】作用帧数(权重衰减到 0)。 |
| lowfreq_bluropt | INT | 164–256 | 【低频尺度】默认 16 就够。 16 → 12 帧约 1.6 秒;64 → 同一段约 22 秒,而缝点阶跃只从 0.0024 降到 0.0011。 ⇒ 除非专治大面积色档漂移,别加到 64;32 是折中。 |
| head_zone_framesopt | INT | 241–96 | 【本段开头帧数】下面四项都按这个帧数作用。 直方图匹配 / 白平衡 / 反卷积 / 段体高频迁移。 ⚠ 糊区锐化不看这个,它用自己的帧数。 |
| hist_matchopt | FLOAT | 0.000–1 | 【段内】直方图匹配:把本段开头的色阶分布对齐到段体。 治本段开头与段体之间的色阶漂移(段内,不需要 guide)。 按需开、默认 0;作用帧数 = head_zone_frames。 |
| wb_matchopt | FLOAT | 0.000–1 | 【段内】灰世界白平衡:把本段开头 R:G:B 比例对齐段体。 与直方图匹配正交(那个管亮度总量,这个管色温)。 按需开、默认 0。 |
| deconv_strengthopt | FLOAT | 0.000–1 | 【补高频】反卷积去模糊:提升本段开头高频,按需开、默认 0。 太大易出振铃(此时把强度降下来)。作用帧数 = head_zone_frames。 |
| deconv_radiusopt | FLOAT | 1.50.5–4 | 【配合反卷积】模糊核半径。 |
| detail_borrowopt | FLOAT | 0.000–1 | 【补高频】段体高频迁移:把本段开头的高频换成段体的结构。 比反卷积更像真的,但可能与本段开头内容不符。 按需开、默认 0。 |
| detail_bluropt | INT | 93–64 | 【配合高频迁移】高频分离尺度。 |
| settle_sharpenopt | FLOAT | 0.000–1.5 | 【收口】糊区锐化:对开头几帧做渐变锐化,按需开、默认 0。 不裁、不动时间轴 ⇒ 不会引入跳帧。建议 0.4~1.0。 |
| settle_autoopt | FLOAT | 0.500–1 | 【推荐】自适应糊区补偿(默认 0.5 = 开)。 节点当场量出每帧清晰度对段体基线的亏空,按亏空比例锐化;已达标的帧与段体一律不动。 · 0 = 关;0.5~1.0 是推荐区间。 · 与固定糊区锐化同时开 ⇒ 只作用本项(另一个弃权并点名)。 ⚠ 只能恢复对比度,救不回丢掉的细节。 |
| settle_sharpen_framesopt | INT | 241–96 | 【配合糊区锐化】作用帧数(渐变衰减到 0)。 ⚠ 只管糊区锐化;上面四项用 head_zone_frames。 |
| match_prev_stats_framesopt | INT | 10–24 | 【配合跨段统计匹配】统计量取几帧 —— 这一格最容易写错。 · 1(默认)= 只取紧贴缝的那一帧,与 guide 同一基准 ⇒ 修正量正好是缝上的阶跃。 · 0 = 对整个作用区聚合 ⇒ 本段开头有亮度梯度时首帧会被推过 guide、凭空多出阶跃。仅供对照。 |
| baselineopt | COMBO | robust | 【段体参考怎么取】 · robust(默认)= 逐帧亮度取中央 50% 的帧再算统计,并报出离散度。 离散度大于 0.08 判基准不可信,相关项自动弃权。 · legacy = 旧算法(整段均值),仅供对照。 |
| cross_seg_ackopt | BOOLEAN | false | 【跨段总闸】确认 guide 是真参照才打勾。 · 开 = 跨段统计匹配与低频残差传递可以生效(前提是它们自己也不为 0)。 · 关(默认)= 两项自动弃权,并在报告里说明。 · 为什么默认关:走 Latent 桥时 prev_tail 只是近似,对齐它反而把首帧推离真参照。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| report | STRING | — |