Skip to content

Commit

Permalink
Merge more changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Dec 11, 2024
1 parent c3fa343 commit 0b9f272
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions rust/moshi-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ vergen = { version = "8.3.1", features = ["build", "cargo", "git", "gitcl", "rus
default = []
cuda = ["moshi/cuda", "candle/cuda", "candle-nn/cuda", "candle-transformers/cuda"]
metal = ["moshi/metal", "candle/metal", "candle-nn/metal", "candle-transformers/metal"]

[profile.release]
debug = true

[profile.release-no-debug]
inherits = "release"
debug = false

4 changes: 2 additions & 2 deletions rust/moshi-backend/src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ pub async fn run(args: &crate::BenchmarkArgs, config: &Config) -> Result<()> {
tokio::time::sleep_until(target_time).await;
in_pcm_tx.send(zeros.to_vec())?;
}
let _ = task.await;
let _ = w.await;
task.await?;
w.await??;
}
}
Ok(())
Expand Down
3 changes: 3 additions & 0 deletions rust/moshi-backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub struct BenchmarkArgs {
#[clap(long)]
chrome_tracing: bool,

#[clap(long)]
asr: bool,

#[clap(long)]
mimi_only: bool,
}
Expand Down
2 changes: 1 addition & 1 deletion rust/moshi-backend/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl stream_both::AppStateInner {
let codes = mimi_model.encode_step(&fake_pcm.into())?;
let ys = mimi_model.decode_step(&codes)?;
if ys.as_option().is_none() {
anyhow::bail!("Expected mimi to output some stuff, but nothing came out.");
anyhow::bail!("Expected Mimi to output some stuff, but nothing came out.");
}
device.synchronize()?;
tracing::info!("model is ready to roll!");
Expand Down
1 change: 1 addition & 0 deletions rust/moshi-backend/src/stream_both.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use std::sync::Arc;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Config {
pub instance_name: String,
#[serde(default)]
pub hf_repo: String,
pub lm_model_file: String,
pub log_dir: String,
Expand Down

0 comments on commit 0b9f272

Please sign in to comment.