Git Product home page Git Product logo

Comments (7)

tam9life avatar tam9life commented on July 28, 2024 1

To apply

  1. webUI/ Extensions/ Available/ 'Batch Face Swap' install

add mediapipe==0.9.1.0 to the bottom of \stable-diffusion-webui\requirements_versions.txt
or
pip install mediapipe

  1. restart

from batch-face-swap.

danielraffel avatar danielraffel commented on July 28, 2024 1

thanks! while I tried that I still don't see it appearing in scripts under the img2img tab. i am getting these messages in terminal

Restarting UI...
Error loading script: batch_face_swap.py
Traceback (most recent call last):
File "/Users/username/stable-diffusion-webui/modules/scripts.py", line 229, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/Users/username/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/username/stable-diffusion-webui/extensions/batch-face-swap/scripts/batch_face_swap.py", line 8, in
from bfs_utils import *
File "/Users/username/stable-diffusion-webui/extensions/batch-face-swap/scripts/bfs_utils.py", line 6, in
import mediapipe as mp
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/init.py", line 16, in
import mediapipe.python.solutions as solutions
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/init.py", line 17, in
import mediapipe.python.solutions.drawing_styles
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_utils.py", line 24, in
from mediapipe.framework.formats import detection_pb2
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/framework/formats/detection_pb2.py", line 5, in
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/google/protobuf/internal/init.py)

Error loading script: bfs_utils.py
Traceback (most recent call last):
File "/Users/username/stable-diffusion-webui/modules/scripts.py", line 229, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/Users/username/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/username/stable-diffusion-webui/extensions/batch-face-swap/scripts/bfs_utils.py", line 6, in
import mediapipe as mp
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/init.py", line 16, in
import mediapipe.python.solutions as solutions
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/init.py", line 17, in
import mediapipe.python.solutions.drawing_styles
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_utils.py", line 24, in
from mediapipe.framework.formats import detection_pb2
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/framework/formats/detection_pb2.py", line 5, in
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/google/protobuf/internal/init.py)

Error loading script: face_detect.py
Traceback (most recent call last):
File "/Users/username/stable-diffusion-webui/modules/scripts.py", line 229, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/Users/username/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/username/stable-diffusion-webui/extensions/batch-face-swap/scripts/face_detect.py", line 8, in
import mediapipe as mp
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/init.py", line 16, in
import mediapipe.python.solutions as solutions
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/init.py", line 17, in
import mediapipe.python.solutions.drawing_styles
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_utils.py", line 24, in
from mediapipe.framework.formats import detection_pb2
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/framework/formats/detection_pb2.py", line 5, in
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/google/protobuf/internal/init.py)

SD-Webui API layer loaded
Running on local URL: http://127.0.0.1:7861

from batch-face-swap.

2blackbar avatar 2blackbar commented on July 28, 2024

yes it oesnt show locally too, its installation process is not foolproof, i guess it failed here

ok you need to add mediapipe to requirements or pip it

from batch-face-swap.

nothings avatar nothings commented on July 28, 2024

Yeah, I had to pip install mediapipe when I installed. What do you mean by "add mediapipe to requirements"? There's an install.py to install it, and AFTER mediapipe is installed it runs that and prints "requirements for Batch Face Swap", but for us I think it doesn't even get that far if mediapipe isn't already installed (I don't remember the exact details, it was a while ago).

So I'm not really clear how it's supposed to work correctly.

from batch-face-swap.

revolverocelot1 avatar revolverocelot1 commented on July 28, 2024

same, hope creator can fix it.

from batch-face-swap.

danielraffel avatar danielraffel commented on July 28, 2024

similar issue here in automatic1111 on macOS - see the following output in terminal

Error loading script: face_detect.py
Traceback (most recent call last):
File "/Users/username/stable-diffusion-webui/modules/scripts.py", line 229, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "/Users/username/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/username/stable-diffusion-webui/extensions/batch-face-swap/scripts/face_detect.py", line 8, in
import mediapipe as mp
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/init.py", line 16, in
import mediapipe.python.solutions as solutions
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/init.py", line 17, in
import mediapipe.python.solutions.drawing_styles
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/python/solutions/drawing_utils.py", line 24, in
from mediapipe.framework.formats import detection_pb2
File "/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/mediapipe/framework/formats/detection_pb2.py", line 5, in
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/Users/username/stable-diffusion-webui/venv/lib/python3.10/site-packages/google/protobuf/internal/init.py)

from batch-face-swap.

kex0 avatar kex0 commented on July 28, 2024

please open another issue if you still have this problem

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.