Adjust sample timestep sigmas to be model evals for h3 for 1 extra step
This commit is contained in:
@@ -431,9 +431,10 @@ def remap_sigma(
|
|||||||
def build_sigma_schedule(
|
def build_sigma_schedule(
|
||||||
num_inference_steps: int, shift: float = VIDEO_SIGMA_SHIFT
|
num_inference_steps: int, shift: float = VIDEO_SIGMA_SHIFT
|
||||||
) -> torch.Tensor:
|
) -> torch.Tensor:
|
||||||
"""The released sampling grid: linspace(1, 0, steps) through the
|
"""The released sampling grid: linspace(1, 0, steps + 1) through the
|
||||||
exponential shift, consecutive duplicates collapsed — the terminal 0 is
|
exponential shift, consecutive duplicates collapsed — `steps` yields
|
||||||
part of the count, so `steps` yields `steps - 1` model evaluations."""
|
`steps` model evaluations (the released repo counts the terminal 0 in
|
||||||
base = torch.linspace(1.0, 0.0, num_inference_steps, dtype=torch.float32)
|
`steps`; we don't, so sample_steps means model evals)."""
|
||||||
|
base = torch.linspace(1.0, 0.0, num_inference_steps + 1, dtype=torch.float32)
|
||||||
sigmas = shift_sigma(base, shift)
|
sigmas = shift_sigma(base, shift)
|
||||||
return torch.unique_consecutive(sigmas)
|
return torch.unique_consecutive(sigmas)
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ exactly one transformer forward per step. ``unconditional_embeds`` and
|
|||||||
``guidance_scale`` are accepted for harness compatibility and ignored.
|
``guidance_scale`` are accepted for harness compatibility and ignored.
|
||||||
|
|
||||||
Scheduler (the released math, not diffusers'):
|
Scheduler (the released math, not diffusers'):
|
||||||
- sigma grid: ``linspace(1, 0, steps)`` through the exponential shift
|
- sigma grid: ``linspace(1, 0, steps + 1)`` through the exponential shift
|
||||||
(video 12, audio 3), consecutive duplicates collapsed; the terminal 0 is
|
(video 12, audio 3), consecutive duplicates collapsed; ``steps`` yields
|
||||||
part of the count so ``steps`` yields ``steps - 1`` model evaluations
|
``steps`` model evaluations (steps = 1 is one full 1 -> 0 step)
|
||||||
- the model consumes ``t = 1 - sigma`` (t = 1 means clean) and predicts the
|
- the model consumes ``t = 1 - sigma`` (t = 1 means clean) and predicts the
|
||||||
data-ward velocity ``clean - noise``: ``denoised = x + sigma * v``
|
data-ward velocity ``clean - noise``: ``denoised = x + sigma * v``
|
||||||
- Euler update ``x_next = r * x + (1 - r) * denoised`` with
|
- Euler update ``x_next = r * x + (1 - r) * denoised`` with
|
||||||
|
|||||||
Reference in New Issue
Block a user