--- title: Vchitect 2.0 emoji: 🐢 colorFrom: yellow colorTo: pink sdk: gradio sdk_version: 4.42.0 app_file: app.py pinned: false license: apache-2.0 --- # Vchitect-XL ## Installation ### 1. Create a conda environment and install PyTorch Note: You may want to adjust the CUDA version [according to your driver version](https://docs.nvidia.com/deploy/cuda-compatibility/#default-to-minor-version). ```bash conda create -n VchitectXL -y conda activate VchitectXL conda install python=3.11 pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia -y ``` ### 2. Install dependencies ```bash pip install -r requirements.txt ``` ### 3. Install ``flash-attn`` ```bash pip install flash-attn --no-build-isolation ``` ### 4. Install [nvidia apex](https://github.com/nvidia/apex) ```bash pip install ninja git clone https://github.com/NVIDIA/apex cd apex # if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple `--config-settings` with the same key... pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ # otherwise pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./ ``` ## Inference ~~~bash #easy infer test_file=$1 save_dir=$2 ckpt_path=$3 python inference.py --test_file "${test_file}" --save_dir "${save_dir}" --ckpt_path "${ckpt_path}" ~~~