Reserve peak activation in the fit estimate for image models - #47
Merged
Conversation
Diffusion pipelines are dominated by activation memory (attention + VAE decode), which is roughly dtype-independent and invisible to a weights-only estimate — so an int4 image pipeline could be labelled "fits" and then OOM at generation. LocalModelMemoryEstimate now carries an activation reserve (a coarse per-family constant), applied to image-generation models in both the hub and local producers, so the fit check reflects the working set rather than resident weights alone. Non-image models are unchanged.
Owner
|
LGTM, Just wonder how much of it can be solved with chunking. In MLX-Video the overheard to generate videos with the chunking algo is ~5-15GB and can be modulated by the chunk-size. |
Lazarus-931
added a commit
that referenced
this pull request
Jul 23, 2026
- gated-hf-download and custom-server-port are shipped (PRs #49, #19/#51), not planned/experimental - reflect merged extras: LM Studio import (#21), chat image paste/screenshot (#39), Developer server port + HF token - image-gen fit-estimate task done via PR #47; note #46 remaining scope - add open issue #57 (Homebrew Cask)
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.
Diffusion pipelines are dominated by activation memory (attention + VAE decode), which is roughly dtype-independent and invisible to a weights-only estimate, so an int4 image pipeline could be labelled "fits" and then OOM at generation. LocalModelMemoryEstimate now carries an activation reserve (a coarse per-family constant), applied to image-generation models in both the hub and local producers, so the fit check reflects the working set rather than resident weights alone. Non-image models are unchanged.
addresses sub-issue #46, originally raised in #44 by @xocialize
cc: @lucasnewman