mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Main diffusion loop for the SD example. (#332)
This commit is contained in:
@ -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())?;
|
||||
|
Reference in New Issue
Block a user