pub struct Geometry {
pub frames: usize,
pub height: usize,
pub width: usize,
pub fps: f64,
pub lf: usize,
pub lh: usize,
pub lw: usize,
pub af: usize,
}Expand description
Latent geometry of one render.
Fields§
§frames: usize§height: usize§width: usize§fps: f64§lf: usizeLatent frames / rows / columns.
lh: usize§lw: usize§af: usizeAudio latent frames.
Implementations§
Source§impl Geometry
impl Geometry
pub fn new(frames: usize, height: usize, width: usize, fps: f64) -> Geometry
pub fn video_tokens(&self) -> usize
pub fn tokens_per_frame(&self) -> usize
Sourcepub fn video_positions(&self) -> Vec<Vec<f64>>
pub fn video_positions(&self) -> Vec<Vec<f64>>
Patch midpoints in (seconds, pixel row, pixel column), in the
frame-major order patchify produces.
Sourcepub fn audio_positions(&self) -> Vec<Vec<f64>>
pub fn audio_positions(&self) -> Vec<Vec<f64>>
Audio patch midpoints, in seconds.
Sourcepub fn guide_positions(&self, gf: usize, frame_offset: i64) -> Vec<Vec<f64>>
pub fn guide_positions(&self, gf: usize, frame_offset: i64) -> Vec<Vec<f64>>
Non-zero on the first latent frame, whose latent encodes a single
standalone pixel frame.
Patch midpoints for a guide block of gf latent frames placed at
frame_offset pixel frames — negative for a reference slot, which is
what puts it before the clip on the time axis. The causal correction
of the first frame is the same one video_positions applies; the
offset is added after it, in pixel frames, exactly as the reference
implementation shifts a keyframe’s coordinates.
pub fn keyframes_mask(&self) -> Vec<f32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnsafeUnpin for Geometry
impl UnwindSafe for Geometry
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