The official implementation of CVPR'26 paper "Lighting in Motion: Spatiotemporal HDR Lighting Estimation"
21
stars
3
commits
Python
primary language
May 24, 2026
updated
This is the repo with all the required code to train and run inference of LiMo.
The repo contains 4 main parts:
The repo must be cloned with recursive
git clone --recursive https://github.com/Eyeline-Labs/LiMo
cd LiMo
conda env create -f environment.yml
conda activate LiMo
Pip dependencies:
pip install -r requirements.txt
Requires ffmpeg:
apt install ffmpeg -y
The weights for the video model can be downloaded here
The latest weights for the image model can be downloaded here
Place both downloaded folders in the checkpoints directory:
mkdir checkpoints
Two distinct gradio scripts are in the repo, depending on the image or video model. Both can run on a single A100 40Gb GPU
python gradio_image.py
python gradio_video.py
The gradio app requires to follow the steps:
To obtain renders to use for composition, there are a few modifications to this blender file.
View Layer -> Passes -> Light -> Shadow Catcher.Image in the renders folder and the Shadow catcher saved as an EXR named Shadowin the same renders folder.

Once the renders are complete, both the renders and original_frames folders can be copied to the same directory (on the machine where the LiMo repo resides). The composition is then done with:
python composite.py --data_path path/to/folder --shadow_factor 1
All inference and training other than the gradio demo expects the following structure for the datasets:
-output_dir
-lighting_%04d
-camera_%04d
-object_%d
-frame_%04d
-sphere_0
-sphere_1
camera_info.pkl
sphere_info.pkl
{maps}
camera_info.pkl
{maps}
An example dataset classroom can be downloaded here and extracted in the dataset directory.
The bash scripts and config files are set with this path as input data and outputs/ as output. This can be changed with the appropriate paths.
The code required for the video model is based on DiffSynth-Studio and is in the video folder
Training is done though the Wan2.2_train.sh script and can be ran as follows:
cd video
. Wan2.2_train.sh
The config is done through the arguments in the bash script
Inference is done though the Wan2.2_test.sh script and can be ran as follows:
cd video
. Wan2.2_test.sh
The config is done through the arguments in the bash script
The code required for the image model is in the image folder
Training is done though the train_conditioned_DM.py script and can be ran as follows:
cd image
python train_conditioned_DM.py balls
Where balls is a config defined in train_config.py
Similarly, inference of a dataset is done through:
cd image
python test_sphere.py balls
Where balls is defined in test_config.py
The code for the HDR optimization is in the HDRMerge subfolder.
Again, the code is distinct for the image or video model
It uses a Pyramid of Laplacian for the HDR equirectangular and samples randomly the EV and sphere type from the predictions.
For image model:
cd HDRMerge
. merge_image.sh
For video model:
cd HDRMerge
. merge_video.sh
There also is a script to HDR merge the GT, which uses the GT rendered exr rgb. This is done as blender's hdr equirectangular render ignore some direct view light sources, whereas they show in the mirror sphere.
cd HDRMerge
. merge_gt.sh
The code for the HDR optimization is in the metrics subfolder.
To obtain the metrics from the paper, the optimized HDRi must first be used to relight a test scene.
The script render_metrics.py uses the blend file test_scene.blend and sets the optimized HDR as world lighting before rendering.
The script is run as such for the image predictions:
cd metrics
python render_metrics.py --blender_path [path to blender executable] --data_path ../outputs/classroom_image
--data_path can be changed to ../outputs/classroom_video for video predictions and to ../datasets/classroom for GT.
Once the test scene is rendered for both the GT and predictions, the metrics from the paper can be obtained with the two following bash by setting the correct paths.
python metrics_renders_separate.py --gt ../datasets/classroom --pred ../outputs/classroom_image
python metrics_renders_separate_time.py --gt ../datasets/classroom --pred ../outputs/classroom_image
--pred can be changed to ../outputs/classroom_video for video predictions.
Those same render and metrics scripts are used for both image and video models.
2 commits
1 commits
Python
97.8%
Shell
1.7%
The official implementation of CVPR'26 paper "Lighting in Motion: Spatiotemporal HDR Lighting Estimation"
21
stars
3
commits
Python
primary language
May 24, 2026
updated
This is the repo with all the required code to train and run inference of LiMo.
The repo contains 4 main parts:
The repo must be cloned with recursive
git clone --recursive https://github.com/Eyeline-Labs/LiMo
cd LiMo
conda env create -f environment.yml
conda activate LiMo
Pip dependencies:
pip install -r requirements.txt
Requires ffmpeg:
apt install ffmpeg -y
The weights for the video model can be downloaded here
The latest weights for the image model can be downloaded here
Place both downloaded folders in the checkpoints directory:
mkdir checkpoints
Two distinct gradio scripts are in the repo, depending on the image or video model. Both can run on a single A100 40Gb GPU
python gradio_image.py
python gradio_video.py
The gradio app requires to follow the steps:
To obtain renders to use for composition, there are a few modifications to this blender file.
View Layer -> Passes -> Light -> Shadow Catcher.Image in the renders folder and the Shadow catcher saved as an EXR named Shadowin the same renders folder.

Once the renders are complete, both the renders and original_frames folders can be copied to the same directory (on the machine where the LiMo repo resides). The composition is then done with:
python composite.py --data_path path/to/folder --shadow_factor 1
All inference and training other than the gradio demo expects the following structure for the datasets:
-output_dir
-lighting_%04d
-camera_%04d
-object_%d
-frame_%04d
-sphere_0
-sphere_1
camera_info.pkl
sphere_info.pkl
{maps}
camera_info.pkl
{maps}
An example dataset classroom can be downloaded here and extracted in the dataset directory.
The bash scripts and config files are set with this path as input data and outputs/ as output. This can be changed with the appropriate paths.
The code required for the video model is based on DiffSynth-Studio and is in the video folder
Training is done though the Wan2.2_train.sh script and can be ran as follows:
cd video
. Wan2.2_train.sh
The config is done through the arguments in the bash script
Inference is done though the Wan2.2_test.sh script and can be ran as follows:
cd video
. Wan2.2_test.sh
The config is done through the arguments in the bash script
The code required for the image model is in the image folder
Training is done though the train_conditioned_DM.py script and can be ran as follows:
cd image
python train_conditioned_DM.py balls
Where balls is a config defined in train_config.py
Similarly, inference of a dataset is done through:
cd image
python test_sphere.py balls
Where balls is defined in test_config.py
The code for the HDR optimization is in the HDRMerge subfolder.
Again, the code is distinct for the image or video model
It uses a Pyramid of Laplacian for the HDR equirectangular and samples randomly the EV and sphere type from the predictions.
For image model:
cd HDRMerge
. merge_image.sh
For video model:
cd HDRMerge
. merge_video.sh
There also is a script to HDR merge the GT, which uses the GT rendered exr rgb. This is done as blender's hdr equirectangular render ignore some direct view light sources, whereas they show in the mirror sphere.
cd HDRMerge
. merge_gt.sh
The code for the HDR optimization is in the metrics subfolder.
To obtain the metrics from the paper, the optimized HDRi must first be used to relight a test scene.
The script render_metrics.py uses the blend file test_scene.blend and sets the optimized HDR as world lighting before rendering.
The script is run as such for the image predictions:
cd metrics
python render_metrics.py --blender_path [path to blender executable] --data_path ../outputs/classroom_image
--data_path can be changed to ../outputs/classroom_video for video predictions and to ../datasets/classroom for GT.
Once the test scene is rendered for both the GT and predictions, the metrics from the paper can be obtained with the two following bash by setting the correct paths.
python metrics_renders_separate.py --gt ../datasets/classroom --pred ../outputs/classroom_image
python metrics_renders_separate_time.py --gt ../datasets/classroom --pred ../outputs/classroom_image
--pred can be changed to ../outputs/classroom_video for video predictions.
Those same render and metrics scripts are used for both image and video models.
2 commits
1 commits
Python
97.8%
Shell
1.7%