Giter VIP home page Giter VIP logo

Comments (4)

kyakuno avatar kyakuno commented on September 27, 2024 1

@ooe1123 昔のPRの整理の後に、こちらを検討いただけると嬉しいです _ _

from ailia-models.

prettypanghu avatar prettypanghu commented on September 27, 2024

https://github.com/RVC-Boss/GPT-SoVITS/wiki/

from ailia-models.

kyakuno avatar kyakuno commented on September 27, 2024

GPT-SOVITSのV1をONNXに変換した際に書き換えたコードは下記。
RVC-Boss/GPT-SoVITS#835

from ailia-models.

ooe1123 avatar ooe1123 commented on September 27, 2024

Export speed parameter

〇 GPT_SoVITS\module\models_onnx.py

class TextEncoder(nn.Module):
    ...
    def forward(self, y, text, ge):
        ...
        y = self.encoder2(y * y_mask, y_mask)

class TextEncoder(nn.Module):
    ...
    def forward(self, y, text, ge, speed):
        ...
        y = self.encoder2(y * y_mask, y_mask)

        if torch.onnx.is_in_onnx_export():
            a = torch.cat([
                ((y.shape[-1] / speed).long()+1).unsqueeze(0),
                y.shape[-1].unsqueeze(0)
            ], dim=0)
            size = a[(speed == torch.tensor(1.0)).long()]
            y = F.interpolate(y, size=size, mode="linear")
            y_mask = F.interpolate(y_mask, size=y.shape[-1], mode="nearest")
        else:
            if(speed!=1):
                y = F.interpolate(y, size=int(y.shape[-1] / speed)+1, mode="linear")
                y_mask = F.interpolate(y_mask, size=y.shape[-1], mode="nearest")

from ailia-models.

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.