mirror of
https://github.com/THUDM/CogVideo.git
synced 2025-04-06 03:57:56 +08:00
Update cli_vae_demo.py
This commit is contained in:
parent
3801e3f246
commit
d027706052
@ -133,5 +133,6 @@ if __name__ == "__main__":
|
|||||||
elif args.mode == "both":
|
elif args.mode == "both":
|
||||||
assert args.video_path, "Video path must be provided for encoding."
|
assert args.video_path, "Video path must be provided for encoding."
|
||||||
encoded_output = encode_video(args.model_path, args.video_path, dtype, device)
|
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)
|
decoded_output = decode_video(args.model_path, args.output_path + "/encoded.pt", dtype, device)
|
||||||
save_video(decoded_output, args.output_path)
|
save_video(decoded_output, args.output_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user