ModuleNotFoundError:没有名为“imageio.v3”的模块

问题描述 投票:0回答:1

简单介绍

我正在向 Stable Diffusion 添加一个名为 animatediff 的扩展,结果就像标题所说的那样是错误。

这是完整的错误代码:

*** Error loading script: animatediff_output.py
    Traceback (most recent call last):
      File "I:\Github\stable-diffusion-webui-master\modules\scripts.py", line 382, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "I:\Github\stable-diffusion-webui-master\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 940, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "I:\Github\stable-diffusion-webui-master\extensions\sd-webui-animatediff\scripts\animatediff_output.py", line 5, in <module>
        import imageio.v3 as imageio
    ModuleNotFoundError: No module named 'imageio.v3'

顺便说一句,我在 conda 中做了这个,并且我已经重新安装了 imageio 和相关模块好几次,如下所示:

pip install openpiv --upgrade --force-reinstall

conda install -c conda-forge imageio

pip install imageio
pip install imageio[ffmpeg]
pip install imageio[pyav]

另外,我用python导入

imageio
imageio.v3
也没有报错:

(sdwebui) I:\Github\stable-diffusion-webui-master> python
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:30:19) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import imageio
>>> import imageio.v3 as imageio
>>> import nosuchmodule
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'nosuchmodule'

这是我的稳定扩散版本:

•  version: 1.6.0  
•  python: 3.11.4  
•  torch: 2.0.1+cu118  
•  xformers: 0.0.20  
•  gradio: 3.41.2  
•  checkpoint: 31e35c80fc

所以我真的不知道环境出了什么问题...

python conda stable-diffusion python-imageio
1个回答
0
投票

我认为这是一个功能问题,因为我刚刚使用了 pip install imageio,但它仍然抛出错误我正在使用最新的 1.7 版本的 A1111,并且在我安装名为 text2vid 的扩展并现在卸载它之前一切正常。 ..并且在加载animatediff时抛出此错误...但是当我通过pip安装到python时,venv和python环境应该是相同的。我使用 GitBash 来执行此操作,然后从那里 pip install imageio .. 一切安装都很好,但这里仍然存在问题... 这就是问题,我们不知道如何安装来说明 python 的不同环境地洞。首先作为一个问题:当使用 python 时,说 3.10.6 a1111 用作它的母舰?我从提示符处安装: pip install imageio <--- Where is this installing to? The system or to the venv on A1111's directory? Virtual environment on a1111 directory points to use System directory python 3.10.6 etc... but is there another VENV in that directory that is ignored by a1111 and I need to install pip install imageio with a directory arg? like pip install imageio C:\A1111\venv ???? This is very confusing stuff.. I am a user of the program, not a programmer so please excuse my not understanding why these errors are constant. P.S. I set my user launch bat to update and upgrade on each start and my system is SDXL working. Just need a little guidance here and very appreciative of any actual productive pointers to help me understand how this is working? No hate okay!

© www.soinside.com 2019 - 2024. All rights reserved.