sampler: per-scene sampling time + appended-token context in the report

Live report: guide scenes suddenly ~3.5x slower than the anchor scene
(6-scene 768x768x305 montage at 7 min vs ~2.5 expected), on a nightly
ComfyUI. Audit of the upstream delta found nothing touching the default
guide attention path (context windows is opt-in, int8 irrelevant, the
guide-strength mask machinery dates to February) - so before theorizing
further, make each run attribute itself: every scene line now carries
its sampling seconds plus what was appended to its sequence (carried
head frames, guide tail, audio tail), printed live and in the report.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-07-02 19:40:21 +03:00
co-authored by Claude Fable 5
parent b7ed4f9fb6
commit a4008e6a13
+14 -2
View File
@@ -4226,7 +4226,8 @@ class FunPackLTXAVSceneChainSampler:
alg_guide_tail_frames=(guide_tail if (alg_blur_guides and guide_tail > 0) else 0),
bounded_attention_enabled=bounded_attention_enabled,
)
_phase_sampling += _time.perf_counter() - _t_sample0
_scene_sample_s = _time.perf_counter() - _t_sample0
_phase_sampling += _scene_sample_s
finally:
self._remove_v2a_scale(_v2a_handles)
if _temporal_applied:
@@ -4274,8 +4275,19 @@ class FunPackLTXAVSceneChainSampler:
"seed_used": scene_seed,
"mechanisms": run_mechanisms,
})
# Per-scene sampling time + appended-token context: guide/carry scenes sample a
# LONGER sequence (carried head + guide/audio tails) and take the masked-attention
# path when guide strengths != 1.0 — this line makes any per-scene overhead
# attributable at a glance instead of hiding inside the run total.
_scene_extras = (
(f", carried={carried + soft_carried}f" if (carried + soft_carried) > 0 else "")
+ (f", guide_tail={guide_tail}f" if guide_tail > 0 else "")
+ (f", audio_tail={audio_tail}f" if audio_tail > 0 else "")
)
print(f"[FunPackSceneChain] Scene {scene_index + 1}: sampling {_scene_sample_s:.1f}s{_scene_extras}")
report_lines.append(
f"Scene {scene_index + 1}: seed={scene_seed}, text={scene_meta['text']}"
f"Scene {scene_index + 1}: seed={scene_seed}, sampling {_scene_sample_s:.1f}s{_scene_extras}, "
f"text={scene_meta['text']}"
+ (f" | encode≠text" if scene_meta["encode_text"] != scene_meta["text"] else "")
)