HelloVision / HelloMeme

The official HelloMeme GitHub site
https://songkey.github.io/hellomeme/
MIT License
103 stars 6 forks source link

项目复现错误及解决方法分享 #5

Open XksA-me opened 2 days ago

XksA-me commented 2 days ago

1、Cannot initialize model with low cpu memory usage because accelerate was not found in the environment. Defaulting to low_cpu_mem_usage=False. It is strongly recommended to install accelerate for faster and less memory-intense model loading.

解决方法:pip install accelerate

2、python inference_video.py 错误

Traceback (most recent call last):
  File "/mnt/example/HelloMeme/inference_video.py", line 117, in <module>
    inference_video(engines, ref_img_path, drive_video_path, save_path, trans_ratio=0.0)
  File "/root/miniconda3/envs/myconda/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/example/HelloMeme/inference_video.py", line 80, in inference_video
    imageio.mimsave(save_path, res_frames, fps=15)
  File "/root/miniconda3/envs/myconda/lib/python3.12/site-packages/imageio/v2.py", line 494, in mimwrite
    with imopen(uri, "wI", **imopen_args) as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/myconda/lib/python3.12/site-packages/imageio/core/imopen.py", line 281, in imopen
    raise err_type(err_msg)
ValueError: Could not find a backend to open `data/results/trump_jue.mp4`` with iomode `wI`.
Based on the extension, the following plugins might add capable backends:
  FFMPEG:  pip install imageio[ffmpeg]
  pyav:  pip install imageio[pyav]

解决方法:pip install imageio[ffmpeg]