Merge pull request #121 from HaiyiMei/patch-1

Fix bug of `cli_vae_demo.py` when `args.mode == "both"`
This commit is contained in:
zR 2024-08-13 18:47:25 +08:00 committed by GitHub
commit edc382c74f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,5 +133,6 @@ if __name__ == "__main__":
elif args.mode == "both":
assert args.video_path, "Video path must be provided for encoding."
encoded_output = encode_video(args.model_path, args.video_path, dtype, device)
torch.save(encoded_output, args.output_path + "/encoded.pt")
decoded_output = decode_video(args.model_path, args.output_path + "/encoded.pt", dtype, device)
save_video(decoded_output, args.output_path)