Clone the repository of VP2 and install the required dependencies following its instructions of VP2.
We have made sure that there are no dependency conflicts between ivideogpt and vp2, so if you encounter trouble in the environments, you can follow these:
- Create a new virtual environment.
- Install the iVideoGPT dependencies as described in the Installation section of
ivideopgt/README.md
. - Copy the provided
vp2_requirements.txt
file into the downloaded VP2 folder. - Run
pip install -r vp2_requirements.txt
.
Follow the steps below to integrate the iVideoGPT interface into VP2:
- Update the path in
ivideogpt_interface.py
: Go to line 12, where you will seesys.path.append("/dev/null/ivideogpt")
.Replace/dev/null/ivideogpt
with the absolute path to your local iVideoGPT folder. This step ensures relative paths are imported correctly. - Place
ivideogpt_interface.py
in the correct location: Copy it tovp2/vp2/models/ivideogpt_interface.py
. You should seetorch_fitvid_interface.py
in the same directory. - Place
ivideogpt.yaml
in the correct location: Copy it tovp2/vp2/scripts/configs/model/ivideogpt.yaml
. You should seefitvid.yaml
in the same directory.
To test your trained iVideoGPT models on VP2:
- In
ivideogpt.yaml
, specify the following:config_name
,pretrained_vqgan_name_or_path
andpretrained_transformer_path
- Refer to
script.sh
for example usage instructions (Note: The working directory for these instructions is assumed to bevp2/vp2
).