Git Product home page Git Product logo

Comments (4)

rsxdalv avatar rsxdalv commented on May 25, 2024 1

from tts-generation-webui.

xAIxxxxNAGI avatar xAIxxxxNAGI commented on May 25, 2024

I found out that RVC config is automatically set device="mps" if mps is available.
So that's why it shows logs as 没有发现支持的N卡, 使用MPS进行推理, then it caused mismatch of device setting.

I can make it work by adding this hard code here.

https://github.com/rsxdalv/tts-generation-webui/blob/main/src/rvc_tab/rvc_tab.py#L61

    if device == "cpu":  # Workaround for "slow_conv2d_cpu" not implemented for 'Half'
        config.is_half = is_half
        config.device = "cpu"

But I guess better solution is to enable mps for the device setting in UI, but I'm not sure if it is possible.

from tts-generation-webui.

rsxdalv avatar rsxdalv commented on May 25, 2024

I can add mps as an option, but I can't test if it will work outright. For now, here's the code to add it to the dropdown

["cuda:0", "cpu"], label="Device", value="cuda:0"

python

                        ["cuda:0", "cpu", "mps"], label="Device", value="cuda:0"

python

with gr.Group():
                gr.Markdown("### Hubert")
                with gr.Row():
                    device = gr.Dropdown(
                        ["cuda:0", "cpu", "mps"], label="Device", value="cuda:0"
                    )
                    is_half = gr.Checkbox(
                        label="Use half precision model (Depends on GPU support)",
                        value=False,
                    )
                    gr.Button(
                        value="Clear Hubert (to reload on next generation)",
                        variant="secondary",
                    ).click(
                        fn=lambda: inject_hubert(None)
                    )  # type: ignore

from tts-generation-webui.

xAIxxxxNAGI avatar xAIxxxxNAGI commented on May 25, 2024

Thanks! I tried to add the mps option in RVC section, and I got this error

NotImplementedError: The operator 'aten::_weight_norm_interface' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

It seems weight_norm_interface is not implemented yet in Pytorch, so looks like it is better to wait for the update.
I checked the thread here and found many votes for the implementation, so I hope it will be included soon.

pytorch/pytorch#77764

from tts-generation-webui.

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.