showlab / Tune-A-Video

[ICCV 2023] Tune-A-Video: One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
https://tuneavideo.github.io
Apache License 2.0
4.15k stars 376 forks source link

How does it run on Mac M1 #39

Closed agilests closed 1 year ago

agilests commented 1 year ago

pip3 install -r requirement.txt error like:

ERROR: Could not find a version that satisfies the requirement decord==0.6.0 (from versions: none)
ERROR: No matching distribution found for decord==0.6.0

The decord library has no arm adaptation, Is there an alternative library? https://pypi.tuna.tsinghua.edu.cn/simple/decord/

lewei-space commented 1 year ago

me too ,same problems

zhangjiewu commented 1 year ago

you may use torchvision.io.read_video as an alternative of decord, see an example below.

frames, _, _ = torchvision.io.read_video(str(self.video_path), output_format="TCHW")
sample_indices = list(range(self.sample_start_idx, len(frames), self.sample_frame_rate))[:self.n_sample_frames]
frames = frames[sample_indices].type(torch.float32)
video = torch.stack(frames)