pub struct VaeDecoder {
pub latent_channels: usize,
pub scaling_factor: f32,
pub shift_factor: f32,
/* private fields */
}Expand description
The full decoder: conv_in → mid(res, attn, res) → up-blocks → GroupNorm + SiLU → conv_out, plus the diffusers latent
de-normalization z/scaling_factor + shift_factor.
Fields§
§latent_channels: usize§scaling_factor: f32§shift_factor: f32Implementations§
Source§impl VaeDecoder
impl VaeDecoder
Sourcepub fn chain_args(&self) -> VaeChainArgs<'_>
pub fn chain_args(&self) -> VaeChainArgs<'_>
The borrowed device-chain view (see VaeChainArgs).
Sourcepub fn decode_fast(&self, z: &[f32], h: usize, w: usize) -> Vec<f32>
pub fn decode_fast(&self, z: &[f32], h: usize, w: usize) -> Vec<f32>
decode with the resident device chain first: de-normalise on the
host, try gpu::vae_decode_chain, and fall back to decode (the
unchanged Lumina path) when the backend declines. Same contract as
decode: model-scale latents in, RGB [3, 8h, 8w] in ≈[-1, 1] out.
Source§impl VaeDecoder
impl VaeDecoder
Auto Trait Implementations§
impl Freeze for VaeDecoder
impl RefUnwindSafe for VaeDecoder
impl Send for VaeDecoder
impl Sync for VaeDecoder
impl Unpin for VaeDecoder
impl UnsafeUnpin for VaeDecoder
impl UnwindSafe for VaeDecoder
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