From 4292ab9812d92d1387c5dee3d93c768737ac3a0c Mon Sep 17 00:00:00 2001 From: layerdiffusion <19834515+lllyasviel@users.noreply.github.com> Date: Thu, 17 Apr 2025 23:07:10 -0700 Subject: [PATCH] libx264 --- diffusers_helper/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffusers_helper/utils.py b/diffusers_helper/utils.py index 5ddbede..0b2accc 100644 --- a/diffusers_helper/utils.py +++ b/diffusers_helper/utils.py @@ -276,7 +276,7 @@ def save_bcthw_as_mp4(x, output_filename, fps=10): x = torch.clamp(x.float(), -1., 1.) * 127.5 + 127.5 x = x.detach().cpu().to(torch.uint8) x = einops.rearrange(x, '(m n) c t h w -> t (m h) (n w) c', n=per_row) - torchvision.io.write_video(output_filename, x, fps=fps, video_codec='h264', options={'crf': '0'}) + torchvision.io.write_video(output_filename, x, fps=fps, video_codec='libx264', options={'crf': '0'}) return x