安装Lumina-mGPT-2.0需要按照以下步骤搭建专业环境:
- Get Code:首先通过git克隆项目仓库
git clone https://github.com/Alpha-VLLM/Lumina-mGPT-2.0.git
,并进入项目目录 - Creating a Virtual Environment:使用Conda建立Python 3.10的独立环境避免依赖冲突
conda create -n lumina_mgpt_2 python=3.10 -y
- Installation of dependencies:依次执行
pip install -r requirements.txt
安装基础依赖,特别需要安装加速模块Flash Attention - Download model weights:需单独下载270M大小的MoVQGAN预训练权重文件,并放置到指定目录
- Verify Installation:运行测试生成脚本确认环境配置正确,注意需要40GB以上显存的GPU支持
重要提示:安装过程中特别注意CUDA版本与torch的兼容性,推荐使用官方测试通过的CUDA 12+ torch 2.3环境。如遇依赖冲突,可尝试使用--no-deps
参数单独安装关键组件。
This answer comes from the articleLumina-mGPT-2.0: an autoregressive image generation model for handling multiple image generation tasksThe