LoginSignup
1
2
記事投稿キャンペーン 「2024年!初アウトプットをしよう」

StreamDiffusionをローカル環境にインストールする【Windows】

Last updated at Posted at 2024-01-21

パソコン環境

  • Windows 11 Pro
  • AMD Ryzen 7 5700X 8-Core:32GB
  • NVIDIA GeForce RTX 3060 Ti:8GB DDR6

事前準備

git -v

python -V

nvcc -V

StreamDiffusionのインストール

  1. 公式の"README.md"通りに進める。

    • GitHubからStreamDiffusionをcloneしてくる。(gitが必要)
    • StreamDiffusionのフォルダに移動
    • Pythonの仮想環境を作成
    • Pythonの仮想環境をactivate

    エラーが出ない場合は、ステップ 3. に進む

  2. 実行ポリシーを変更して、Python仮想環境をactivateする。

    Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope CurrentUser
    .\.venv\Scripts\activate
    

    RあるいはAを押してスクリプトの実行を許可してください。

  3. pipを更新して、依存環境をインストール。

    python.exe -m pip install --upgrade pip
    pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu121
    
  4. StreamDiffusionをインストール。

    pip install git+https://github.com/cumulo-autumn/StreamDiffusion.git@main#egg=streamdiffusion[tensorrt]
    

デモの実行(realtime-txt2img)

事前準備

  • Node.jsのインストール

  • pnpmのインストール

    node -v
    pnpm -v
    

    image.png

デモの実行(realtime-txt2img)

README通りに実行

pip install -r requirements.txt
cd frontend
pnpm i
pnpm run build
cd ..
python main.py

↓実際のデモの画像
image.png

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2