Git Product home page Git Product logo

Comments (5)

glucauze avatar glucauze commented on August 25, 2024

Hmm, maybe there's a problem with the providers. That's surprising because I didn't change that part. In this file: https://github.com/glucauze/sd-webui-faceswaplab/blob/main/scripts/faceswaplab_swapping/swapper.py

The providers are set to ["CPUExecutionProvider"], and these are the versions being used.

Unfortunately, I don't have a Mac to test it on.

You could try looking at the dependencies in roop to see if anything makes more sense.

From what I see:

onnxruntime==1.15.1; python_version != '3.9' and sys_platform == 'darwin' and platform_machine != 'arm64'
onnxruntime-coreml==1.13.1; python_version == '3.9' and sys_platform == 'darwin' and platform_machine != 'arm64'
onnxruntime-silicon==1.13.1; sys_platform == 'darwin' and platform_machine == 'arm64'

These could be necessary on a Mac.

If you manage to get it working, I will modify the code accordingly.

from sd-webui-faceswaplab.

mesax1 avatar mesax1 commented on August 25, 2024

Thanks!
I tried that too, installed some of them that were apparently missing, but I'm still getting the same error :(

from sd-webui-faceswaplab.

glucauze avatar glucauze commented on August 25, 2024

Could you try to do that :

@lru_cache(maxsize=1)
def getFaceSwapModel(model_path: str) -> upscaled_inswapper.UpscaledINSwapper:
    """
    Retrieves the face swap model and initializes it if necessary.

    Args:
        model_path (str): Path to the face swap model.

    Returns:
        insightface.model_zoo.FaceModel: The face swap model.
    """
    try:
        # Initializes the face swap model using the specified model path.
        return upscaled_inswapper.UpscaledINSwapper(
            insightface.model_zoo.get_model(model_path, providers=providers)
        )
    except Exception as e:
        logger.error(
            "Loading of swapping model failed, please check the requirements (On Windows, download and install Visual Studio. During the install, make sure to include the Python and C++ packages.)"
        )
        import traceback
        traceback.print_exc()
        raise FaceModelException("Loading of swapping model failed")

I was stupid enough not to print the complete exception i need to investigate more.

Since it comes from the inswapper model and the analyzer seems to load, you'll have to check that the model isn't corrupted. On my computer, i have that :

sha1sum inswapper_128.onnx 
17a64851eaefd55ea597ee41e5c18409754244c5  inswapper_128.onnx
 sha256sum inswapper_128.onnx 
e4a3f08c753cb72d04e10aa0f7dbe3deebbf39567d4ead6dce08e98aa49e16af  inswapper_128.onnx
sha512sum inswapper_128.onnx 
4311f4ccd9da58ec544e912b32ac0cba95f5ab4b1a06ac367efd3e157396efbae1097f624f10e77dd811fbba0917fa7c96e73de44563aa6099e5f46830965069  inswapper_128.onnx

from sd-webui-faceswaplab.

mesax1 avatar mesax1 commented on August 25, 2024

Maybe the model inswapper_128.onnx was corrupted.
I deleted it, downloaded it again, and now it works!
Thanks!

from sd-webui-faceswaplab.

glucauze avatar glucauze commented on August 25, 2024

Well, better that than something hard to fix. I've added a control and a warning in version 1.2. I still have a lot of things to test and correct before publishing it.

from sd-webui-faceswaplab.

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.