Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,24 @@ export const voicecraft = (model: ModelData): string[] => [
model = VoiceCraft.from_pretrained("${model.id}")`,
];

export const vui = (model: ModelData): string[] => [
`# !pip install git+https://github.com/fluxions-ai/vui

import torchaudio

from vui.inference import render
from vui.model import Vui,

model = Vui.from_pretrained().cuda()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typically here if repo is split in several models, we could have a better .from_pretrained snippet. Requires some slight changes in the GH repo as well but worth it IMO

waveform = render(
model,
"Hey, here is some random stuff, usually something quite long as the shorter the text the less likely the model can cope!",
)
print(waveform.shape)
torchaudio.save("out.opus", waveform[0], 22050)
`,
];

export const chattts = (): string[] => [
`import ChatTTS
import torchaudio
Expand Down
7 changes: 7 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
docsUrl: "https://github.com/jasonppy/VoiceCraft",
snippets: snippets.voicecraft,
},
vui: {
prettyLabel: "Vui",
repoName: "Vui",
repoUrl: "https://github.com/vui-ai/vui",
countDownloads: `path_extension:"pt"`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be really good to nudge them to split their repo into several ones (better to track downloads on individual models).

(highly recommended but not an obligation)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i am pushing for it!

snippets: snippets.vui,
},
wham: {
prettyLabel: "WHAM",
repoName: "wham",
Expand Down
Loading