[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-07-04 07:47:47 +00:00
commit e73444ed99
3 changed files with 12 additions and 6 deletions

View file

@ -357,7 +357,11 @@ _FP16_ACCUM_DENY: frozenset[str] = frozenset()
def _enable_fp16_accumulation(
family: Any, logger: Any, *, dtype: Any = None, speed_mode: Optional[str] = None
family: Any,
logger: Any,
*,
dtype: Any = None,
speed_mode: Optional[str] = None,
) -> bool:
"""Turn on fp16-accumulated fp16 GEMMs for consumer GPUs, where they run ~2x the
fp32-accumulate rate (datacenter HBM parts are not throughput-nerfed, so they keep

View file

@ -11980,7 +11980,6 @@ async def diffusion_inference_info(current_subject: str = Depends(get_current_su
Hardware-independent (served from the pure auto-policy tables, no GPU probing), so it
is cheap and safe to fetch before anything is loaded."""
from core.inference.diffusion_inference_info import family_inference_infos
return DiffusionInferenceInfoResponse(families = family_inference_infos())

View file

@ -357,7 +357,12 @@ def test_apply_tolerates_missing_optims(monkeypatch):
# ── fp16 accumulation (consumer fp16-GEMM fast path) ──────────────────────────
def _stub_torch_fp16_accum(monkeypatch, *, consumer = True, with_flag = True):
def _stub_torch_fp16_accum(
monkeypatch,
*,
consumer = True,
with_flag = True,
):
torch = types.ModuleType("torch")
torch.bfloat16 = "bfloat16"
torch.channels_last = "channels_last"
@ -427,9 +432,7 @@ def test_fp16_accum_respects_family_deny_list(monkeypatch):
_stub_gguf_accel(monkeypatch)
monkeypatch.setattr(ds_mod, "_FP16_ACCUM_DENY", frozenset({"fragile-family"}))
fam = types.SimpleNamespace(supports_torch_compile = True, name = "fragile-family")
applied = apply_speed_optims(
_Pipe(), _target(), is_gguf = True, family = fam, speed_mode = "default"
)
applied = apply_speed_optims(_Pipe(), _target(), is_gguf = True, family = fam, speed_mode = "default")
assert applied["fp16_accum"] is False