From 8e31dcbff602fd8ad903450ebda2c2f161a1a288 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Thu, 3 Sep 2026 23:56:43 +0300 Subject: [PATCH] fix: report when DynaShift's positive pull is silently inactive The status line at generation start only counted bank sizes, not whether entries actually match this run's latent resolution -- so "positive pull active (N liked)" could be true by that rough count while the real per-resolution check inside the wrapper found nothing usable, with no way to tell from the log. Negatives already had this warning; positives didn't. Now both report a resolution mismatch. --- samplers.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/samplers.py b/samplers.py index 8bd2597f..ddf64bba 100644 --- a/samplers.py +++ b/samplers.py @@ -4823,6 +4823,7 @@ class FunPackLTXAVSceneChainSampler: # pull_dir [D] fp32 unit vector | None) _prep = {} _warned = [False] + _pull_warned = [False] # The bank stores the RAW scene conditioning (negative_memory.save_pending is handed # positive[0][0]), so the prompt-similarity weight has to be computed against the raw # cond too. On H3 `c_crossattn` is the refined DiT hidden state instead, a different @@ -4886,15 +4887,22 @@ class FunPackLTXAVSceneChainSampler: # _matching_units twice. pull_dir = None neg_entry_count = len(conds) - if _positives and neg_entry_count >= _MIN_PULL: + pos_entry_count = 0 + if _positives: pos_units, pos_entry_count = _matching_units(_positives, device, c, h, w) - if pos_units is not None and pos_entry_count >= _MIN_PULL: + if neg_entry_count >= _MIN_PULL and pos_entry_count >= _MIN_PULL: neg_units_f32 = torch.cat(units, dim=0).float() if units else None if neg_units_f32 is not None: diff = pos_units.mean(dim=0) - neg_units_f32.mean(dim=0) n = diff.norm() if torch.isfinite(n) and n > 1e-8: pull_dir = diff / n + if _positives and pull_dir is None and not _pull_warned[0]: + _pull_warned[0] = True + print(f"[FunPackSceneChain] dynashift: positive pull inactive at this run's " + f"latent resolution — {pos_entry_count} of {len(_positives)} positive(s) " + f"and {neg_entry_count} of {len(negatives)} negative(s) match " + f"(need {_MIN_PULL}+ of each at this resolution)") prepared = None if descs or pull_dir is not None: prepared = (torch.cat(descs, dim=0) if descs else None,