feat: add cpu_offload option for low-VRAM model loading#40
Open
omnificate wants to merge 1 commit intoOverworldai:mainfrom
Open
feat: add cpu_offload option for low-VRAM model loading#40omnificate wants to merge 1 commit intoOverworldai:mainfrom
omnificate wants to merge 1 commit intoOverworldai:mainfrom
Conversation
When cpu_offload=True, the model is built and patched on CPU before being moved to GPU. Quantization runs on GPU after the move to ensure compatibility with all backends (FP8, INT8/GemLite, NVFP4). This reduces peak VRAM during model initialization, making it feasible to run on systems with limited GPU memory.
d22049e to
f9a71fa
Compare
omnificate
pushed a commit
to omnificate/Biome
that referenced
this pull request
Apr 12, 2026
Adds a 'CPU Model Loading' checkbox in Performance settings that sends cpu_offload in the WebSocket init message. When enabled, the world_engine server builds the model on CPU before moving to GPU, reducing peak VRAM during initialization. Essential for systems with limited GPU memory. Changes: - Top-level cpu_offload setting (default: false) - Checkbox in Performance section with i18n (en/ja/zh/goose) - WebSocket init message includes cpu_offload flag - Lifecycle model key encodes cpu_offload so toggling triggers reconnect - Mode-switch modal shown when toggling during active streaming - Server passes cpu_offload through to WorldEngine constructor Companion PR: Overworldai/world_engine#40
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.
When
cpu_offload=True, the model is built and patched on CPU before being moved to GPU. Quantization runs on GPU after the move to ensure compatibility with all backends (FP8, INT8/GemLite, NVFP4).This reduces peak VRAM during model initialization, making it feasible to run on systems with limited GPU memory.
Changes to
WorldEngine.__init__:cpu_offload: bool = Falsetorch.device('cpu')context, then moved to the target device with.to()Companion PR: Overworldai/Biome#97