pub struct VideoVaeEncoder { /* private fields */ }Expand description
The encoder half: [3, h, w] in [-1, 1] → normalized latents
[24, h/16, w/16].
Implementations§
Source§impl VideoVaeEncoder
impl VideoVaeEncoder
pub fn from_cmf(model: &Arc<CmfModel>) -> Result<Self, String>
Sourcepub fn encode_frame(
&self,
rgb: &[f32],
h: usize,
w: usize,
) -> (Vec<f32>, usize, usize)
pub fn encode_frame( &self, rgb: &[f32], h: usize, w: usize, ) -> (Vec<f32>, usize, usize)
A single frame in [-1, 1], [3, h, w] → normalized latents
[z, h/16, w/16], spatially tiled exactly as the reference does:
the posterior MEAN, no sampling (what a video keyframe conditions
on).
Sourcepub fn encode_frame_sampled(
&self,
rgb: &[f32],
h: usize,
w: usize,
seed: u64,
) -> (Vec<f32>, usize, usize)
pub fn encode_frame_sampled( &self, rgb: &[f32], h: usize, w: usize, seed: u64, ) -> (Vec<f32>, usize, usize)
The same frame as a SAMPLE of the posterior — mean + σ·ε with
logvar clamped to [-30, 20] — which is what MiniMax-H3-Image’s
reference pictures condition on. The reference draws ε from a
torch generator at a fixed seed; ours is its own stream of the
same law, fixed by seed.
Auto Trait Implementations§
impl !RefUnwindSafe for VideoVaeEncoder
impl !UnwindSafe for VideoVaeEncoder
impl Forget for VideoVaeEncoder
impl Freeze for VideoVaeEncoder
impl Move for VideoVaeEncoder
impl Send for VideoVaeEncoder
impl Sync for VideoVaeEncoder
impl Unpin for VideoVaeEncoder
impl UnsafeUnpin for VideoVaeEncoder
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