Skip to content

Fix fast2 (pi-H3 two-step fast mode) on Apple Silicon: schedule cursor + overlay activation - #1224

Open
cuijs2026 wants to merge 1 commit into
FlashML-org:mainfrom
cuijs2026:local-fast2-fixes
Open

cuijs2026 wants to merge 1 commit into
FlashML-org:mainfrom
cuijs2026:local-fast2-fixes

Conversation

@cuijs2026

Copy link
Copy Markdown

Summary

Two fixes, both required for fast2 mode (the 'Fastest mode' / 极速档) to run on Apple Silicon (macOS arm64). Without them, fast2 fails at sampling time.

1. macOS runtime: don't build a default-schedule AdaLN cursor in fast2 mode (freevideo_engine/macos_runtime.py)

In fast2 mode the sampler uses pi-H3's RAW_GRID ((.93, .56, 0.)). The current code always built ScheduleCursor(times) from schedule_timesteps(steps) (the default t2va grid) and registered a forward-pre hook checking sampled timesteps against it. The check fails immediately on the first step with:

ValueError: The request changed the precomputed AdaLN schedule

(identical in macos_stages.py via self.cursor.reset(...)).

Fix: only create the cursor / register the hook / reset the cursor when fast is None, mirroring the CUDA runtime.Engine behaviour.

2. macOS stages: activate the VDN Mac overlay before importing src in the fast2 decode stage (freevideo_engine/macos_stages.py)

The fast2 decode subprocess calls pixels_to_file() (dwd_decode.py), which imports src.inference.render at module import time. The decode subprocess never activated the overlay, failing with:

ModuleNotFoundError: No module named 'src'

Fix: call macos_vdn.activate() before importing dwd_decode in the phase == 'decode' and value.get('fast_tier') is not None: branch.

Test

Verified on Apple M4 Pro / 64 GiB / macOS 27.2 / MLX 0.32.3: a 960x544 5.2 s fast2 job (2 steps) now succeeds end to end.

Notes

  • Base: v0.6.16-public (1de46c61). Local branch also contains LOCAL-FIXES.md and fixes-2026-11-28-fast2-mac.patch (documentation + patch file); they can be dropped upstream.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant