### Installation commands for RelightVid Source: https://github.com/aleafy/relightvid/blob/main/README.md Clone the repository, create a conda environment named 'relitv' with Python 3.10, install PyTorch 2.1.2 with CUDA 11.8, and install requirements. ```bash git clone https://github.com/Aleafy/RelightVid.git cd RelightVid conda create -n relitv python=3.10 conda activate relitv pip install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cu118 pip install -r requirements.txt ``` -------------------------------- ### More example bash commands of RelightVid Source: https://github.com/aleafy/relightvid/blob/main/README.md Additional example commands for relighting various input videos with different background condition videos. Each command specifies the input video, mask directory, background condition video, and output path. ```bash python inference.py --input "./assets/input/woman.mp4" --mask "./assets/mask/woman" --bg_cond "./assets/video_bg/universe1.mp4" --output_path "output/woman_universe1.mp4" ``` ```bash python inference.py --input "./assets/input/woman.mp4" --mask "./assets/mask/woman" --bg_cond "./assets/video_bg/beach.mp4" --output_path "output/woman_beach.mp4" ``` ```bash python inference.py --input "./assets/input/man.mp4" --mask "./assets/mask/man" --bg_cond "./assets/video_bg/tunnel.mp4" --output_path "output/man_tunnel.mp4" ``` ```bash python inference.py --input "./assets/input/man2.mp4" --mask "./assets/mask/man2" --bg_cond "./assets/video_bg/fantasy.mp4" --output_path "output/man2_fantasy.mp4" ``` ```bash python inference.py --input "./assets/input/lion.mp4" --mask "./assets/mask/lion" --bg_cond "./assets/video_bg/stage_light1.mp4" --output_path "output/lion_stagelight1.mp4" ``` ```bash python inference.py --input "./assets/input/truck.mp4" --mask "./assets/mask/truck" --bg_cond "./assets/video_bg/universe3.mp4" --output_path "output/truck_universe3.mp4" ``` ```bash python inference.py --input "./assets/input/truck.mp4" --mask "./assets/mask/truck" --bg_cond "./assets/video_bg/universe1.mp4" --output_path "output/truck_universe1.mp4" ``` ```bash python inference.py --input "./assets/input/glass.mp4" --mask "./assets/mask/glass" --bg_cond "./assets/video_bg/snow.mp4" --output_path "output/glass_snow.mp4" ``` ```bash python inference.py --input "./assets/input/dance.mp4" --mask "./assets/mask/dance" --bg_cond "./assets/video_bg/sunscape.mp4" --output_path "output/dance_sunscape.mp4" ``` -------------------------------- ### Model directory structure for RelightVid Source: https://github.com/aleafy/relightvid/blob/main/README.md Organize downloaded models (RealisticVision-v51, IC-Light, RelightVid) into the specified folder structure under 'models'. ```text RelightVid ├── models │ ├── realistic-vision-v51 // stable diffusion base model │ │ ├── text_encoder │ │ │ ├── config.json │ │ │ └── model.safetensors │ │ ├── tokenizer │ │ │ ├── merges.txt │ │ │ ├── special_tokens_map.json │ │ │ ├── tokenizer_config.json │ │ │ └── vocab.json │ │ ├── unet │ │ │ └── diffusion_pytorch_model.safetensors │ │ ├── vae │ │ │ ├── config.json │ │ │ └── diffusion_pytorch_model.safetensors │ ├── iclight_sd15_fbc.safetensors // ic-light weights │ ├── relvid_mm_sd15_fbc.pth // relightvid motion weights ``` -------------------------------- ### Run RelightVid inference with customized background condition Source: https://github.com/aleafy/relightvid/blob/main/README.md Performs video relighting using the original video, per-frame foreground mask directory, background lighting condition video, and output path. The command combines any input video with any background video. ```bash python inference.py \ --input "./assets/input/lion.mp4" \ --mask "./assets/mask/lion" \ --bg_cond "./assets/video_bg/stage_light2.mp4" \ --output_path "output/lion_stagelight2.mp4" ```