Fix yellow cast at consecutive transitions and maps stacking
Transition center was placed at cumulative_latent_frames - overlap//2, inside scene 1's territory. Since overlap frames are pinned (mask=0) the latent blend is a no-op, so the actual content seam is at cumulative_latent_frames exactly. Centering there puts the seam at peak black, hiding any decode artifacts and giving a clean post-processed fade-to-black feel on each side. Maps stacking: _capture_finalizer merged new captures with the existing temp file, including leftovers from previous ComfyUI runs. Each "loved it" cycle blessed maps that had been tainted by the previous round's injection, compounding color bias indefinitely. Clear the temp file at build_enhancements start so each generation captures clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8c295085c1
commit
88cc1e3256
@@ -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).
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user