Singularity setup script for DiffusionLight. This is useful when you want to run DiffusionLight on a machine that doesn't have root privilege (Solution for Issue #5)
You need to install Singularity-CE on the machine that you want to run first.
You can follow this guide to install Singularity-CE without root
Alternatively, you can use Apptainer, but I'm going to stick with Singularity-CE for this example.
We first clone this directory and cd
into it. because we need 2 files with singularity.def
for building the container image and requirement.txt
to install python component
git clone https://github.com/DiffusionLight/DiffusionLight-singularity.git
cd DiffusionLight-singularity
Then we build the image into SIF format.
singularity build --fakeroot diffusionlight.sif singularity.def
We clone the main repo directory and cd
into it.
git clone https://github.com/DiffusionLight/DiffusionLight.git
cd DiffusionLight
Note that if diffusionlight.sif is not in this folder, please move it to the DiffusionLight folder using the mv command.
mv ../diffusionlight.sif diffusionlight.sif
Assume we will input the image in the example
folder and output to the output
folder. We run
# inpainting
singularity exec --nv diffusionlight.sif python inpaint.py --dataset example --output_dir output
Other python file under DiffusionLight should work with the same environment including LoRA-Trainer and Evaluation
You can run all of them by adding using singularity exec --nv diffusionlight.sif <your command>
@inproceedings{Phongthawee2023DiffusionLight,
author = {Phongthawee, Pakkapon and Chinchuthakun, Worameth and Sinsunthithet, Nontaphat and Raj, Amit and Jampani, Varun and Khungurn, Pramook and Suwajanakorn, Supasorn},
title = {DiffusionLight: Light Probes for Free by Painting a Chrome Ball},
booktitle = {ArXiv},
year = {2023},
}