## Installation
Step 1: Please first follow the installation instruction of [Large-DiT-ImageNet](https://github.com/Alpha-VLLM/LLaMA2-Accessory/tree/main/Large-DiT-ImageNet). We use ``cuda-12.1`` and ``gcc 9.4.0``.

Step 2: Install relevant packages
- replace fairscale with our modified package
    cd fairscale
    pip install -e .
- Install 2-bit kernal function.
    cd kernel
    python3 setup_cuda.py install

Step 3: Inference
After getting the ternary checkpoint, you can run the following command to get the results.
python -u sample.py --ckpt /path/to/checkpoint --local_diffusers_model_root  /path/to/vae --seed 42
