diff --git a/ltx_enhancements.py b/ltx_enhancements.py index 9adcab83..b7ad7770 100644 --- a/ltx_enhancements.py +++ b/ltx_enhancements.py @@ -566,6 +566,18 @@ def build_enhancements(model, rating_profile, temporal_style, refinement_key, re } # --- Technique 5: injection data --- + # Clear the temp maps file so this generation's capture starts fresh. + # Without this, maps from previous runs merge in and compound across + # sessions — each "loved it" cycle injects tainted states from the + # previous round, producing progressively worse color bias. + if refinement_key: + temp_path = _temp_maps_path(refinement_key) + try: + if os.path.exists(temp_path): + os.remove(temp_path) + except Exception: + pass + has_i2v = reference_latent is not None and _has_i2v_reference(reference_latent) if has_i2v: # i2v latent: extract reference maps on first generation step (real conditioning available). diff --git a/samplers.py b/samplers.py index d52ce8c5..59ffe4c4 100644 --- a/samplers.py +++ b/samplers.py @@ -1467,7 +1467,10 @@ class FunPackLTXAVSceneChainSampler: # Record boundary (center of the overlap region) before blending effect = self._scene_transition_effect(scene_cond) if effect and transition_duration > 0: - boundary_latent = max(0, cumulative_latent_frames - video_overlap // 2) + # Seam is at cumulative_latent_frames: overlap frames are pinned + # (mask=0) so the latent blend is a no-op — the actual content + # boundary is exactly here, not offset by overlap//2. + boundary_latent = cumulative_latent_frames boundary_pixel = int((boundary_latent - 1) * time_scale + 1) if time_scale > 1 else boundary_latent blend_half_latent = max(1, video_overlap // 2) blend_half_pixels = blend_half_latent * time_scale