Switch to burn 0.9.0 to gain fast model io without the need for a custom recorder

This commit is contained in:
Gadersd
2023-08-06 19:44:13 -04:00
parent 1d1272b91f
commit c24d37df00
5 changed files with 10 additions and 97 deletions

View File

@@ -22,11 +22,10 @@ use std::env;
use std::io;
use std::process;
use burn::record::{self, Recorder, FullPrecisionSettings};
use stablediffusion::binrecorderfast::{BinFileRecorderBuffered};
use burn::record::{self, Recorder, BinFileRecorder, FullPrecisionSettings};
fn load_stable_diffusion_model_file<B: Backend>(filename: &str) -> Result<StableDiffusion<B>, record::RecorderError> {
BinFileRecorderBuffered::<FullPrecisionSettings>::new()
BinFileRecorder::<FullPrecisionSettings>::new()
.load(filename.into())
.map(|record| StableDiffusionConfig::new().init().load_record(record))
}