From 37aa382ccebb330c327c26c9c30429afe0bdf1f4 Mon Sep 17 00:00:00 2001 From: Will Lin Date: Fri, 21 Aug 2026 04:42:38 +0000 Subject: [PATCH] [bugfix] example: the distilled FastH3 grid is 4 forwards = a 5-point sigma grid MiniMaxH3Scheduler.set_timesteps(N) builds an N-point sigma grid ending at 0 and runs N-1 transformer forwards (the base model's '50 steps' preset is 49 forwards). The student was distilled on a 4-FORWARD grid (t = 1000/750/500/250 -> 0 on the shift-12 schedule), so --steps 4 was silently running a 3-forward, off-distribution grid. Default is now 5 grid points = the distilled 4-forward grid, with the convention documented on the flag. Co-Authored-By: Claude Fable 5 --- examples/inference/basic/basic_fasth3.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/inference/basic/basic_fasth3.py b/examples/inference/basic/basic_fasth3.py index 2555cd9f9..9f85f9b5d 100644 --- a/examples/inference/basic/basic_fasth3.py +++ b/examples/inference/basic/basic_fasth3.py @@ -45,9 +45,16 @@ def parse_args() -> argparse.Namespace: parser.add_argument("--height", type=int, default=768) parser.add_argument("--width", type=int, default=1344) parser.add_argument("--num-frames", type=int, default=124) - # 4 is the grid the student was distilled for; other step counts are - # off-distribution. - parser.add_argument("--steps", type=int, default=4) + # num_inference_steps counts sigma-GRID POINTS, matching the base model's + # convention ("50 steps" = a 50-point grid = 49 transformer forwards). The + # student's distilled 4-step grid is 4 FORWARDS, i.e. a 5-point grid + # (t = 1000, 750, 500, 250 -> 0 on the shift-12 schedule) — so the correct + # default here is 5. Other grids are off-distribution. + parser.add_argument("--steps", + type=int, + default=5, + help="num_inference_steps = sigma-grid points; N points run N-1 denoising " + "forwards. 5 (default) is the distilled 4-forward grid") parser.add_argument("--seed", type=int, default=0) parser.add_argument("--num-gpus", type=int, default=4) parser.add_argument("--vsa-sparsity",