summaryrefslogtreecommitdiff
path: root/candle-transformers/src/models/stable_diffusion/schedulers.rs
diff options
context:
space:
mode:
authorNick Senger <dev@nsenger.com>2025-01-01 12:34:17 -0800
committerGitHub <noreply@github.com>2025-01-01 21:34:17 +0100
commitcbaa0ad46f0eda2f3d9bcf8a42d6271e6760e578 (patch)
treef8a899e47e907bcf79f877e0cb307d2b5d57db1f /candle-transformers/src/models/stable_diffusion/schedulers.rs
parentb12c7c2888c49e7f133bb2dc29f8fdbb04a37e10 (diff)
downloadcandle-cbaa0ad46f0eda2f3d9bcf8a42d6271e6760e578.tar.gz
candle-cbaa0ad46f0eda2f3d9bcf8a42d6271e6760e578.tar.bz2
candle-cbaa0ad46f0eda2f3d9bcf8a42d6271e6760e578.zip
UniPC for diffusion sampling (#2684)
* feat: Add unipc multistep scheduler * chore: Clippy and formatting * chore: Update comments * chore: Avoid unsafety in float ordering * refactor: Update Scheduler::step mutability requirements * fix: Corrector img2img * chore: Update unipc ref link to latest diffusers release * chore: Deduplicate float ordering * fix: Panic when running with dev profile
Diffstat (limited to 'candle-transformers/src/models/stable_diffusion/schedulers.rs')
-rw-r--r--candle-transformers/src/models/stable_diffusion/schedulers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-transformers/src/models/stable_diffusion/schedulers.rs b/candle-transformers/src/models/stable_diffusion/schedulers.rs
index 1d39037f..1ce94ca2 100644
--- a/candle-transformers/src/models/stable_diffusion/schedulers.rs
+++ b/candle-transformers/src/models/stable_diffusion/schedulers.rs
@@ -19,7 +19,7 @@ pub trait Scheduler {
fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Result<Tensor>;
- fn step(&self, model_output: &Tensor, timestep: usize, sample: &Tensor) -> Result<Tensor>;
+ fn step(&mut self, model_output: &Tensor, timestep: usize, sample: &Tensor) -> Result<Tensor>;
}
/// This represents how beta ranges from its minimum value to the maximum