[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-07-10 09:20:07 +00:00
commit cee2bf6ed2
2 changed files with 3 additions and 6 deletions

View file

@ -1594,9 +1594,7 @@ class VideoBackend:
cancel_event = cancel_event, error = "Failed to save the generated video."
)
return
self._finish_generate_job(
cancel_event = cancel_event, video = record, total = result["steps"]
)
self._finish_generate_job(cancel_event = cancel_event, video = record, total = result["steps"])
def _finish_generate_job(
self,
@ -1653,6 +1651,7 @@ class VideoBackend:
cancel_event: Optional[threading.Event] = None,
) -> dict[str, Any]:
import torch
# begin_generate passes the event it already registered (so a cancel in the
# spawn window is honoured); a direct call makes its own.
cancel = cancel_event if cancel_event is not None else threading.Event()

View file

@ -321,9 +321,7 @@ def test_load_threads_transformer_quant_and_guidance_2(client):
kwargs = video_module.get_video_backend().last_load_kwargs
assert kwargs.get("transformer_quant") == "fp8"
video = _generate_and_wait(
client, {"prompt": "a sloth", "guidance": 5.0, "guidance_2": 3.0}
)
video = _generate_and_wait(client, {"prompt": "a sloth", "guidance": 5.0, "guidance_2": 3.0})
assert video["guidance"] == 5.0 and video["guidance_2"] == 3.0