[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72236":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},72236,"hallo2","fudan-generative-vision\u002Fhallo2","fudan-generative-vision","[ICLR 2025] Hallo2: Long-Duration and High-Resolution Audio-driven Portrait Image Animation","https:\u002F\u002Ffudan-generative-vision.github.io\u002Fhallo2",null,"Python",3705,536,289,49,0,1,4,7,3,64.89,"MIT License",false,"main",true,[],"2026-06-12 04:01:04","\u003Ch1 align='center'>Hallo2: Long-Duration and High-Resolution Audio-driven Portrait Image Animation\u003C\u002Fh1>\n\n\u003Cdiv align='center'>\n    \u003Ca href='https:\u002F\u002Fgithub.com\u002Fcuijh26' target='_blank'>Jiahao Cui\u003C\u002Fa>\u003Csup>1*\u003C\u002Fsup>&emsp;\n    \u003Ca href='https:\u002F\u002Fgithub.com\u002Fcrystallee-ai' target='_blank'>Hui Li\u003C\u002Fa>\u003Csup>1*\u003C\u002Fsup>&emsp;\n    \u003Ca href='https:\u002F\u002Fyoyo000.github.io\u002F' target='_blank'>Yao Yao\u003C\u002Fa>\u003Csup>3\u003C\u002Fsup>&emsp;\n    \u003Ca href='http:\u002F\u002Fzhuhao.cc\u002Fhome\u002F' target='_blank'>Hao Zhu\u003C\u002Fa>\u003Csup>3\u003C\u002Fsup>&emsp;\n    \u003Ca href='https:\u002F\u002Fgithub.com\u002FNinoNeumann' target='_blank'>Hanlin Shang\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>&emsp;\n    \u003Ca href='https:\u002F\u002Fgithub.com\u002FKaihui-Cheng' target='_blank'>Kaihui Cheng\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>&emsp;\n    \u003Ca href='' target='_blank'>Hang Zhou\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>&emsp;\n\u003C\u002Fdiv>\n\u003Cdiv align='center'>\n    \u003Ca href='https:\u002F\u002Fsites.google.com\u002Fsite\u002Fzhusiyucs\u002Fhome' target='_blank'>Siyu Zhu\u003C\u002Fa>\u003Csup>1✉️\u003C\u002Fsup>&emsp;\n    \u003Ca href='https:\u002F\u002Fjingdongwang2017.github.io\u002F' target='_blank'>Jingdong Wang\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>&emsp;\n\u003C\u002Fdiv>\n\n\u003Cdiv align='center'>\n    \u003Csup>1\u003C\u002Fsup>Fudan University&emsp; \u003Csup>2\u003C\u002Fsup>Baidu Inc&emsp; \u003Csup>3\u003C\u002Fsup>Nanjing University\n\u003C\u002Fdiv>\n\n\u003Cdiv align='Center'>\n\u003Ci>\u003Cstrong>\u003Ca href='https:\u002F\u002Ficlr.cc\u002FConferences\u002F2025' target='_blank'>ICLR 2025\u003C\u002Fa>\u003C\u002Fstrong>\u003C\u002Fi>\n\u003C\u002Fdiv>\n\n\u003Cbr>\n\u003Cdiv align='center'>\n    \u003Ca href='https:\u002F\u002Fgithub.com\u002Ffudan-generative-vision\u002Fhallo2'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ffudan-generative-vision\u002Fhallo2?style=social'>\u003C\u002Fa>\n    \u003Ca href='https:\u002F\u002Ffudan-generative-vision.github.io\u002Fhallo2\u002F#\u002F'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-HomePage-Green'>\u003C\u002Fa>\n    \u003Ca href='https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.07718'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-Arxiv-red'>\u003C\u002Fa>\n    \u003Ca href='https:\u002F\u002Fhuggingface.co\u002Ffudan-generative-ai\u002Fhallo2'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20HuggingFace-Model-yellow'>\u003C\u002Fa>\n    \u003Ca href='https:\u002F\u002Fopenbayes.com\u002Fconsole\u002Fpublic\u002Ftutorials\u002F8KOlYWsdiY4'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-OpenBayes贝式计算-orange'>\u003C\u002Fa>\n    \u003Ca href='assets\u002Fwechat.jpeg'>\u003Cimg src='https:\u002F\u002Fbadges.aleen42.com\u002Fsrc\u002Fwechat.svg'>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003Cbr>\n\n## 📸 Showcase\n\n\u003Ctable class=\"center\">\n  \u003Ctr>\n    \u003Ctd style=\"text-align: center\">\u003Cb>Tailor Swift Speech @ NYU (4K, 23 minutes)\u003C\u002Fb>\u003C\u002Ftd>\n    \u003Ctd style=\"text-align: center\">\u003Cb>Johan Rockstrom Speech @ TED (4K, 18 minutes)\u003C\u002Fb>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd style=\"text-align: center\">\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002FTailorSpeech.mp4\">\u003Cimg src=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002Fgifs\u002FTailorSpeechGIF.gif\">\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd style=\"text-align: center\">\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002FTEDSpeech.mp4\">\u003Cimg src=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002Fgifs\u002FTEDSpeechGIF.gif\">\u003C\u002Fa>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd style=\"text-align: center\">\u003Cb>Churchill's Iron Curtain Speech (4K, 4 minutes)\u003C\u002Fb>\u003C\u002Ftd>\n    \u003Ctd style=\"text-align: center\">\u003Cb>An LLM Course from Stanford (4K, up to 1 hour)\u003C\u002Fb>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd style=\"text-align: center\">\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002FDarkestHour.mp4\">\u003Cimg src=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002Fgifs\u002FDarkestHour.gif\">\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd style=\"text-align: center\">\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002FLLMCourse.mp4\">\u003Cimg src=\"https:\u002F\u002Fcdn.aondata.work\u002Fhallo2\u002Fvideos\u002Fshowcases\u002Fgifs\u002FLLMCourseGIF.gif\">\u003C\u002Fa>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\nVisit our [project page](https:\u002F\u002Ffudan-generative-vision.github.io\u002Fhallo2\u002F#\u002F) to view more cases.\n\n## 📰 News\n\n- **`2025\u002F01\u002F23`**: 🎉🎉🎉 Our paper has been accepted to [ICLR 2025](https:\u002F\u002Ficlr.cc\u002FConferences\u002F2025).\n- **`2024\u002F10\u002F16`**: ✨✨✨ Source code and pretrained weights released.\n- **`2024\u002F10\u002F10`**: 🎉🎉🎉 Paper submitted on [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.07718).\n\n## 📅️ Roadmap\n\n| Status | Milestone                                                                                    |    ETA     |\n| :----: | :------------------------------------------------------------------------------------------- | :--------: |\n|   ✅   | **[Paper submitted on Arixiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.07718)**                            | 2024-10-10 |\n|   ✅   | **[Source code meet everyone on GitHub](https:\u002F\u002Fgithub.com\u002Ffudan-generative-vision\u002Fhallo2)** | 2024-10-16 |\n|   🚀   | **[Accelerate performance on inference]()**                                                  |    TBD     |\n\n## 🔧️ Framework\n\n![framework](assets\u002Fframework_2.jpg)\n\n## ⚙️ Installation\n\n- System requirement: Ubuntu 20.04\u002FUbuntu 22.04, Cuda 11.8\n- Tested GPUs: A100\n\nDownload the codes:\n\n```bash\n  git clone https:\u002F\u002Fgithub.com\u002Ffudan-generative-vision\u002Fhallo2\n  cd hallo2\n```\n\nCreate conda environment:\n\n```bash\n  conda create -n hallo python=3.10\n  conda activate hallo\n```\n\nInstall packages with `pip`\n\n```bash\n  pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n  pip install -r requirements.txt\n```\n\nBesides, ffmpeg is also needed:\n\n```bash\n  apt-get install ffmpeg\n```\n\n### 📥 Download Pretrained Models\n\nYou can easily get all pretrained models required by inference from our [HuggingFace repo](https:\u002F\u002Fhuggingface.co\u002Ffudan-generative-ai\u002Fhallo2).\n\nUsing `huggingface-cli` to download the models:\n\n```shell\ncd $ProjectRootDir\npip install huggingface_hub\nhuggingface-cli download fudan-generative-ai\u002Fhallo2 --local-dir .\u002Fpretrained_models\n```\n\nOr you can download them separately from their source repo:\n\n- [hallo](https:\u002F\u002Fhuggingface.co\u002Ffudan-generative-ai\u002Fhallo2\u002Ftree\u002Fmain\u002Fhallo2): Our checkpoints consist of denoising UNet, face locator, image & audio proj.\n- [audio_separator](https:\u002F\u002Fhuggingface.co\u002Fhuangjackson\u002FKim_Vocal_2): Kim*Vocal_2 MDX-Net vocal removal model. (\\_Thanks to [KimberleyJensen](https:\u002F\u002Fgithub.com\u002FKimberleyJensen)*)\n- [insightface](https:\u002F\u002Fgithub.com\u002Fdeepinsight\u002Finsightface\u002Ftree\u002Fmaster\u002Fpython-package#model-zoo): 2D and 3D Face Analysis placed into `pretrained_models\u002Fface_analysis\u002Fmodels\u002F`. (_Thanks to deepinsight_)\n- [face landmarker](https:\u002F\u002Fstorage.googleapis.com\u002Fmediapipe-models\u002Fface_landmarker\u002Fface_landmarker\u002Ffloat16\u002F1\u002Fface_landmarker.task): Face detection & mesh model from [mediapipe](https:\u002F\u002Fai.google.dev\u002Fedge\u002Fmediapipe\u002Fsolutions\u002Fvision\u002Fface_landmarker#models) placed into `pretrained_models\u002Fface_analysis\u002Fmodels`.\n- [motion module](https:\u002F\u002Fgithub.com\u002Fguoyww\u002FAnimateDiff\u002Fblob\u002Fmain\u002FREADME.md#202309-animatediff-v2): motion module from [AnimateDiff](https:\u002F\u002Fgithub.com\u002Fguoyww\u002FAnimateDiff). (_Thanks to [guoyww](https:\u002F\u002Fgithub.com\u002Fguoyww)_).\n- [sd-vae-ft-mse](https:\u002F\u002Fhuggingface.co\u002Fstabilityai\u002Fsd-vae-ft-mse): Weights are intended to be used with the diffusers library. (_Thanks to [stablilityai](https:\u002F\u002Fhuggingface.co\u002Fstabilityai)_)\n- [StableDiffusion V1.5](https:\u002F\u002Fhuggingface.co\u002Frunwayml\u002Fstable-diffusion-v1-5): Initialized and fine-tuned from Stable-Diffusion-v1-2. (_Thanks to [runwayml](https:\u002F\u002Fhuggingface.co\u002Frunwayml)_)\n- [wav2vec](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002Fwav2vec2-base-960h): wav audio to vector model from [Facebook](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002Fwav2vec2-base-960h).\n- [facelib](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FCodeFormer\u002Freleases\u002Ftag\u002Fv0.1.0): pretrained face parse models\n- [realesrgan](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FCodeFormer\u002Freleases\u002Fdownload\u002Fv0.1.0\u002FRealESRGAN_x2plus.pth): background upsample model\n- [CodeFormer](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FCodeFormer\u002Freleases\u002Fdownload\u002Fv0.1.0): pretrained [Codeformer](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FCodeFormer) model, it's optional to download it, only if you want to train our video super-resolution model from scratch\n\nFinally, these pretrained models should be organized as follows:\n\n```text\n.\u002Fpretrained_models\u002F\n|-- audio_separator\u002F\n|   |-- download_checks.json\n|   |-- mdx_model_data.json\n|   |-- vr_model_data.json\n|   `-- Kim_Vocal_2.onnx\n|-- CodeFormer\u002F\n|   |-- codeformer.pth\n|   `-- vqgan_code1024.pth\n|-- face_analysis\u002F\n|   `-- models\u002F\n|       |-- face_landmarker_v2_with_blendshapes.task  # face landmarker model from mediapipe\n|       |-- 1k3d68.onnx\n|       |-- 2d106det.onnx\n|       |-- genderage.onnx\n|       |-- glintr100.onnx\n|       `-- scrfd_10g_bnkps.onnx\n|-- facelib\n|   |-- detection_mobilenet0.25_Final.pth\n|   |-- detection_Resnet50_Final.pth\n|   |-- parsing_parsenet.pth\n|   |-- yolov5l-face.pth\n|   `-- yolov5n-face.pth\n|-- hallo2\n|   |-- net_g.pth\n|   `-- net.pth\n|-- motion_module\u002F\n|   `-- mm_sd_v15_v2.ckpt\n|-- realesrgan\n|   `-- RealESRGAN_x2plus.pth\n|-- sd-vae-ft-mse\u002F\n|   |-- config.json\n|   `-- diffusion_pytorch_model.safetensors\n|-- stable-diffusion-v1-5\u002F\n|   `-- unet\u002F\n|       |-- config.json\n|       `-- diffusion_pytorch_model.safetensors\n`-- wav2vec\u002F\n    `-- wav2vec2-base-960h\u002F\n        |-- config.json\n        |-- feature_extractor_config.json\n        |-- model.safetensors\n        |-- preprocessor_config.json\n        |-- special_tokens_map.json\n        |-- tokenizer_config.json\n        `-- vocab.json\n```\n\n### 🛠️ Prepare Inference Data\n\nHallo has a few simple requirements for input data:\n\nFor the source image:\n\n1. It should be cropped into squares.\n2. The face should be the main focus, making up 50%-70% of the image.\n3. The face should be facing forward, with a rotation angle of less than 30° (no side profiles).\n\nFor the driving audio:\n\n1. It must be in WAV format.\n2. It must be in English since our training datasets are only in this language.\n3. Ensure the vocals are clear; background music is acceptable.\n\nWe have provided [some samples](examples\u002F) for your reference.\n\n### 🎮 Run Inference\n\n#### Long-Duration animation\n\nSimply to run the `scripts\u002Finference_long.py` and change `source_image`, `driving_audio` and `save_path` in the config file:\n\n```bash\npython scripts\u002Finference_long.py --config .\u002Fconfigs\u002Finference\u002Flong.yaml\n```\n\nAnimation results will be saved at `save_path`. You can find more examples for inference at [examples folder](https:\u002F\u002Fgithub.com\u002Ffudan-generative-vision\u002Fhallo2\u002Ftree\u002Fmain\u002Fexamples).\n\nFor more options:\n\n```shell\nusage: inference_long.py [-h] [-c CONFIG] [--source_image SOURCE_IMAGE] [--driving_audio DRIVING_AUDIO] [--pose_weight POSE_WEIGHT]\n                    [--face_weight FACE_WEIGHT] [--lip_weight LIP_WEIGHT] [--face_expand_ratio FACE_EXPAND_RATIO]\n\noptions:\n  -h, --help            show this help message and exit\n  -c CONFIG, --config CONFIG\n  --source_image SOURCE_IMAGE\n                        source image\n  --driving_audio DRIVING_AUDIO\n                        driving audio\n  --pose_weight POSE_WEIGHT\n                        weight of pose\n  --face_weight FACE_WEIGHT\n                        weight of face\n  --lip_weight LIP_WEIGHT\n                        weight of lip\n  --face_expand_ratio FACE_EXPAND_RATIO\n                        face region\n```\n\n#### High-Resolution animation\n\nSimply to run the `scripts\u002Fvideo_sr.py` and pass `input_video` and `output_path`:\n\n```bash\npython scripts\u002Fvideo_sr.py --input_path [input_video] --output_path [output_dir] --bg_upsampler realesrgan --face_upsample -w 1 -s 4\n```\n\nAnimation results will be saved at `output_dir`.\n\nFor more options:\n\n```shell\nusage: video_sr.py [-h] [-i INPUT_PATH] [-o OUTPUT_PATH] [-w FIDELITY_WEIGHT] [-s UPSCALE] [--has_aligned] [--only_center_face] [--draw_box]\n                   [--detection_model DETECTION_MODEL] [--bg_upsampler BG_UPSAMPLER] [--face_upsample] [--bg_tile BG_TILE] [--suffix SUFFIX]\n\noptions:\n  -h, --help            show this help message and exit\n  -i INPUT_PATH, --input_path INPUT_PATH\n                        Input video\n  -o OUTPUT_PATH, --output_path OUTPUT_PATH\n                        Output folder.\n  -w FIDELITY_WEIGHT, --fidelity_weight FIDELITY_WEIGHT\n                        Balance the quality and fidelity. Default: 0.5\n  -s UPSCALE, --upscale UPSCALE\n                        The final upsampling scale of the image. Default: 2\n  --has_aligned         Input are cropped and aligned faces. Default: False\n  --only_center_face    Only restore the center face. Default: False\n  --draw_box            Draw the bounding box for the detected faces. Default: False\n  --detection_model DETECTION_MODEL\n                        Face detector. Optional: retinaface_resnet50, retinaface_mobile0.25, YOLOv5l, YOLOv5n. Default: retinaface_resnet50\n  --bg_upsampler BG_UPSAMPLER\n                        Background upsampler. Optional: realesrgan\n  --face_upsample       Face upsampler after enhancement. Default: False\n  --bg_tile BG_TILE     Tile size for background sampler. Default: 400\n  --suffix SUFFIX       Suffix of the restored faces. Default: None\n```\n\n> NOTICE: The High-Resolution animation feature is a modified version of [CodeFormer](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FCodeFormer). When using or redistributing this feature, please comply with the [S-Lab License 1.0](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FCodeFormer?tab=License-1-ov-file). We kindly request that you respect the terms of this license in any usage or redistribution of this component.\n\n## &#x1F525;Training\n\n### Long-Duration animation\n\n#### prepare data for training\n\nThe training data, which utilizes some talking-face videos similar to the source images used for inference, also needs to meet the following requirements:\n\n1. It should be cropped into squares.\n2. The face should be the main focus, making up 50%-70% of the image.\n3. The face should be facing forward, with a rotation angle of less than 30° (no side profiles).\n\nOrganize your raw videos into the following directory structure:\n\n```text\ndataset_name\u002F\n|-- videos\u002F\n|   |-- 0001.mp4\n|   |-- 0002.mp4\n|   |-- 0003.mp4\n|   `-- 0004.mp4\n```\n\nYou can use any `dataset_name`, but ensure the `videos` directory is named as shown above.\n\nNext, process the videos with the following commands:\n\n```bash\npython -m scripts.data_preprocess --input_dir dataset_name\u002Fvideos --step 1\npython -m scripts.data_preprocess --input_dir dataset_name\u002Fvideos --step 2\n```\n\n**Note:** Execute steps 1 and 2 sequentially as they perform different tasks. Step 1 converts videos into frames, extracts audio from each video, and generates the necessary masks. Step 2 generates face embeddings using InsightFace and audio embeddings using Wav2Vec, and requires a GPU. For parallel processing, use the `-p` and `-r` arguments. The `-p` argument specifies the total number of instances to launch, dividing the data into `p` parts. The `-r` argument specifies which part the current process should handle. You need to manually launch multiple instances with different values for `-r`.\n\nGenerate the metadata JSON files with the following commands:\n\n```bash\npython scripts\u002Fextract_meta_info_stage1.py -r path\u002Fto\u002Fdataset -n dataset_name\npython scripts\u002Fextract_meta_info_stage2.py -r path\u002Fto\u002Fdataset -n dataset_name\n```\n\nReplace `path\u002Fto\u002Fdataset` with the path to the parent directory of `videos`, such as `dataset_name` in the example above. This will generate `dataset_name_stage1.json` and `dataset_name_stage2.json` in the `.\u002Fdata` directory.\n\n#### Training\n\nUpdate the data meta path settings in the configuration YAML files, `configs\u002Ftrain\u002Fstage1.yaml` and `configs\u002Ftrain\u002Fstage2_long.yaml`:\n\n```yaml\n#stage1.yaml\ndata:\n  meta_paths:\n    - .\u002Fdata\u002Fdataset_name_stage1.json\n\n#stage2.yaml\ndata:\n  meta_paths:\n    - .\u002Fdata\u002Fdataset_name_stage2.json\n```\n\nStart training with the following command:\n\n```shell\naccelerate launch -m \\\n  --config_file accelerate_config.yaml \\\n  --machine_rank 0 \\\n  --main_process_ip 0.0.0.0 \\\n  --main_process_port 20055 \\\n  --num_machines 1 \\\n  --num_processes 8 \\\n  scripts.train_stage1 --config .\u002Fconfigs\u002Ftrain\u002Fstage1.yaml\n```\n\n##### Accelerate Usage Explanation\n\nThe `accelerate launch` command is used to start the training process with distributed settings.\n\n```shell\naccelerate launch [arguments] {training_script} --{training_script-argument-1} --{training_script-argument-2} ...\n```\n\n**Arguments for Accelerate:**\n\n- `-m, --module`: Interpret the launch script as a Python module.\n- `--config_file`: Configuration file for Hugging Face Accelerate.\n- `--machine_rank`: Rank of the current machine in a multi-node setup.\n- `--main_process_ip`: IP address of the master node.\n- `--main_process_port`: Port of the master node.\n- `--num_machines`: Total number of nodes participating in the training.\n- `--num_processes`: Total number of processes for training, matching the total number of GPUs across all machines.\n\n**Arguments for Training:**\n\n- `{training_script}`: The training script, such as `scripts.train_stage1` or `scripts.train_stage2`.\n- `--{training_script-argument-1}`: Arguments specific to the training script. Our training scripts accept one argument, `--config`, to specify the training configuration file.\n\nFor multi-node training, you need to manually run the command with different `machine_rank` on each node separately.\n\nFor more settings, refer to the [Accelerate documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Faccelerate\u002Fen\u002Findex).\n\n### High-Resolution animation\n\n#### Training\n\n##### prepare data for training\n\nWe use the VFHQ dataset for training, you can download from its [homepage](https:\u002F\u002Fliangbinxie.github.io\u002Fprojects\u002Fvfhq\u002F). Then updata `dataroot_gt` in `.\u002Fconfigs\u002Ftrain\u002Fvideo_sr.yaml`.\n\n#### training\n\nStart training with the following command:\n\n```shell\npython -m torch.distributed.launch --nproc_per_node=8 --master_port=4322 \\\nbasicsr\u002Ftrain.py -opt .\u002Fconfigs\u002Ftrain\u002Fvideo_sr.yaml \\\n--launcher pytorch\n```\n\n## 📝 Citation\n\nIf you find our work useful for your research, please consider citing the paper:\n\n```\n@misc{cui2024hallo2,\n\ttitle={Hallo2: Long-Duration and High-Resolution Audio-driven Portrait Image Animation},\n\tauthor={Jiahao Cui and Hui Li and Yao Yao and Hao Zhu and Hanlin Shang and Kaihui Cheng and Hang Zhou and Siyu Zhu and️ Jingdong Wang},\n\tyear={2024},\n\teprint={2410.07718},\n\tarchivePrefix={arXiv},\n\tprimaryClass={cs.CV}\n}\n```\n\n## 🌟 Opportunities Available\n\nMultiple research positions are open at the **Generative Vision Lab, Fudan University**! Include:\n\n- Research assistant\n- Postdoctoral researcher\n- PhD candidate\n- Master students\n\nInterested individuals are encouraged to contact us at [siyuzhu@fudan.edu.cn](mailto:\u002F\u002Fsiyuzhu@fudan.edu.cn) for further information.\n\n## ⚠️ Social Risks and Mitigations\n\nThe development of portrait image animation technologies driven by audio inputs poses social risks, such as the ethical implications of creating realistic portraits that could be misused for deepfakes. To mitigate these risks, it is crucial to establish ethical guidelines and responsible use practices. Privacy and consent concerns also arise from using individuals' images and voices. Addressing these involves transparent data usage policies, informed consent, and safeguarding privacy rights. By addressing these risks and implementing mitigations, the research aims to ensure the responsible and ethical development of this technology.\n\n## 🤗 Acknowledgements\n\nWe would like to thank the contributors to the [magic-animate](https:\u002F\u002Fgithub.com\u002Fmagic-research\u002Fmagic-animate), [AnimateDiff](https:\u002F\u002Fgithub.com\u002Fguoyww\u002FAnimateDiff), [ultimatevocalremovergui](https:\u002F\u002Fgithub.com\u002FAnjok07\u002Fultimatevocalremovergui), [AniPortrait](https:\u002F\u002Fgithub.com\u002FZejun-Yang\u002FAniPortrait) and [Moore-AnimateAnyone](https:\u002F\u002Fgithub.com\u002FMooreThreads\u002FMoore-AnimateAnyone) repositories, for their open research and exploration.\n\nIf we missed any open-source projects or related articles, we would like to complement the acknowledgement of this specific work immediately.\n\n## 👏 Community Contributors\n\nThank you to all the contributors who have helped to make this project better!\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffudan-generative-vision\u002Fhallo2\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=fudan-generative-vision\u002Fhallo2\" \u002F>\n\u003C\u002Fa>\n","Hallo2 是一个基于音频驱动的高分辨率人像动画生成项目。它能够根据输入的音频生成长时间且高质量的人像动画，支持4K分辨率，并可处理长达数小时的视频内容。该项目采用Python语言开发，利用深度学习技术实现精准的唇形同步与自然的表情变化。Hallo2适用于多种场景，如虚拟主播、在线教育、电影制作等需要将音频转换为生动人物动画的应用场合。其开源代码遵循MIT许可证，便于研究者和开发者使用及二次开发。",2,"2026-06-11 03:40:59","high_star"]