How to run Hallo2 on a cloud GPU
Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install Hallo2 from the official repository, download the pretrained files with the Hugging Face command the README prints, run scripts/inference_long.py with configs/inference/long.yaml, and copy merge_video.mp4 off the instance before you destroy it. Destroying the instance deletes its disk.
Portrait animation from a driving video, a different repository: How to run LivePortrait on a cloud GPU. Audio-driven lip sync from a different repository: How to run MuseTalk on a cloud GPU. The tunnel page, for programs that open a port: How to use SSH port forwarding on a cloud GPU. If the process runs out of memory: How to fix CUDA out of memory on a cloud GPU.
LICENSE is the MIT License, and its copyright line is “Copyright © 2024 Fusion Lab: Generative Vision Lab of Fudan University” (read 2026-11-13). The GitHub license field the same day was MIT. The model card for fudan-generative-ai/hallo2 the same day had license mit and gated false. The card README fetched the same day repeats the repository installation section, including “Tested GPUs: A100”, and does not add a second license. The grant line is quoted once, in the FAQ. The download section links InsightFace models. The InsightFace README says the models trained with its training data are for non-commercial research purposes only. The README notice says the high-resolution feature is a modified version of CodeFormer and that using or redistributing it must comply with the S-Lab License 1.0. Only animate a face you have the right to use. The README’s Social Risks section says this kind of portrait animation can be misused and that privacy and consent concerns arise from using a person’s image and voice.
The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.
What the README says about memory
The README’s installation section says the system requirement is Ubuntu 20.04 or Ubuntu 22.04, and Cuda 11.8, and that tested GPUs are A100. It does not print a GPU GB figure. configs/inference/long.yaml sets weight_dtype to fp16. That is a config field, not a measured memory total. The training section says step 2 of data preprocessing requires a GPU and prints no GB figure. Its accelerate example sets --num_processes 8 and says that argument is the total number of processes, matching the total number of GPUs. That is a process count in the training example, not an inference VRAM figure. This page follows the inference commands and does not copy the training launch. This page did not re-measure a run.
GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, updated_at 2026-11-13T00:01:03.458Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-13T00:01:04.537Z) listed the same names and the same vram_gb values, plus Ascend 910B at 64, which is not in gpu-prices.json and is not listed here. The catalog response also includes an availability field. This page does not copy it. Every prices row has gpu_count 1. Catalog A100 40G is 40 and A100 80G is 80. The README does not say which A100 it tested, so this page does not mark either row as the tested card, and it does not mark any row as enough. Which listing you can start is on Deploy.
The catalog template list had no Hallo2 template. The catalog template named CodeFormer has id codeformer, recommended_gpu RTX 4090 48G, and min_vram_gb 16. Those are template fields. The high-resolution script in this repository is not that template.
| Catalog name | vram_gb |
|---|---|
| RTX 2080 | 8 |
| RTX 3080 | 10 |
| RTX 2080 Ti | 11 |
| RTX 3080 Ti | 12 |
| V100 16G | 16 |
| A30 | 24 |
| RTX 3090 | 24 |
| RTX 4090 | 24 |
| RTX 4090D | 24 |
| RTX 4080 SUPER 32G | 32 |
| RTX 5090 | 32 |
| RTX 5090D | 32 |
| V100 32G | 32 |
| A100 40G | 40 |
| A800 40G | 40 |
| A40 | 48 |
| RTX 4090 48G | 48 |
| RTX 4090D 48G | 48 |
| RTX A6000 | 48 |
| NVIDIA RTX PRO 5000 72G | 72 |
| RTX PRO 5000 72G | 72 |
| A100 80G | 80 |
| A800 80G | 80 |
| H800 | 80 |
| RTX 6000D | 83 |
| H20 96G | 96 |
| RTX PRO 6000 96G | 96 |
| RTX PRO 6000 Max-Q | 96 |
| H20-3e 141G | 141 |
Install and download
On Deploy, choose Raw GPU. The deploy page says “SSH access and root within a dedicated container”. The README’s clone, copied:
git clone https://github.com/fudan-generative-vision/hallo2
cd hallo2
The commits API on 2026-11-13 listed 58a9aa6c9f66817a6e084f3874cfc01ac24fed3e on the default branch main, committed 2025-02-27T03:24:55Z, message “fix: Installation bug fixes (#73)”.
The conda block, copied. If conda is not on PATH, use how to set up a conda environment on a cloud GPU. This page did not check whether the Raw GPU image already has conda.
conda create -n hallo python=3.10
conda activate hallo
The torch line and the requirements line, copied. requirements.txt does not list torch. It pins diffusers==0.32.2, insightface==0.7.3, onnxruntime-gpu==1.18.0, transformers==4.39.2, xformers==0.0.25.post1, and gradio==4.36.1. This page did not run the two pip commands, so it does not claim the second one leaves the torch pin in place.
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
How to install a specific PyTorch CUDA version says to use an index that is not newer than the CUDA Version in the nvidia-smi header. The README’s index is cu118. This page did not compare that index with a rental image.
The README then prints:
apt-get install ffmpeg
The download section says you can get the pretrained models from fudan-generative-ai/hallo2. It prints cd $ProjectRootDir and then these two lines. The README never assigns ProjectRootDir. Bash cd with no directory uses $HOME, so that cd alone leaves the download outside the clone. This page does not copy it. The clone block above already ends in hallo2. Run the two lines from that directory:
pip install huggingface_hub
huggingface-cli download fudan-generative-ai/hallo2 --local-dir ./pretrained_models
How to download a Hugging Face model is the token reference. The same section also lists separate sources. The folder tree it prints after that list includes audio_separator/Kim_Vocal_2.onnx, face_analysis/models/ with face_landmarker_v2_with_blendshapes.task and the five onnx names 1k3d68.onnx, 2d106det.onnx, genderage.onnx, glintr100.onnx, and scrfd_10g_bnkps.onnx, hallo2/net_g.pth and hallo2/net.pth, motion_module/mm_sd_v15_v2.ckpt, realesrgan/RealESRGAN_x2plus.pth, sd-vae-ft-mse/diffusion_pytorch_model.safetensors, stable-diffusion-v1-5/unet/diffusion_pytorch_model.safetensors, and wav2vec/wav2vec2-base-960h/. The wav2vec bullet and the face-landmarker bullet each print a download location. This page does not copy those two locations. Copy them from the README if you download those files separately. The stable-diffusion bullet names runwayml/stable-diffusion-v1-5. The VAE bullet names stabilityai/sd-vae-ft-mse. The vocal bullet names huangjackson/Kim_Vocal_2.
Inference
The README says the source image should be cropped into a square, the face should be the main focus at 50% to 70% of the image, and the face should face forward with a rotation under 30 degrees. The driving audio must be WAV, must be English, and should have clear vocals. Samples are in examples/. long.yaml sets source_image to ./examples/reference_images/1.jpg and driving_audio to ./examples/driving_audios/1.wav. It also sets source_image width and height to 512, driving_audio sample_rate to 16000, export_video fps to 25, inference_steps to 40, cfg_scale to 3.5, and save_path to ./output_long/debug/.
The long-duration command, copied:
python scripts/inference_long.py --config ./configs/inference/long.yaml
The README says animation results are saved at save_path. scripts/inference_long.py joins config.save_path with the source image stem, writes segment files under seg_video as {name}-{index:06}.mp4, and then calls merge_videos with merge_video.mp4 in the parent of that joined path. With the yaml values above, that parent is ./output_long/debug/. This page did not run the script.
The high-resolution command, copied. The README says those results are saved at output_dir. video_sr.py writes {video_name}.mp4 under the output path you pass. If --output_path is omitted, the script sets the folder to ./hq_results/{video_name}_{w}_{upscale}. The argparse default for -w is 0.5 and for -s is 2. The command below overrides both.
python scripts/video_sr.py --input_path [input_video] --output_path [output_dir] --bg_upsampler realesrgan --face_upsample -w 1 -s 4
The README has no ComfyUI section. The ComfyUI examples top-level list on 2026-11-13 had no Hallo2 directory. Commit f9431bb000ce792094ff345446e22cac1ea6cef3 was the latest on that repository, committed 2025-11-26T20:33:58Z.
Web UI
requirements.txt pins gradio==4.36.1. A search of the repository at the commit above found that pin and no Python file that imports Gradio or calls launch. The scripts directory listing is inference_long.py, video_sr.py, train_stage1.py, train_stage2_long.py, data_preprocess.py, and the two extract_meta_info scripts. This page does not add a web UI command and does not add a tunnel command. The inference commands above do not open a port.
When it fails
CUDA out of memory. The README does not print an out-of-memory flag or a GB target. If the process raises that error, use how to fix CUDA out of memory on a cloud GPU.
“CUDA error: no kernel image is available for execution on the device” on an RTX 5090. The README pins torch==2.2.2 from the cu118 index. It does not name compute capability 12.0. The RTX 5090 guide says that card is compute capability 12.0 (sm_120) and that PyTorch 2.7 and later, on a build for CUDA 12.8 or newer, is the line that announced support. This page did not install a torch wheel and did not re-test Hallo2 on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. That is the catalog number only.
Input rejected by the README’s own rules. The image and audio requirements are the list in the inference section. The README says the training data are English only, in the audio bullet. This page did not add a language flag.
Save the video, then destroy
Copy ./output_long/debug/, including merge_video.mp4 and the seg_video files, and the high-resolution output directory if you ran video_sr.py, off the instance before you destroy it. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed.
The pricing page FAQ states the billing rule in these words:
Per-minute options have a 1-minute minimum; unused prepaid minutes are refunded when you destroy the instance. Some configurations use whole-hour billing with a 1-hour minimum; unused time within a charged hour is not refunded on voluntary stop. The billing period, minimum charge and initial prepayment are shown before confirmation. No subscription.
Prices are not copied here.
Frequently asked questions
How much VRAM does the Hallo2 README publish?
The Hallo2 README and the fudan-generative-ai/hallo2 model card publish no GB figure. The installation section says tested GPUs are A100, and the system lines name Ubuntu 20.04 or Ubuntu 22.04 and Cuda 11.8. long.yaml sets weight_dtype to fp16. That is a config field, not a measured total. Catalog A100 40G is 40 and A100 80G is 80 in https://cloudgpu.app/gpu-prices.json (updated_at 2026-11-13T00:01:03.458Z). The README does not say which A100 it tested. This page does not mark a row as enough. Which listing you can start is on https://cloudgpu.app/deploy.
What license applies to the code and the high-resolution feature?
LICENSE is the MIT License, copyright line Copyright © 2024 Fusion Lab: Generative Vision Lab of Fudan University. The grant says permission is granted free of charge. That sentence is license text, not a CloudGPU price and not a storage allowance. The model card license field was mit and gated was false. The README notice says the high-resolution feature must comply with the S-Lab License 1.0. The InsightFace README says its models are for non-commercial research purposes only. Read those files before you use the weights.
Where is the video saved, and is there a web UI?
The README says long-duration results are saved at save_path. long.yaml sets save_path to ./output_long/debug/. inference_long.py joins that path with the source image stem, writes segment mp4 files under seg_video, and writes merge_video.mp4 in the parent of the joined path. video_sr.py writes a mp4 under the output path you pass. requirements.txt pins gradio==4.36.1, and no script in the repository imports Gradio. The inference commands do not open a port. This page did not run them.
Do the videos stay on the instance after I destroy it?
No. Copy ./output_long/debug/, including merge_video.mp4, and the high-resolution output directory if you ran video_sr.py, off the instance before you destroy it. The terms say data on local instance storage is permanently deleted when the instance is destroyed.
Sources (read 2026-11-13, Asia/Shanghai)
- Hallo2 README (clone, conda, torch cu118 line,
huggingface-cli download,inference_long.py,video_sr.py, tested GPUs A100, S-Lab notice, InsightFace link): https://github.com/fudan-generative-vision/hallo2/blob/main/README.md configs/inference/long.yaml(save_path,fp16, 512, 16000, fps 25, 40 steps,cfg_scale3.5),scripts/inference_long.py(joined save path,merge_video.mp4),scripts/video_sr.py(output mp4, argparse defaults),requirements.txt(gradio==4.36.1, no Gradio import elsewhere): that repository, commit58a9aa6c9f66817a6e084f3874cfc01ac24fed3e- LICENSE (MIT; copyright line above): that repository
- fudan-generative-ai/hallo2 model card (
licensemit,gatedfalse, README text with no GB figure): https://huggingface.co/fudan-generative-ai/hallo2 - InsightFace README license section (models for non-commercial research): https://github.com/deepinsight/insightface/blob/master/README.md
- ComfyUI examples top-level directories (no Hallo2 directory): https://github.com/comfyanonymous/ComfyUI_examples commit
f9431bb000ce792094ff345446e22cac1ea6cef3 - Public GPU memory: https://cloudgpu.app/gpu-prices.json (
updated_at2026-11-13T00:01:03.458Z) and https://cloudgpu.app/v1/public/gpu-catalog (generated_at2026-11-13T00:01:04.537Z).GET /v1/public/compute-capabilitiesreturned feature flags and no GPU list. The catalog templatecodeformeris named CodeFormer.
Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.
Last updated: 2026-11-13 (Asia/Shanghai).