To install AnyText2, you need to download the model checkpoints via ModelScope, clone the repository, and set up a Conda environment.
- Download Checkpoints: Use
modelscope to download the iic/cv_anytext2 model. - Setup Repository: Clone the
AnyText2 repository and move the downloaded checkpoints into a models directory within the project root. - Environment Setup: Create a new Conda environment using the provided
environment.yaml file.
# 1. Download checkpoint (requires pip install modelscope first)
python -c "from modelscope import snapshot_download; print(snapshot_download('iic/cv_anytext2'))"
# 2. Clone anytext code and move checkpoint
git clone https://github.com/tyxsspa/AnyText2.git
cd AnyText2 && mkdir -p models && mv /path/to/your_downloaded_dir/* models
# 3. Create a new environment and install packages
conda env create -f environment.yaml
conda activate anytext2