| 620 | |
| 621 | #[cfg(feature = "master")] |
| 622 | async fn run_master_image(ctx: Context) -> Result<()> { |
| 623 | use cake_core::cake::Master; |
| 624 | |
| 625 | match ctx.args.image_model_arch { |
| 626 | ImageModelArch::SD => { |
| 627 | Master::<cake_core::models::sd::SD>::new(ctx).await?.run().await |
| 628 | } |
| 629 | #[cfg(feature = "flux")] |
| 630 | ImageModelArch::Flux => { |
| 631 | Master::<cake_core::models::flux::FluxGen>::new(ctx).await?.run().await |
| 632 | } |
| 633 | #[cfg(feature = "flux")] |
| 634 | ImageModelArch::Flux1 => { |
| 635 | Master::<cake_core::models::flux::Flux1Gen>::new(ctx).await?.run().await |
| 636 | } |
| 637 | #[allow(unreachable_patterns)] |
| 638 | _ => anyhow::bail!( |
| 639 | "no image model feature enabled for architecture {:?}", |
| 640 | ctx.args.image_model_arch |
| 641 | ), |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | #[cfg(not(feature = "master"))] |
| 646 | async fn run_master(_ctx: Context) -> Result<()> { |