Skip to content

aigc3d/LHM-plusplus

Repository files navigation

LHM++ - Official PyTorch Implementation

Tongyi Lab, Alibaba Group Β· SYSU Β· CUHK-SZ Β· Fudan University

Project Website arXiv Paper HuggingFace YouTube Apache License

LHM++ is an efficient large-scale human reconstruction model that generates high-quality, animatable 3D avatars within seconds from one or multiple pose-free images. It achieves dramatic speedups over LHM-0.7B via an Encoder-Decoder Point-Image Transformer architecture. See the project website for more details.

Model Specifications

Type Views Feat. Dim Attn. Heads # GS Points Encoder Dim. Service Requirement Inference Time (1v) Inference Time (4v) Inference Time (8v) Inference Time (16v)
LHMPP-700M Any 1024 16 160,000 1024 8 GB 0.79 s 1.00 s 1.31 s 2.13 s
LHMPPS-700M Any 1024 16 160,000 1024 7.3 GB 0.79 s 1.00 s 1.31 s 2.13 s

Efficiency Analysis

LHM++ achieves dramatic speedups via the Encoder-Decoder Point-Image Transformer architecture. Below we show the efficiency comparison across different configurations.

If you prefer Chinese documentation, please see the Chinese README.

πŸ“’ Latest Updates

TODO List

  • Core Inference PipelineπŸ”₯πŸ”₯πŸ”₯
  • Release the codes and pretrained weights
  • HuggingFace Demo Integration πŸ€—πŸ€—πŸ€—
  • ModelScope Space Online Demo
  • Release Training data & Testing Data (License Available)
  • Training Codes Release

πŸš€ Getting Started

Environment Setup

Clone the repository.

git clone https://github.com/aigc3d/LHM-plusplus
cd LHM-plusplus
# install torch 2.3.0 cuda 12.1
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
pip install -U xformers==0.0.26.post1 --index-url https://download.pytorch.org/whl/cu121

# install dependencies
pip install -r requirements.txt
pip install rembg[cpu]  # only use during extracting sparse view inputs.

# install pointops
cd ./lib/pointops/ && python setup.py install && cd ../../

pip install spconv-cu121
# pip install torch_scatter, see [wheel](https://data.pyg.org/whl/) for your CUDA version
# For example (PyTorch 2.3 + CUDA 12.1 + Python 3.10):
pip install torch_scatter-2.1.2+pt23cu121-cp310-cp310-linux_x86_64.whl

# install pytorch3d
pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu121_pyt230/download.html

# install diff-gaussian-rasterization
pip install git+https://github.com/ashawkey/diff-gaussian-rasterization/
# or
# git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization
# pip install ./diff-gaussian-rasterization

# install simple-knn
pip install git+https://github.com/camenduru/simple-knn/


# install gsplat
# pip install gsplat from pre-compiled [wheel](https://docs.gsplat.studio/whl/gsplat/)
# For example (PyTorch 2.3 + CUDA 12.1 + Python 3.10):
# gsplat-1.4.0+pt23cu121-cp310-cp310-linux_x86_64.whl
pip install gsplat-1.4.0+pt23cu121-cp310-cp310-linux_x86_64.whl

The installation has been tested with python3.10, CUDA 12.1. Or you can install dependencies step by step, following INSTALL.md.

Model Weights

One-Click Download (recommended)

Download assets (motion_video), prior models, and pretrained weights in one command:

# One-click: motion_video + prior models + pretrained weights
python scripts/download_all.py

# Skip parts (e.g. already have motion_video)
python scripts/download_all.py --skip-asset --skip-models

# Force re-download motion_video
python scripts/download_all.py --force-asset

Pretrained Model Download (individual)

Use the download script to fetch prior models (human_model_files, voxel_grid, arcface, etc.) and LHM++ weights. Skips items that already exist. Tries HuggingFace first, falls back to ModelScope.

# Download prior models + pretrained weights (default)
python scripts/download_pretrained_models.py

# Prior models only (human_model_files, voxel_grid, BiRefNet, etc.)
python scripts/download_pretrained_models.py --prior

# LHM++ model weights only (LHMPP-700M, LHMPP-700MC, LHMPPS-700M)
python scripts/download_pretrained_models.py --models

# Custom save directory
python scripts/download_pretrained_models.py --save-dir /path/to/pretrained_models

Download from ModelScope (manual)

from modelscope import snapshot_download

# LHMPP-700M (default model weights)
model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPP-700M', cache_dir='./pretrained_models')
# Or: LHMPP-700MC, LHMPPS-700M
# model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPP-700MC', cache_dir='./pretrained_models')
# model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPPS-700M', cache_dir='./pretrained_models')

# LHMPP-Prior (prior models: human_model_files, voxel_grid, BiRefNet, etc.)
model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPP-Prior', cache_dir='./pretrained_models')

Motion Video Download

Required for Gradio motion examples. If ./motion_video at project root is missing, downloads from Damo_XR_Lab/LHMPP-Assets (model, extracts motion_video.tar to project root):

# Requires: pip install modelscope
python scripts/download_motion_video.py

# Custom parent directory (default: . = project root)
python scripts/download_motion_video.py --save-dir .

After downloading weights and data, the project structure:

β”œβ”€β”€ app.py
β”œβ”€β”€ assets
β”‚   β”œβ”€β”€ efficiency_analysis
β”‚   β”œβ”€β”€ example_aigc_images
β”‚   β”œβ”€β”€ example_multi_images
β”‚   └── example_videos
β”œβ”€β”€ benchmark
β”œβ”€β”€ configs
β”‚   └── train
β”‚       β”œβ”€β”€ LHMPP-1view.yaml
β”‚       β”œβ”€β”€ LHMPP-any-view.yaml
β”‚       β”œβ”€β”€ LHMPP-any-view-convhead.yaml
β”‚       └── LHMPP-any-view-DPTS.yaml
β”œβ”€β”€ core
β”‚   β”œβ”€β”€ datasets
β”‚   β”œβ”€β”€ losses
β”‚   β”œβ”€β”€ models
β”‚   β”œβ”€β”€ modules
β”‚   β”œβ”€β”€ outputs
β”‚   β”œβ”€β”€ runners
β”‚   β”œβ”€β”€ structures
β”‚   β”œβ”€β”€ utils
β”‚   └── launch.py
β”œβ”€β”€ dnnlib
β”œβ”€β”€ engine
β”‚   β”œβ”€β”€ BiRefNet
β”‚   β”œβ”€β”€ pose_estimation
β”‚   └── ouputs.py
β”œβ”€β”€ exps
β”‚   β”œβ”€β”€ checkpoints
β”‚   β”œβ”€β”€ releases
β”‚   └── ...
β”œβ”€β”€ lib
β”‚   └── pointops
β”œβ”€β”€ pretrained_models
β”‚   β”œβ”€β”€ dense_sample_points
β”‚   β”œβ”€β”€ gagatracker
β”‚   β”œβ”€β”€ human_model_files
β”‚   β”œβ”€β”€ voxel_grid
β”‚   β”œβ”€β”€ arcface_resnet18.pth
β”‚   β”œβ”€β”€ BiRefNet-general-epoch_244.pth
β”‚   β”œβ”€β”€ Damo_XR_Lab
β”‚   └── huggingface
β”œβ”€β”€ scripts
β”‚   β”œβ”€β”€ exp
β”‚   β”œβ”€β”€ inference
β”‚   β”œβ”€β”€ mvs_render
β”‚   β”œβ”€β”€ pose_estimator
β”‚   β”œβ”€β”€ test
β”‚   β”œβ”€β”€ convert_hf.py
β”‚   β”œβ”€β”€ download_all.py
β”‚   β”œβ”€β”€ download_motion_video.py
β”‚   β”œβ”€β”€ download_pretrained_models.py
β”‚   └── upload_hub.py
β”œβ”€β”€ tools
β”‚   └── metrics
β”œβ”€β”€ train_data
β”‚   β”œβ”€β”€ example_imgs
β”‚   └── motion_video
β”œβ”€β”€ motion_video
β”œβ”€β”€ INSTALL.md
β”œβ”€β”€ INSTALL_CN.md
β”œβ”€β”€ README.md
β”œβ”€β”€ README_CN.md
└── requirements.txt

πŸ’» Local Gradio Run

Now, we support user motion sequence input. As the pose estimator requires some GPU memory, this Gradio application requires at least 8 GB of GPU memory to run LHMPP-700M with 8-view inputs.

## Quick Start; Testing the Code
python ./scripts/test/test_app_video.py --input_video ./assets/example_videos/yuliang.mp4
python ./scripts/test/test_app_case.py

# Run LHM++ with Gradio API
python ./app.py --model_name [LHMPP-700M, LHMPPS-700M], default LHMPP-700M

Running Tips: Ensure the input images are high resolution, preferably with visible hand details, and include at least one image where the body is fully extended/spread out.

More Works

Welcome to follow our team other interesting works:

✨ Star History

Star History

Citation

If you find our approach helpful, please consider citing our works.

LHM++ (Efficient Large Human Reconstruction Model for Pose-free Images to 3D):

@article{qiu2025lhmpp,
  title={LHM++: An Efficient Large Human Reconstruction Model for Pose-free Images to 3D},
  author={Lingteng Qiu and Peihao Li and Heyuan Li and Qi Zuo and Xiaodong Gu and Yuan Dong and Weihao Yuan and Rui Peng and Siyu Zhu and Xiaoguang Han and Guanying Chen and Zilong Dong},
  journal={arXiv preprint arXiv:2503.10625},
  year={2025}
}

LHM:

@inproceedings{qiu2025LHM,
  title={LHM: Large Animatable Human Reconstruction Model from a Single Image in Seconds},
  author={Lingteng Qiu and Xiaodong Gu and Peihao Li and Qi Zuo and Weichao Shen and Junfei Zhang and Kejie Qiu and Weihao Yuan and Guanying Chen and Zilong Dong and Liefeng Bo},
  booktitle={ICCV},
  year={2025}
}

About

LHM++: An Efficient Large Human Reconstruction Model for Pose-free Images to 3D

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors