目录

下载代码

git clone https://github.com/Stability-AI/generative-models.git Stability-AI/generative-models
cd Stability-AI/generative-models/

创建虚拟环境

python -m venv env
source env/bin/activate
pip install -r requirements/pt2.txt
pip install .

Apple Silicon 上没有安装成功,安装包 triton 不支持

下载模型

pip install "huggingface_hub[cli]"

SDXL-Turbo

huggingface-cli download stabilityai/sdxl-turbo --local-dir checkpoints --local-dir-use-symlinks False

CLIP

huggingface-cli download openai/clip-vit-large-patch14 --local-dir openai/clip-vit-large-patch14 --local-dir-use-symlinks False

CLIP ViT-bigG/14 - LAION-2B

huggingface-cli download laion/CLIP-ViT-bigG-14-laion2B-39B-b160k --local-dir laion/CLIP-ViT-bigG-14-laion2B-39B-b160k --local-dir-use-symlinks False

运行

streamlit run scripts/demo/turbo.py

参考资料