Skip to content

Reserve peak activation in the fit estimate for image models - #47

Merged
Blaizzy merged 1 commit into
mainfrom
imagegen-fit-estimate
Jul 22, 2026
Merged

Reserve peak activation in the fit estimate for image models#47
Blaizzy merged 1 commit into
mainfrom
imagegen-fit-estimate

Conversation

@Lazarus-931

@Lazarus-931 Lazarus-931 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

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

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.

@lucasnewman lucasnewman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Blaizzy

Blaizzy commented Jul 22, 2026

Copy link
Copy Markdown
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.

@Blaizzy
Blaizzy merged commit 6fd9941 into main Jul 22, 2026
2 checks passed
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)
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.

3 participants