(ctx: Context)
| 304 | |
| 305 | #[cfg(feature = "master")] |
| 306 | pub(crate) async fn run_master(ctx: Context) -> Result<()> { |
| 307 | use cake_core::cake::Master; |
| 308 | |
| 309 | // Image model dispatch — early return to avoid duplicating text arch arms |
| 310 | if ctx.args.model_type == ModelType::ImageModel { |
| 311 | return run_master_image(ctx).await; |
| 312 | } |
| 313 | |
| 314 | // Audio (TTS) model dispatch |
| 315 | if ctx.args.model_type == ModelType::AudioModel { |
| 316 | return run_master_audio(ctx).await; |
| 317 | } |
| 318 | |
| 319 | // LuxTTS: TTS model using TextModel dispatch for sharding |
| 320 | #[cfg(feature = "luxtts")] |
| 321 | if ctx.text_model_arch == TextModelArch::LuxTTS { |
| 322 | return run_master_luxtts(ctx).await; |
| 323 | } |
| 324 | |
| 325 | cake_core::dispatch_text_model!(ctx.text_model_arch, ctx, Master) |
| 326 | } |
| 327 | |
| 328 | #[cfg(feature = "master")] |
| 329 | async fn run_master_audio(ctx: Context) -> Result<()> { |
no test coverage detected