fix(server): surface a typed error when world_engine is requested on Apple Silicon - #143
Open
juraam wants to merge 1 commit into
Open
fix(server): surface a typed error when world_engine is requested on Apple Silicon#143juraam wants to merge 1 commit into
juraam wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially addresses #81 — reports the incompatibility at session init rather than ahead of time.
On Apple Silicon
devices.pyforcesWORLD_ENGINE_DEVICE="cpu", so theworld_enginebackendloads the model and the seed successfully and only dies at the second warmup step
(
append_frame), where_cache_passis compiled:The user sits through a full model load and warmup to get a compiler internals dump, with no
hint that the backend setting is the thing to change.
Before
After
I checked whether the CPU path is worth unblocking rather than rejecting: with
TORCHDYNAMO_DISABLE=1warmup does complete on an M1 Pro —append_frame1658 s,gen_frame3140 s, ~80 min total, ~0.0013 pixel FPS. Functionally correct, nowhere near playable.
Fix: raise a typed
IncompatibleHardwareErrorbefore the model load and surface it asMessageId.INCOMPATIBLE_HARDWAREover both theerrorpush and the deferred initrpc_err.The pre-init socket is deliberately not torn down — it acks the init and keeps waiting, like
the
not readybranch beside it. Closing in the same tick made the client's lifecycle reducersee a plain connection failure before the RPC rejection landed, so the precise message lost the
race and only appeared on a second attempt.
Tested on an M1 Pro dev build. Lints,
basedpyrightandcodegen_ts.py --checkpass locally.