[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
f06895b73e
commit
8858104b29
3 changed files with 5 additions and 7 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue