Skip to content

Commit

Permalink
Default to avoid the faster cuda kernels.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Sep 26, 2024
1 parent fd3b53f commit 3aaea4f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions candle-examples/examples/flux/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ struct Args {

#[arg(long, value_enum, default_value = "schnell")]
model: Model,

/// Use the faster kernels which are buggy at the moment.
#[arg(long)]
no_dmmv: bool,
}

#[derive(Debug, Clone, Copy, clap::ValueEnum, PartialEq, Eq)]
Expand All @@ -65,6 +69,7 @@ fn run(args: Args) -> Result<()> {
decode_only,
model,
quantized,
..
} = args;
let width = width.unwrap_or(1360);
let height = height.unwrap_or(768);
Expand Down Expand Up @@ -244,5 +249,7 @@ fn run(args: Args) -> Result<()> {

fn main() -> Result<()> {
let args = Args::parse();
#[cfg(feature = "cuda")]
candle::quantized::cuda::set_force_dmmv(!args.no_dmmv);
run(args)
}

0 comments on commit 3aaea4f

Please sign in to comment.