dchatel / vid-faceswap

32 stars 3 forks source link

ModuleNotFoundError: No module named 'imageio_ffmpeg' while runinng webui-user #1

Open boaz8025 opened 1 year ago

boaz8025 commented 1 year ago

Hi,

I have tried to fix this issue for the last hour with no success.

I am getting an error ModuleNotFoundError: No module named 'imageio_ffmpeg' even though ffmpeg, imageio, imageio-ffmpeg are installed, I made sure that PATH is configured correctly.

I tried to reinstall stable diffusion to a different drive.

Python 3.10.9

The help is greatly appreciated!


Installing requirements
hello from vidfaceswap
Installing requirements for face detection using GPU

Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Error loading script: vid_faceswap.py
Traceback (most recent call last):
  File "D:\sd-test\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "D:\sd-test\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\sd-test\stable-diffusion-webui\extensions\vid-faceswap\scripts\vid_faceswap.py", line 20, in <module>
    from scripts.video import video_reader, video_writer
  File "D:\sd-test\stable-diffusion-webui\extensions\vid-faceswap\scripts\video.py", line 5, in <module>
    from moviepy.editor import VideoFileClip, AudioFileClip, ImageSequenceClip
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\editor.py", line 22, in <module>
    from .video.io.VideoFileClip import VideoFileClip
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module>
    from moviepy.video.VideoClip import VideoClip
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\video\VideoClip.py", line 21, in <module>
    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 11, in <module>
    from moviepy.config import get_setting
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\config.py", line 34, in <module>
    from imageio.plugins.ffmpeg import get_exe
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\imageio\plugins\ffmpeg.py", line 143, in <module>
    import imageio_ffmpeg
ModuleNotFoundError: No module named 'imageio_ffmpeg'

Error loading script: video.py
Traceback (most recent call last):
  File "D:\sd-test\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "D:\sd-test\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\sd-test\stable-diffusion-webui\extensions\vid-faceswap\scripts\video.py", line 5, in <module>
    from moviepy.editor import VideoFileClip, AudioFileClip, ImageSequenceClip
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\editor.py", line 22, in <module>
    from .video.io.VideoFileClip import VideoFileClip
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module>
    from moviepy.video.VideoClip import VideoClip
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\video\VideoClip.py", line 21, in <module>
    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 11, in <module>
    from moviepy.config import get_setting
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\moviepy\config.py", line 34, in <module>
    from imageio.plugins.ffmpeg import get_exe
  File "D:\sd-test\stable-diffusion-webui\venv\lib\site-packages\imageio\plugins\ffmpeg.py", line 143, in <module>
    import imageio_ffmpeg
ModuleNotFoundError: No module named 'imageio_ffmpeg'
dchatel commented 1 year ago

Which version of moviepy are you using ? I think you can try to update your version with this:

pip install --upgrade git+git://github.com/Zulko/moviepy
boaz8025 commented 1 year ago

Hi,

I was able to fix it by going to the stable diffusion folder, activating the virtual environment:

venv\Scripts\activate

And then installing imageio-ffmpeg: pip install imageio-ffmpeg

Now I have the extension tab, But when I try and use the faceswap I get another error:

Traceback (most recent call last): File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api result = await self.call_function( File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\SD\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\SD\stable-diffusion-webui\extensions\vid-faceswap\scripts\vid_faceswap.py", line 64, in process_video detectmap = shared.opts.control_net_no_detectmap File "C:\SD\stable-diffusion-webui\modules\shared.py", line 467, in getattr return super(Options, self).getattribute(item) AttributeError: 'Options' object has no attribute 'control_net_no_detectmap'

Do you know how to fix this?

Thanks.

dchatel commented 1 year ago

Do you have controlnet extension installed and updated?