Skip to content

Account for effective FP8 text-encoder tensor allocation in Metal auto-fit #51

Open

Description

@leehack

Impact / classification

P2 bug: the Metal effective-F16 memory plan under-reserves FP8 text encoders by about14%, so a near-capacity fit may admit a load with less headroom than reported. No new crash or v0.4 regression is alleged.

PR#47's retained finding records plan675MiB versus actual770.53MiB, with token_embedding held at4bytes. It reproduces identically on v0.3.0-6. The qualified fit row covers the DiT only, not this encoder case.

Exact layers — 2026-11-17

  • Current publiccore/SDcompanion0.19.11/maincorec3523b66 pin v0.3.0-6, owner0ec6c1fa1e60d5124413b6c14b8fe510f112567d, upstreambe486498eadc29dc3cd234d944c2180ed42b1415.
  • Latest owner0.4.0, owner4a91d32111567c4f3e4417999b3fe7db101bff68, upstream1104/5dcfa79801213f23e27b3e83617350ebb8ea93aa, retains the finding.
  • Raw1106/532d2c15c430a785a712b2d94281f04e733008a4 has a separate opaque API migration; no demonstrated containing fix for this accounting case.

Bounded repair / acceptance

Account for the actual allocated tensor dtype/bytes of each text-encoder tensor, including F32 token embeddings, rather than assuming every FP8 component becomes F16 uniformly. Preserve effective-F16 DiT accounting and existing placement/LoRA/fit contracts.

  • Failing-first encoder-specific estimate-versus-loaded-allocation fixture, including the recorded F32 token_embedding exception.
  • Exact affected-family FP8 text-encoder model/components on actual Metal; module-specific planned/allocated bytes and forced-low-headroom fit/refusal controls.
  • F16/BF16/FP8 and diffusion/encoder/VAE placement regressions, no silent CPU fallback credited as Metal.
  • Existing hook/public configuration need not change if repaired in owner accounting; publish verified artifact/manifests/checksums before separately approved core/SwiftPM adoption and bounded docs updates.

Closed #31/merged#32 repaired broader FP8 retyping/DiT and LoRA cases; this remaining encoder-specific exception is distinct. Do not reopen or erase that delivery. #20 remains the upstream/artifact umbrella.

Duplicate searches across open/closed titles/bodies/comments and PRs for under-reserve/770.53/FP8 fit found only #47's follow-up and the older closed scope, not a focused open repair ticket. No native/model/device run, source edit, release or pin action by this scan.

Activity

  1. added
    bug
    priority:P2
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions