[diffusion] feat: add performance mode server args (#24491)

This commit is contained in:
Mick
2026-05-14 00:57:46 +08:00
committed by GitHub
parent e2290b155a
commit ff70aeac30
79 changed files with 1734 additions and 532 deletions
@@ -463,14 +463,17 @@ def download_dataset(path: str, url: str) -> None:
total_size = int(response.headers.get("content-length", 0))
block_size = 8192
with open(path, "wb") as f, tqdm(
desc="Downloading",
total=total_size,
unit="iB",
unit_scale=True,
unit_divisor=1024,
leave=False,
) as progress_bar:
with (
open(path, "wb") as f,
tqdm(
desc="Downloading",
total=total_size,
unit="iB",
unit_scale=True,
unit_divisor=1024,
leave=False,
) as progress_bar,
):
for data in response.iter_content(block_size):
size = f.write(data)
progress_bar.update(size)