pub struct CrossAttnUpBlock2D {
pub upblock: UpBlock2D,
pub attentions: Vec<SpatialTransformer>,
pub config: CrossAttnUpBlock2DConfig,
/* private fields */
}
Fields§
§upblock: UpBlock2D
§attentions: Vec<SpatialTransformer>
§config: CrossAttnUpBlock2DConfig
Implementations§
source§impl CrossAttnUpBlock2D
impl CrossAttnUpBlock2D
pub fn new( vs: VarBuilder<'_>, in_channels: usize, prev_output_channels: usize, out_channels: usize, temb_channels: Option<usize>, use_flash_attn: bool, config: CrossAttnUpBlock2DConfig ) -> Result<Self>
pub fn forward( &self, xs: &Tensor, res_xs: &[Tensor], temb: Option<&Tensor>, upsample_size: Option<(usize, usize)>, encoder_hidden_states: Option<&Tensor> ) -> Result<Tensor>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrossAttnUpBlock2D
impl !RefUnwindSafe for CrossAttnUpBlock2D
impl Send for CrossAttnUpBlock2D
impl Sync for CrossAttnUpBlock2D
impl Unpin for CrossAttnUpBlock2D
impl !UnwindSafe for CrossAttnUpBlock2D
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more