Trace VAE blend inputs

This commit is contained in:
Daniel Maddern 2026-08-14 01:50:14 +07:00
parent 28a4121df9
commit feeb4b75c9

View file

@ -69,6 +69,9 @@ with torch.inference_mode():
part_d = clip_d[:, :, frame_start:frame_end][:, :, direct.frame_pre_padding:] part_d = clip_d[:, :, frame_start:frame_end][:, :, direct.frame_pre_padding:]
part_u = clip_u[:, :, frame_start:frame_end][:, :, upstream.frame_pre_padding:] part_u = clip_u[:, :, frame_start:frame_end][:, :, upstream.frame_pre_padding:]
if split == 0 and prev_d is not None: if split == 0 and prev_d is not None:
diff_stats(f"chunk_{chunk_index}_preblend_current", part_d, part_u)
diff_stats(f"chunk_{chunk_index}_direct_blend_same_inputs", direct.blend(prev_d, part_d, direct.frame_overlap, -3), upstream.blend(prev_d, part_d, direct.frame_overlap, -3))
diff_stats(f"chunk_{chunk_index}_upstream_blend_same_inputs", direct.blend(prev_u, part_u, upstream.frame_overlap, -3), upstream.blend(prev_u, part_u, upstream.frame_overlap, -3))
part_d = direct.blend(prev_d, part_d, direct.frame_overlap, -3) part_d = direct.blend(prev_d, part_d, direct.frame_overlap, -3)
part_u = upstream.blend(prev_u, part_u, upstream.frame_overlap, -3) part_u = upstream.blend(prev_u, part_u, upstream.frame_overlap, -3)
diff_stats(f"chunk_{chunk_index}_blended_at_{write_pos}", part_d, part_u) diff_stats(f"chunk_{chunk_index}_blended_at_{write_pos}", part_d, part_u)