Update README.md
Browse files
README.md
CHANGED
|
@@ -15,38 +15,57 @@ license: llama2
|
|
| 15 |
- NVIDIA GPU + [CUDA](https://developer.nvidia.com/cuda-downloads)
|
| 16 |
|
| 17 |
### Installation
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
-
2. Install dependent packages
|
| 26 |
-
|
| 27 |
-
```bash
|
| 28 |
-
pip install -r requirements.txt
|
| 29 |
-
```
|
| 30 |
|
| 31 |
### Model Weights
|
| 32 |
-
We
|
| 33 |
Please download the checkpoints and save under the folder `./pretrained`.
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
To reconstruct the image from the SEED visual codes using unCLIP SD-UNet, please download the pretrained [unCLIP SD](https://huggingface.co/stabilityai/stable-diffusion-2-1-unclip).
|
| 36 |
Rename the checkpoint directory to **"diffusion_model"** and create a soft link to the "pretrained/seed_tokenizer" directory.
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
### Inference for visual tokenization and de-tokenization
|
| 40 |
To discretize an image to 1D visual codes with causal dependency, and reconstruct the image from the visual codes using the off-the-shelf unCLIP SD-UNet:
|
|
|
|
| 41 |
```bash
|
|
|
|
| 42 |
python scripts/seed_tokenizer_inference.py
|
| 43 |
```
|
| 44 |
|
| 45 |
-
### Launching Demo of SEED-LLaMA Locally
|
|
|
|
|
|
|
| 46 |
```bash
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
|
|
|
|
|
|
| 50 |
|
| 51 |
## Citation
|
| 52 |
If you find the work helpful, please consider citing:
|
|
|
|
| 15 |
- NVIDIA GPU + [CUDA](https://developer.nvidia.com/cuda-downloads)
|
| 16 |
|
| 17 |
### Installation
|
| 18 |
+
Clone the repo and install dependent packages
|
| 19 |
|
| 20 |
+
```bash
|
| 21 |
+
git clone https://github.com/AILab-CVC/SEED.git
|
| 22 |
+
cd SEED
|
| 23 |
+
pip install -r requirements.txt
|
| 24 |
+
```
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
### Model Weights
|
| 28 |
+
We release the pretrained SEED Tokenizer and De-Tokenizer, instruction tuned SEED-LLaMA-8B and SEED-LLaMA-14B in [SEED Hugging Face](https://huggingface.co/AILab-CVC/SEED).
|
| 29 |
Please download the checkpoints and save under the folder `./pretrained`.
|
| 30 |
|
| 31 |
+
```bash
|
| 32 |
+
cd pretrained # SEED/pretrained
|
| 33 |
+
git lfs install
|
| 34 |
+
git clone https://huggingface.co/AILab-CVC/SEED
|
| 35 |
+
mv SEED/* ./
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
To reconstruct the image from the SEED visual codes using unCLIP SD-UNet, please download the pretrained [unCLIP SD](https://huggingface.co/stabilityai/stable-diffusion-2-1-unclip).
|
| 39 |
Rename the checkpoint directory to **"diffusion_model"** and create a soft link to the "pretrained/seed_tokenizer" directory.
|
| 40 |
|
| 41 |
+
```bash
|
| 42 |
+
# SEED/pretrained
|
| 43 |
+
git lfs install
|
| 44 |
+
git clone https://huggingface.co/stabilityai/stable-diffusion-2-1-unclip
|
| 45 |
+
mv stable-diffusion-2-1-unclip seed_tokenizer/diffusion_model
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
|
| 49 |
### Inference for visual tokenization and de-tokenization
|
| 50 |
To discretize an image to 1D visual codes with causal dependency, and reconstruct the image from the visual codes using the off-the-shelf unCLIP SD-UNet:
|
| 51 |
+
|
| 52 |
```bash
|
| 53 |
+
cd .. # SEED/
|
| 54 |
python scripts/seed_tokenizer_inference.py
|
| 55 |
```
|
| 56 |
|
| 57 |
+
### Launching Gradio Demo of SEED-LLaMA-14B Locally
|
| 58 |
+
Building the local demo of SEED-LLaMA-14B currently requires 2*32GB devices.
|
| 59 |
+
|
| 60 |
```bash
|
| 61 |
+
# SEED/
|
| 62 |
+
# in first terminal
|
| 63 |
+
sh scripts/start_backend.sh
|
| 64 |
+
# in second terminal
|
| 65 |
+
sh scripts/start_frontend.sh
|
| 66 |
```
|
| 67 |
+
Then the demo can be accessed through http://127.0.0.1:80
|
| 68 |
+
|
| 69 |
|
| 70 |
## Citation
|
| 71 |
If you find the work helpful, please consider citing:
|