[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
4161d5d87a
commit
3bb3734879
2 changed files with 4 additions and 5 deletions
|
|
@ -809,7 +809,6 @@ class DiffusionBackend:
|
|||
def _hub_cache_repo_dir(repo_id: str) -> Path:
|
||||
"""The local HF hub cache dir for ``repo_id`` (``.../models--org--name``)."""
|
||||
from huggingface_hub import constants
|
||||
|
||||
return Path(constants.HF_HUB_CACHE) / f"models--{repo_id.replace('/', '--')}"
|
||||
|
||||
@staticmethod
|
||||
|
|
@ -1448,9 +1447,7 @@ class DiffusionBackend:
|
|||
# expansion. The single-file-is-pipeline (SDXL) path is a full bf16 pipeline
|
||||
# checkpoint, not this fp8 transformer path, so it stays at on-disk size.
|
||||
fp8_upcast = not getattr(fam, "single_file_is_pipeline", False) and (
|
||||
"fp8" in Path(single_file_path).name.lower()
|
||||
if single_file_path
|
||||
else False
|
||||
"fp8" in Path(single_file_path).name.lower() if single_file_path else False
|
||||
)
|
||||
transformer_resident = estimate_safetensors_dense_mib(
|
||||
file_size_mib(single_file_path), fp8_upcast = fp8_upcast
|
||||
|
|
|
|||
|
|
@ -492,7 +492,9 @@ def test_diffusion_dataset_upload_rejects_unsupported_files(client, dataset_root
|
|||
assert "Unsupported file" in r.json()["detail"]
|
||||
|
||||
|
||||
def test_diffusion_dataset_upload_over_cap_rolls_back_whole_batch(client, dataset_roots, monkeypatch):
|
||||
def test_diffusion_dataset_upload_over_cap_rolls_back_whole_batch(
|
||||
client, dataset_roots, monkeypatch
|
||||
):
|
||||
# All-or-nothing: a valid image ahead of the one that trips the size cap must NOT be
|
||||
# left on disk (the 413 mid-batch rolls back every file written this request).
|
||||
import utils.upload_limits as ul
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue