### Set up environment with setup_env.sh Source: https://github.com/weijielyu/facelift/blob/main/README.md Run this command to set up the environment for FaceLift. It is the only setup command provided in the README. ```bash bash setup_env.sh ``` -------------------------------- ### Launch Gradio web interface Source: https://github.com/weijielyu/facelift/blob/main/README.md Launches the interactive Gradio web interface. After starting, open http://localhost:7860 in your browser, or use the provided public link if running on a server. ```bash python gradio_app.py ``` -------------------------------- ### Run inference from command line Source: https://github.com/weijielyu/facelift/blob/main/README.md Runs inference on images in a directory. Use --input_dir to specify the input folder and --output_dir for results. Defaults are examples/ and outputs/ respectively. ```bash python inference.py --input_dir examples/ --output_dir outputs/ ``` -------------------------------- ### Train Gaussian reconstructor Source: https://github.com/weijielyu/facelift/blob/main/README.md Trains the Gaussian reconstructor (GS-LRM) using torchrun with 8 processes on 1 node. Uses the c10d rendezvous backend and requires the config configs/gslrm.yaml. Pre-trained weights from Objaverse data are used. ```bash torchrun --nproc_per_node 8 --nnodes 1 \ --rdzv_id ${JOB_UUID} --rdzv_backend c10d --rdzv_endpoint localhost:29500 \ train_gslrm.py --config configs/gslrm.yaml ``` -------------------------------- ### Train multi-view diffusion model Source: https://github.com/weijielyu/facelift/blob/main/README.md Trains the multi-view diffusion model using Accelerate with an 8-GPU configuration. Requires the mvdiffusion/node_config/8gpu.yaml config file and the training config configs/mvdiffusion.yaml. ```bash accelerate launch --config_file mvdiffusion/node_config/8gpu.yaml \ train_diffusion.py --config configs/mvdiffusion.yaml ``` -------------------------------- ### GS-LRM data structure Source: https://github.com/weijielyu/facelift/blob/main/README.md Directory structure for GS-LRM training data. Place training and validation lists in data_gslrm_train.txt and data_gslrm_val.txt, and organize 32 multi-view images (RGBA, 512×512) under images/ along with opencv_cameras.json for camera parameters. ```text data_sample/ ├── gslrm/ │ ├── data_gslrm_train.txt # Training data list │ ├── data_gslrm_val.txt # Validation data list │ └── sample_000/ │ ├── images/ │ │ ├── cam_000.png # Multi-view images (RGBA, 512×512) │ │ ├── cam_001.png │ │ ├── ... │ │ └── cam_031.png # 32 views total │ └── opencv_cameras.json # Camera parameters ``` -------------------------------- ### Multi-view diffusion data structure Source: https://github.com/weijielyu/facelift/blob/main/README.md Directory structure for multi-view diffusion training data. Place training and validation lists in data_mvdiff_train.txt and data_mvdiff_val.txt, and organize sample images as cam_000.png through cam_005.png (RGBA, 512×512). ```text data_sample/ ├── mvdiffusion/ │ ├── data_mvdiff_train.txt # Training data list │ ├── data_mvdiff_val.txt # Validation data list │ └── sample_000/ │ ├── cam_000.png # Front view (RGBA, 512×512) │ ├── cam_001.png # Front-right view │ ├── cam_002.png # Right view │ ├── cam_003.png # Back view │ ├── cam_004.png # Left view │ └── cam_005.png # Front-left view ```