Main diffusion loop for the SD example. (#332)

This commit is contained in:
Laurent Mazare
2023-08-06 22:39:53 +02:00
committed by GitHub
parent 166bfd5847
commit 141df4ad2b
3 changed files with 242 additions and 8 deletions

View File

@ -100,8 +100,8 @@ impl DDIMScheduler {
/// Ensures interchangeability with schedulers that need to scale the denoising model input
/// depending on the current timestep.
pub fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Tensor {
sample
pub fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Result<Tensor> {
Ok(sample)
}
/// Performs a backward step during inference.