Giter Site home page Giter Site logo

Comments (13)

Riken-Shah avatar Riken-Shah commented on August 21, 2024 2

@SorenTruelsen,
I was able to make it work on Google Colab, by manually reinstalling mediapipe,

!pip uninstall mediapipe -y 
!pip install mediapipe --user

from batch-face-swap.

urbanyeti avatar urbanyeti commented on August 21, 2024 1

I was having the same issue on windows. Your steps lead me to getting it to work. I needed to update the requirement_versions.txt file in the base folder of stable-diffusion-webui (same folder where webui-user.bat is) with a new line that just says mediapipe. After doing this I needed to quit the application and relaunch it and it seemed to work.

from batch-face-swap.

abvgdeabvgde2 avatar abvgdeabvgde2 commented on August 21, 2024 1

I'm having trouble getting it to work in Colab. A few months ago It was working perfectly. But now it throws an error even after pip install mediapipe or after putting it in reqs txt. Did someone find a solution for Colab?
ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'

from batch-face-swap.

SorenTruelsen avatar SorenTruelsen commented on August 21, 2024 1

I have had this problem a month or so now. No idea how to fix it. Tried to fiddle with the requirements, but couldn't get it to work. It really is a shame, this is by far my favorite extension.

Here is the full error code (COLAB+) as well as the build:

Error loading script: batch_face_swap.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/batch-face-swap/scripts/batch_face_swap.py", line 8, in
from bfs_utils import *
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/batch-face-swap/scripts/bfs_utils.py", line 11, in
import mediapipe as mp
File "/usr/local/lib/python3.9/dist-packages/mediapipe/init.py", line 15, in
from mediapipe.python import *
File "/usr/local/lib/python3.9/dist-packages/mediapipe/python/init.py", line 17, in
from mediapipe.python._framework_bindings import resource_util
ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'

Error loading script: bfs_utils.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/batch-face-swap/scripts/bfs_utils.py", line 11, in
import mediapipe as mp
File "/usr/local/lib/python3.9/dist-packages/mediapipe/init.py", line 15, in
from mediapipe.python import *
File "/usr/local/lib/python3.9/dist-packages/mediapipe/python/init.py", line 17, in
from mediapipe.python._framework_bindings import resource_util
ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'

Error loading script: face_detect.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/batch-face-swap/scripts/face_detect.py", line 8, in
import mediapipe as mp
File "/usr/local/lib/python3.9/dist-packages/mediapipe/init.py", line 15, in
from mediapipe.python import *
File "/usr/local/lib/python3.9/dist-packages/mediapipe/python/init.py", line 17, in
from mediapipe.python._framework_bindings import resource_util
ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'

image

from batch-face-swap.

SorenTruelsen avatar SorenTruelsen commented on August 21, 2024 1

@Riken-Shah YOU'RE THE MAN!!!!

image

It starts now without problems

from batch-face-swap.

ride5k avatar ride5k commented on August 21, 2024

also attempted manual method, when attempting step:
"Open requirements_versions.txt and add mediapipe."
could not find any txt file of that name.

from batch-face-swap.

rubberbaron avatar rubberbaron commented on August 21, 2024

I updated the manual install instructions to indicate where the requirement_versions.txt file is. I don't know why the automatic install doesn't work though.

from batch-face-swap.

ride5k avatar ride5k commented on August 21, 2024

editing the requirements_version.txt solved the issue for me.

from batch-face-swap.

mrgamezy avatar mrgamezy commented on August 21, 2024

Adding to the requirements worked here too.

from batch-face-swap.

SorenTruelsen avatar SorenTruelsen commented on August 21, 2024

Tried with a fresh gmail + COLAB account and only installed this Addon. Still got the "ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'" error. Guess it will take some digging into the code the see what's wrong .. shit .. havent programmed in 5 years and never even seen Python before, so I might stop before I even start :)

from batch-face-swap.

kex0 avatar kex0 commented on August 21, 2024

Tried with a fresh gmail + COLAB account and only installed this Addon. Still got the "ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'" error. Guess it will take some digging into the code the see what's wrong .. shit .. havent programmed in 5 years and never even seen Python before, so I might stop before I even start :)

If putting mediapipe in requirements_versions.txt (not requirements.txt) doesn't work then really have no idea what could be the issue.

from batch-face-swap.

kex0 avatar kex0 commented on August 21, 2024

msedge_OMHEpYPmpo
msedge_u8kkGo6wtR

from batch-face-swap.

SorenTruelsen avatar SorenTruelsen commented on August 21, 2024

Tried with a fresh gmail + COLAB account and only installed this Addon. Still got the "ModuleNotFoundError: No module named 'mediapipe.python._framework_bindings'" error. Guess it will take some digging into the code the see what's wrong .. shit .. havent programmed in 5 years and never even seen Python before, so I might stop before I even start :)

If putting mediapipe in requirements_versions.txt (not requirements.txt) doesn't work then really have no idea what could be the issue.

Thanks for responding. I'll see if I will have the energy to look into the issue.

One thing I have found is that "requirements_versions.txt" gets overwritten by Automatic1111 all the time, so it makes a bit harder to debug. And running it on COLAB also makes it complicated, since I cant really use an IDE to test shit.

Still ... if it works for the rest of you, it must be a "local" issue.

from batch-face-swap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.