[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-05-25 01:05:45 +00:00
commit 8858104b29
3 changed files with 5 additions and 7 deletions

View file

@ -1491,8 +1491,8 @@ class DiffusionLoadRequest(BaseModel):
# in the C++ layer. uint64 is also routinely cited online so accept
# any value the underlying RNG could store and bounce the rest at the
# Pydantic layer with a clean error.
_SEED_MIN = -(2 ** 63)
_SEED_MAX = (2 ** 64) - 1
_SEED_MIN = -(2**63)
_SEED_MAX = (2**64) - 1
class DiffusionGenerateRequest(BaseModel):

View file

@ -292,9 +292,7 @@ async def start_training(
llama_backend = get_llama_cpp_backend()
if getattr(llama_backend, "is_loaded", False):
logger.info(
"Unloading GGUF chat model to free GPU memory for training"
)
logger.info("Unloading GGUF chat model to free GPU memory for training")
llama_backend.unload_model()
except Exception as e:
logger.warning("Could not unload GGUF chat model: %s", e)

View file

@ -217,7 +217,7 @@ def test_generate_rejects_oversize_seed(app_with_stub):
)
r = c.post(
"/api/inference/images/generate",
json = {"prompt": "x", "seed": 2 ** 100},
json = {"prompt": "x", "seed": 2**100},
)
assert r.status_code == 422, r.text
@ -234,7 +234,7 @@ def test_generate_accepts_uint64_max_seed(app_with_stub):
)
r = c.post(
"/api/inference/images/generate",
json = {"prompt": "x", "seed": (2 ** 64) - 1},
json = {"prompt": "x", "seed": (2**64) - 1},
)
# The fake backend returns 200 on success; we only care that the
# request did NOT 422 on seed bounds.