Skip to content

Commit

Permalink
Fix FLUX.1 weights (huggingface#2457)
Browse files Browse the repository at this point in the history
* fix FLUX.1 weights

* added flux1-dev.safetensors
  • Loading branch information
eugenehp authored Aug 29, 2024
1 parent 86613c0 commit c02b7c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions candle-examples/examples/flux/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ fn run(args: Args) -> Result<()> {
println!("CLIP\n{clip_emb}");
let img = {
let model_file = match model {
Model::Schnell => bf_repo.get("flux1-schnell.sft")?,
Model::Dev => bf_repo.get("flux1-dev.sft")?,
Model::Schnell => bf_repo.get("flux1-schnell.safetensors")?,
Model::Dev => bf_repo.get("flux1-dev.safetensors")?,
};
let vb =
unsafe { VarBuilder::from_mmaped_safetensors(&[model_file], dtype, &device)? };
Expand Down Expand Up @@ -189,7 +189,7 @@ fn run(args: Args) -> Result<()> {
println!("latent img\n{img}");

let img = {
let model_file = bf_repo.get("ae.sft")?;
let model_file = bf_repo.get("ae.safetensors")?;
let vb = unsafe { VarBuilder::from_mmaped_safetensors(&[model_file], dtype, &device)? };
let cfg = match model {
Model::Dev => flux::autoencoder::Config::dev(),
Expand Down

0 comments on commit c02b7c3

Please sign in to comment.