summaryrefslogtreecommitdiff
path: root/candle-examples/examples/stable-diffusion-3/sampling.rs
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2024-10-27 10:01:04 +0100
committerGitHub <noreply@github.com>2024-10-27 10:01:04 +0100
commit37e0ab8c64eb8219e32cf546ac2aa570ed3d1f82 (patch)
tree20981112a4c378cb9b90a2e6f856d2629d05b840 /candle-examples/examples/stable-diffusion-3/sampling.rs
parent07849aa595c65309ed9230a4c97035f471c6afb1 (diff)
downloadcandle-37e0ab8c64eb8219e32cf546ac2aa570ed3d1f82.tar.gz
candle-37e0ab8c64eb8219e32cf546ac2aa570ed3d1f82.tar.bz2
candle-37e0ab8c64eb8219e32cf546ac2aa570ed3d1f82.zip
Stable diffusion 3.5 support. (#2578)
* Stable diffusion 3.5 support. * Clippy fixes. * CFG fix. * Remove some unnecessary clones. * Avoid duplicating some of the code.
Diffstat (limited to 'candle-examples/examples/stable-diffusion-3/sampling.rs')
-rw-r--r--candle-examples/examples/stable-diffusion-3/sampling.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-examples/examples/stable-diffusion-3/sampling.rs b/candle-examples/examples/stable-diffusion-3/sampling.rs
index 0efd160e..cd881b6a 100644
--- a/candle-examples/examples/stable-diffusion-3/sampling.rs
+++ b/candle-examples/examples/stable-diffusion-3/sampling.rs
@@ -30,7 +30,7 @@ pub fn euler_sample(
let timestep = (*s_curr) * 1000.0;
let noise_pred = mmdit.forward(
- &Tensor::cat(&[x.clone(), x.clone()], 0)?,
+ &Tensor::cat(&[&x, &x], 0)?,
&Tensor::full(timestep as f32, (2,), x.device())?.contiguous()?,
y,
context,