This is an unofficial demo app for CogVideo.
You can try web demo: (This version currently supports only the first stage.)
sample_00.mp4
sample_01.mp4
It takes about 7 minutes to load models on startup and about 11 minutes to generate one video.
An A100 instance is required to run CogVideo.
First, put "default-runtime": "nvidia"
in /etc/docker/daemon.json
.
See: NVIDIA/nvidia-docker#1033 (comment)
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
},
"default-runtime": "nvidia"
}
Then, restart docker.
sudo systemctl restart docker
git clone --recursive https://github.com/hysts/CogVideo_demo
cd CogVideo_demo
docker build . -t cogvideo
cd CogVideo
patch -p1 < ../patch
The pretrained models will be downloaded automatically on the first run, but it may take quite some time. So you may want to download them in advance.
This repo assumes the pretrained models are stored in the pretrained
directory as follows:
pretrained
├── cogvideo-stage1
│ ├── 27000
│ │ └── mp_rank_00_model_states.pt
│ ├── latest
│ └── model_config.json
├── cogvideo-stage2
│ ├── 38000
│ │ └── mp_rank_00_model_states.pt
│ ├── latest
│ └── model_config.json
└── cogview2-dsr
├── 20000
│ └── mp_rank_00_model_states.pt
├── latest
└── model_config.json
You can run the app with the following command:
docker compose run --rm app
The app will start up on port 7860 by default.
You can change the port using GRADIO_SERVER_PORT
environment variable.
Use port forwarding when running on GCP, etc.