Match Comfy H3 timestep precision

This commit is contained in:
Daniel Maddern 2026-08-13 21:50:53 +07:00
parent c4d64d0d72
commit d0f4dd0ebc

View file

@ -79,7 +79,7 @@ class H3PromptPacker:
video_sigma = torch.tensor(float(sigma), device=hidden.device).clamp(min=1e-6)
base = video_sigma / (12.0 + video_sigma * (1.0 - 12.0))
audio_sigma = 3.0 * base / (1.0 + (3.0 - 1.0) * base)
video_time, audio_time = 1 - float(video_sigma), 1 - float(audio_sigma)
video_time, audio_time = (1.0 - video_sigma).item(), (1.0 - audio_sigma).item()
unique_times = sorted({video_time, audio_time})
row = {value: index for index, value in enumerate(unique_times)}
video_row, audio_row = row[video_time] * 3, row[audio_time] * 3