[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-06-28 05:45:19 +00:00
commit 2823793a97
2 changed files with 11 additions and 2 deletions

View file

@ -497,7 +497,12 @@ class SdCppDiffusionBackend:
raise RuntimeError("Diffusion generation was cancelled.")
# ``seeds`` is the per-image seed (each sd-cli run used seed+index), so
# the route can persist the real seed for every image in the batch.
return {"images": images, "seed": int(seed), "seeds": seeds, "repo_id": state.repo_id}
return {
"images": images,
"seed": int(seed),
"seeds": seeds,
"repo_id": state.repo_id,
}
except SdCppCancelled as exc:
raise RuntimeError("Diffusion generation was cancelled.") from exc
finally:

View file

@ -10148,7 +10148,11 @@ async def generate_diffusion_image(
def _persist() -> list[dict]:
records = []
for index, image in enumerate(result["images"]):
seed = per_image_seeds[index] if per_image_seeds and index < len(per_image_seeds) else result["seed"]
seed = (
per_image_seeds[index]
if per_image_seeds and index < len(per_image_seeds)
else result["seed"]
)
records.append(
image_gallery.save(
image,