Daniton commited on
Commit
ec0f0c2
β€’
1 Parent(s): 649bf38

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -86
README.md DELETED
@@ -1,86 +0,0 @@
1
- # CogVideo demo
2
- This is an unofficial demo app for [CogVideo](https://github.com/THUDM/CogVideo).
3
-
4
- You can try web demo: [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/THUDM/CogVideo) (This version currently supports only the first stage.)
5
-
6
- https://user-images.githubusercontent.com/25161192/180413610-63f2b76b-684f-404b-9d13-6c0033987b1f.mp4
7
-
8
- https://user-images.githubusercontent.com/25161192/180413654-20ce822f-be7d-40cb-aff3-1712a7505a2c.mp4
9
-
10
- It takes about 7 minutes to load models on startup and about 11 minutes to generate one video.
11
-
12
- ## Prerequisite
13
- An A100 instance is required to run CogVideo.
14
-
15
- ## Installation
16
- ### Change default-runtime of docker
17
- First, put `"default-runtime": "nvidia"` in `/etc/docker/daemon.json`.
18
- See: https://github.com/NVIDIA/nvidia-docker/issues/1033#issuecomment-519946473
19
- ```json
20
- {
21
- "runtimes": {
22
- "nvidia": {
23
- "path": "/usr/bin/nvidia-container-runtime",
24
- "runtimeArgs": []
25
- }
26
- },
27
- "default-runtime": "nvidia"
28
- }
29
- ```
30
-
31
- Then, restart docker.
32
- ```bash
33
- sudo systemctl restart docker
34
- ```
35
-
36
- ### Clone this repo
37
- ```bash
38
- git clone --recursive https://github.com/hysts/CogVideo_demo
39
- cd CogVideo_demo
40
- ```
41
-
42
- ### Build docker image
43
- ```bash
44
- docker build . -t cogvideo
45
- ```
46
-
47
- ### Apply patch to CogVideo repo
48
- ```bash
49
- cd CogVideo
50
- patch -p1 < ../patch
51
- ```
52
-
53
- ### Download pretrained models (Optional)
54
- The pretrained models will be downloaded automatically on the first run,
55
- but it may take quite some time.
56
- So you may want to download them in advance.
57
-
58
- This repo assumes the pretrained models are stored in the `pretrained` directory as follows:
59
- ```
60
- pretrained
61
- β”œβ”€β”€ cogvideo-stage1
62
- β”‚ β”œβ”€β”€ 27000
63
- β”‚ β”‚ └── mp_rank_00_model_states.pt
64
- β”‚ β”œβ”€β”€ latest
65
- β”‚ └── model_config.json
66
- β”œβ”€β”€ cogvideo-stage2
67
- β”‚ β”œβ”€β”€ 38000
68
- β”‚ β”‚ └── mp_rank_00_model_states.pt
69
- β”‚ β”œβ”€β”€ latest
70
- β”‚ └── model_config.json
71
- └── cogview2-dsr
72
- β”œβ”€β”€ 20000
73
- β”‚ └── mp_rank_00_model_states.pt
74
- β”œβ”€β”€ latest
75
- └── model_config.json
76
- ```
77
-
78
- ## Run
79
- You can run the app with the following command:
80
- ```bash
81
- docker compose run --rm app
82
- ```
83
-
84
- The app will start up on port 7860 by default.
85
- You can change the port using `GRADIO_SERVER_PORT` environment variable.
86
- Use port forwarding when running on GCP, etc.