AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
135.73k stars 25.91k forks source link

[Bug]: Error on RX7600 #13343

Open Boom-Hacker opened 9 months ago

Boom-Hacker commented 9 months ago

Is there an existing issue for this?

What happened?

stable diffusion is crashed

Steps to reproduce the problem

  1. install rocm 5.5 in ubuntu 22.04.3
  2. install pytoch2.2 dev with rocm 5.5
  3. start sd webui

What should have happened?

Traceback (most recent call last): File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 684, in _get_module return importlib.import_module("." + module_name, self.name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1149, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 20, in from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer ImportError: cannot import name 'CLIPImageProcessor' from 'transformers' (/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/transformers/init.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/beforespace/RX7600/sd/test.py", line 2, in from diffusers import StableDiffusionPipeline File "", line 1231, in _handle_fromlist File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 675, in getattr value = getattr(module, name) ^^^^^^^^^^^^^^^^^^^^^ File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 675, in getattr value = getattr(module, name) ^^^^^^^^^^^^^^^^^^^^^ File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 674, in getattr module = self._get_module(self._class_to_module[name]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 686, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion because of the following error (look up to see its traceback): cannot import name 'CLIPImageProcessor' from 'transformers' (/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/transformers/init.py)

Sysinfo

no generate

What browsers do you use to access the UI ?

Mozilla Firefox

Console logs

Traceback (most recent call last):
  File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 684, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 20, in <module>
    from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
ImportError: cannot import name 'CLIPImageProcessor' from 'transformers' (/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/transformers/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/beforespace/RX7600/sd/test.py", line 2, in <module>
    from diffusers import StableDiffusionPipeline
  File "<frozen importlib._bootstrap>", line 1231, in _handle_fromlist
  File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 675, in __getattr__
    value = getattr(module, name)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 675, in __getattr__
    value = getattr(module, name)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 674, in __getattr__
    module = self._get_module(self._class_to_module[name])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/diffusers/utils/import_utils.py", line 686, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion because of the following error (look up to see its traceback):
cannot import name 'CLIPImageProcessor' from 'transformers' (/home/beforespace/RX7600/sd/venv/lib/python3.11/site-packages/transformers/__init__.py)

Additional information

no other

Tobi823 commented 9 months ago

Looks like you are using Python 3.11. This is too new and you should use Python 3.10.

nktice commented 9 months ago

I had challenges getting everything working on AMD cards - So I wrote this guide that's all the steps to install that has worked for me... https://github.com/nktice/AMD-AI