3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Stability MatrixでFooocus 2.5 のアップデートがエラーで停止することへの対策

Last updated at Posted at 2024-08-14

問題

Stability MatrixのPakagesのメニューからFooocusをアップデートしようとすると、以下のようにUnicodeDecodeErrorエラーをきっかけにアップデートが失敗する。

[System ARGV] ['C:\\Users\\user_name\\dev\\StabilityMatrix-win-x64\\Data\\Packages\\Fooocus\\launch.py']
Python 3.10.11 
Fooocus version: 2.5.5
Version mismatch for torchsde: Installed version 0.2.5 does not meet requirement torchsde==0.2.6
Installing requirements
Couldn't install requirements.
Command: "C:\Users\user_name\dev\StabilityMatrix-win-x64\Data\Packages\Fooocus\venv\Scripts\python.exe" -m pip install -r "requirements_versions.txt" --prefer-binary
Error code: 1
stdout: Collecting torchsde==0.2.6 (from -r requirements_versions.txt (line 1))
  Using cached torchsde-0.2.6-py3-none-any.whl.metadata (5.3 kB)
Collecting einops==0.8.0 (from -r requirements_versions.txt (line 2))
  Using cached einops-0.8.0-py3-none-any.whl.metadata (12 kB)
Collecting transformers==4.42.4 (from -r requirements_versions.txt (line 3))
  Using cached transformers-4.42.4-py3-none-any.whl.metadata (43 kB)
Collecting safetensors==0.4.3 (from -r requirements_versions.txt (line 4))
  Using cached safetensors-0.4.3-cp310-none-win_amd64.whl.metadata (3.9 kB)
Collecting accelerate==0.32.1 (from -r requirements_versions.txt (line 5))
  Using cached accelerate-0.32.1-py3-none-any.whl.metadata (18 kB)
Collecting pyyaml==6.0.1 (from -r requirements_versions.txt (line 6))
  Using cached PyYAML-6.0.1-cp310-cp310-win_amd64.whl.metadata (2.1 kB)
Collecting pillow==10.4.0 (from -r requirements_versions.txt (line 7))
  Using cached pillow-10.4.0-cp310-cp310-win_amd64.whl.metadata (9.3 kB)
Collecting scipy==1.14.0 (from -r requirements_versions.txt (line 8))
  Using cached scipy-1.14.0-cp310-cp310-win_amd64.whl.metadata (60 kB)
Collecting tqdm==4.66.4 (from -r requirements_versions.txt (line 9))
  Using cached tqdm-4.66.4-py3-none-any.whl.metadata (57 kB)
Collecting psutil==6.0.0 (from -r requirements_versions.txt (line 10))
  Using cached psutil-6.0.0-cp37-abi3-win_amd64.whl.metadata (22 kB)
Collecting pytorch_lightning==2.3.3 (from -r requirements_versions.txt (line 11))
  Using cached pytorch_lightning-2.3.3-py3-none-any.whl.metadata (21 kB)
Collecting omegaconf==2.3.0 (from -r requirements_versions.txt (line 12))
  Using cached omegaconf-2.3.0-py3-none-any.whl.metadata (3.9 kB)
Requirement already satisfied: gradio==3.41.2 in c:\users\user_name\dev\stabilitymatrix-win-x64\data\packages\fooocus\venv\lib\site-packages (from -r requirements_versions.txt (line 13)) (3.41.2)
Collecting pygit2==1.15.1 (from -r requirements_versions.txt (line 14))
  Using cached pygit2-1.15.1-cp310-cp310-win_amd64.whl.metadata (3.4 kB)
Collecting opencv-contrib-python-headless==4.10.0.84 (from -r requirements_versions.txt (line 15))
  Using cached opencv_contrib_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Collecting httpx==0.27.0 (from -r requirements_versions.txt (line 16))
  Using cached httpx-0.27.0-py3-none-any.whl.metadata (7.2 kB)
Collecting onnxruntime==1.18.1 (from -r requirements_versions.txt (line 17))
  Using cached onnxruntime-1.18.1-cp310-cp310-win_amd64.whl.metadata (4.5 kB)
Collecting timm==1.0.7 (from -r requirements_versions.txt (line 18))
  Using cached timm-1.0.7-py3-none-any.whl.metadata (47 kB)
Collecting numpy==1.26.4 (from -r requirements_versions.txt (line 19))
  Using cached numpy-1.26.4-cp310-cp310-win_amd64.whl.metadata (61 kB)
Collecting tokenizers==0.19.1 (from -r requirements_versions.txt (line 20))
  Using cached tokenizers-0.19.1-cp310-none-win_amd64.whl.metadata (6.9 kB)
Collecting packaging==24.1 (from -r requirements_versions.txt (line 21))
  Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting rembg==2.0.57 (from -r requirements_versions.txt (line 22))
  Using cached rembg-2.0.57-py3-none-any.whl.metadata (16 kB)
Collecting groundingdino-py==0.4.0 (from -r requirements_versions.txt (line 23))
  Using cached groundingdino-py-0.4.0.tar.gz (82 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user_name\AppData\Local\Temp\pip-install-b_yy_ce3\groundingdino-py_6137879ec54a46d8916256901930af64\setup.py", line 41, in <module>
          readme = readme_file.read()
      UnicodeDecodeError: 'cp932' codec can't decode byte 0x97 in position 2879: illegal multibyte sequence
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

CMD Failed requirements: install -r "requirements_versions.txt"
[Cleanup] Attempting to delete content of temp dir C:\Users\user_name\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful
Set vram state to: NORMAL_VRAM
Always offload VRAM
VAE dtype: torch.bfloat16
Traceback (most recent call last):
  File "C:\Users\user_name\dev\StabilityMatrix-win-x64\Data\Packages\Fooocus\launch.py", line 152, in <module>
    from webui import *
  File "C:\Users\user_name\dev\StabilityMatrix-win-x64\Data\Packages\Fooocus\webui.py", line 10, in <module>
    import modules.async_worker as worker
  File "C:\Users\user_name\dev\StabilityMatrix-win-x64\Data\Packages\Fooocus\modules\async_worker.py", line 3, in <module>
    from extras.inpaint_mask import generate_mask_from_image, SAMOptions
  File "C:\Users\user_name\dev\StabilityMatrix-win-x64\Data\Packages\Fooocus\extras\inpaint_mask.py", line 6, in <module>
    from extras.GroundingDINO.util.inference import default_groundingdino
  File "C:\Users\user_name\dev\StabilityMatrix-win-x64\Data\Packages\Fooocus\extras\GroundingDINO\util\inference.py", line 9, in <module>
    import supervision as sv
ModuleNotFoundError: No module named 'supervision'

環境

Windows11

解決方法

システムロケールの設定で、「ワールドワイド言語サポートでUnicode UTF-8を使用」を有効にする。
※コントロールパネル → 日付、時刻、数値形式の変更 → 管理 → システムロケールの変更 に設定がある。スクリーンショット 2024-08-14 222801.png

3
0
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?