summaryrefslogtreecommitdiff
path: root/candle-examples/examples/stable-diffusion/clip.rs
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2023-08-06 22:39:53 +0200
committerGitHub <noreply@github.com>2023-08-06 21:39:53 +0100
commit141df4ad2b80f0691450f32b28bcc2314301050b (patch)
tree357a62dd4bce15a2f43dc86d507f62748d61a820 /candle-examples/examples/stable-diffusion/clip.rs
parent166bfd5847144abec227836e497b509625470535 (diff)
downloadcandle-141df4ad2b80f0691450f32b28bcc2314301050b.tar.gz
candle-141df4ad2b80f0691450f32b28bcc2314301050b.tar.bz2
candle-141df4ad2b80f0691450f32b28bcc2314301050b.zip
Main diffusion loop for the SD example. (#332)
Diffstat (limited to 'candle-examples/examples/stable-diffusion/clip.rs')
-rw-r--r--candle-examples/examples/stable-diffusion/clip.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-examples/examples/stable-diffusion/clip.rs b/candle-examples/examples/stable-diffusion/clip.rs
index 86313c52..be798ad0 100644
--- a/candle-examples/examples/stable-diffusion/clip.rs
+++ b/candle-examples/examples/stable-diffusion/clip.rs
@@ -294,7 +294,7 @@ impl ClipTextTransformer {
}
impl ClipTextTransformer {
- fn forward(&self, xs: &Tensor) -> Result<Tensor> {
+ pub fn forward(&self, xs: &Tensor) -> Result<Tensor> {
let (bsz, seq_len) = xs.dims2()?;
let xs = self.embeddings.forward(xs)?;
let causal_attention_mask = Self::build_causal_attention_mask(bsz, seq_len, xs.device())?;