Skip to content

Commit df1f548

Browse files
authored
Merge branch 'main' into main
2 parents 428990b + 5560b85 commit df1f548

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,17 @@ infer = loaded_model.signatures["serving_default"]
226226
print(infer(inputs=tf.constant([input_tensor])))`,
227227
];
228228

229+
export const dia = (model: ModelData): string[] => [
230+
`import soundfile as sf
231+
from dia.model import Dia
232+
233+
model = Dia.from_pretrained("${model.id}")
234+
text = "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face."
235+
output = model.generate(text)
236+
237+
sf.write("simple.mp3", output, 44100)`,
238+
];
239+
229240
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
230241

231242
const diffusers_default = (model: ModelData) => [

packages/tasks/src/model-libraries.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
230230
filter: false,
231231
countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`,
232232
},
233+
dia: {
234+
prettyLabel: "Dia",
235+
repoName: "Dia",
236+
repoUrl: "https://github.com/nari-labs/dia",
237+
snippets: snippets.dia,
238+
filter: false,
239+
},
233240
diffree: {
234241
prettyLabel: "Diffree",
235242
repoName: "Diffree",

0 commit comments

Comments
 (0)