Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何安装和配置Open-Sora的运行环境?

2025-08-25 1.1 K

安装Open-Sora需要分步骤完成环境配置:

  1. Creating a Python Virtual Environment:推荐使用Python 3.10版本,通过conda创建独立环境避免依赖冲突
    conda create -n opensora python=3.10
    conda activate opensora
  2. Cloning Codebase:从GitHub获取项目源码
    git clone https://github.com/hpcaitech/Open-Sora
    cd Open-Sora
  3. Installing core dependencies:需确保PyTorch版本≥2.4.0
    pip install -v .

    开发模式下建议使用:

    pip install -v -e .
  4. 加速库安装:根据CUDA版本安装性能优化库
    pip install xformers==0.0.27.post2 --index-url ...
    pip install flash-attn --no-build-isolation
  5. Model Download:从Hugging Face或ModelScope获取预训练权重
    huggingface-cli download hpcai-tech/Open-Sora-v2 --local-dir ./ckpts

安装完成后可通过python -c "import opensora; print(opensora.__version__)"Verify that it was successful.

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish