メインコンテンツへスキップ
見出し画像

text-generation-webui再起動手順

    Pythonの実行環境切り替え

    Macに「text-generation-webui」をインストールしました。
    一旦停止して、再起動しようと思ったのですが、その方法がわかりません。
    インストーラの「start_macos.sh」を動かして立ち上げ用の「http・・・」を手に入れることはできたのですが、毎回インストーラを動かすのは何か違う気がしました。
    半日ほど調べてわかりました。

    ターミナルを起動してPythonの実行環境の一覧を確認します。

    (base) xxxMacBook-Pro % conda info -e 
    # conda environments:
    #
                             /Users/xxx/Downloads/text-generation-webui-main/installer_files/conda
                             /Users/xxx/Downloads/text-generation-webui-main/installer_files/env
    base                  *  /opt/anaconda3

    デフォルトでは「Anaconda」を入れた時に作られた「(base)」の環境に入っています。
    「start_macos.sh」でインストールした際に、上の2つの環境が作られていました。
    (環境の名称が付いてなく「/Users/・・・/installer_files/conda」「/Users/・・・/installer_files/env」の2つ)

    python one_click.pyで起動

    実行環境を変更して「text-generation-webui」を起動します。

    (base) xxx@MacBook-Pro ~ % cd Downloads/text-generation-webui-main
    (base) xxx@MacBook-Pro text-generation-webui-main % conda activate installer_files/env
    (/Users/xxx/Downloads/text-generation-webui-main/installer_files/env) xxx@MacBook-Pro text-generation-webui-main % python one_click.py
    /Users/xxx/Downloads/text-generation-webui-main/installer_files/env/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
      warn("The installed version of bitsandbytes was compiled without GPU support. "
    'NoneType' object has no attribute 'cadam32bit_grad_fp32'
    2023-10-24 00:13:05 INFO:Loading the extension "gallery"...
    Running on local URL:  http://127.0.0.1:7860
    
    To create a public link, set `share=True` in `launch()`

    「Running on local URL」で指定されたURLをブラウザで開けば「text-generation-webui」が立ち上がります。
    ただ、メッセージをよく見ると

    "The installed version of bitsandbytes was compiled without GPU support. " 'NoneType' object has no attribute 'cadam32bit_grad_fp32'

    と、GPUが動いてないことがわかりました。
    調べてもわからず、調査中です。

    ※なお、上記で使っている「one_click.py」を実行すればよいとわかったのは、「start_macos.sh」をエディターを開き、その内容をChatGPTに質問したからです。

    あなたへのおすすめ