GitHub 项目:备忘录
仓库地址:https://github.com/memoavatar/memo
星级:1071 | 作者:memoavatar
项目描述:[TMLR] 用于生成富有表现力的谈话视频的记忆引导扩散
===================================================
自述文件内容:
# 备忘录
**备注:用于生成富有表现力的谈话视频的记忆引导扩散**
[郑龙涛](https://ltzheng.github.io)\*,
[张一凡](https://scholar.google.com/itations?user=zuYIUJEAAAAJ)\*,
[郭汉中](https://scholar.google.com/itations?user=q3x6KsgAAAAJ)\,
[潘嘉春](https://scholar.google.com/itations?user=nrOvfb4AAAAJ),
[谭振雄](https://scholar.google.com/itations?user=HP9Be6UAAAAJ),
[卢嘉豪](https://scholar.google.com/itations?user=h7rbA-sAAAAJ),
[唐传鑫](https://scholar.google.com/itations?user=3ZC8B7MAAAAJ),
[博安](https://personal.ntu.edu.sg/boan/index.html),
[严水成](https://scholar.google.com/itations?user=DNuiPHwAAAAJ)
_[项目页面](https://memoavatar.github.io) | [arXiv](https://arxiv.org/abs/2412.04448) | [模型](https://huggingface.co/memoavatar/memo)_
该存储库包含 MEMO 预览模型的示例推理脚本。下面的 gif 演示是压缩的。请参阅我们的[项目页面](https://memoavatar.github.io) 以获取完整视频。另外,请查看社区贡献,包括 [ComfyUI 集成](https://github.com/if-ai/ComfyUI-IF_MemoAvatar/tree/main)、[Gradio 应用程序](https://github.com/camenduru/memo-tost/blob/main/worker_runpod_gradio.py)、 [演示](https://x.com/camenduru/status/1865102599591976961)和[Jupyter笔记本](https://github.com/camenduru/memo-jupyter)。
## 安装
````bash
conda create -n 备忘录 python=3.10 -y
conda 激活备忘录
conda 安装-c conda-forge ffmpeg -y
pip install -e 。
````
> 我们的代码会自动从 Hugging Face 下载检查点,用于面部分析和声音分离的模型将下载到 `configs/inference.yaml` 的 `misc_model_dir` 中。如果您想手动下载模型,请从[此处](https://huggingface.co/memoavatar/memo)下载检查点,并在 configs/inference.yaml 的 model_name_or_path 中指定路径。
## 推论
````bash
python inference.py --config configs/inference.yaml --input_image
--input_audio --output_dir
````
例如:
````bash
python inference.py --config configs/inference.yaml --input_image asset/examples/dicaprio.jpg --input_audio asset/examples/speech.wav --output_dir 输出
````
> 我们使用 CUDA 12 在 H100 和 RTX 4090 GPU 上测试了代码。在默认设置(fps=30,inference_steps=20)下,H100 上的推理时间约为每帧 1 秒,RTX 4090 上的推理时间约为每帧 2 秒。我们欢迎社区做出贡献,以提高推理速度或添加更多功能。
## 微调我们的模型
我们提供了一个简单的微调脚本,供用户继续在自己的数据集上进行训练。
### 第 1 步:数据准备
安装数据预处理和微调的依赖项:
````bash
pip 安装 Deepspeed Decord wandb
````
您的训练数据应该采用视频剪辑的形式。数据应该是组织