nemo_automodel.components.models.muse_spark.vision
nemo_automodel.components.models.muse_spark.vision
NaViT vision tower for Muse Spark Open image and video inputs.
Module Contents
Classes
Functions
API
Bases: Module
Two-layer GELU adapter from pixel-shuffled patches to projector width.
Map [visual_tokens,input_size] to [visual_tokens,output_size].
Bases: Module
Packed bidirectional attention over independent image/video-frame grids.
Attend over [patches,hidden] using int32 segment boundaries.
Bases: GradientCheckpointingLayer
One pre-LayerNorm NaViT encoder block.
Transform packed [patches,hidden] visual states.
Bases: Module
NaViT layer stack alternating sparse and full bidirectional attention.
Run packed [patches,hidden] states through the NaViT stack.
Bases: Module
Bias-bearing GELU feed-forward used by NaViT.
Transform a [patches,hidden] visual sequence.
Bases: Module
Variable-resolution Muse Spark Open image/video encoder.
Encode row-major patches.
Parameters:
Flattened temporal patches with shape
[sum(t*h*w), 3*patch_temporal*patch_size**2].
Per-media clip grids with shape [media,3]. Each row is
[temporal_clips,grid_height,grid_width].
Returns: MuseSparkVisionOutput
Adapted visual tokens with shape
Initialize a checkpoint-free vision model on buffer_device.
Flattened visual features after pixel shuffle and the adapter.
Apply adjacent-pair RoPE to Q/K tensors shaped [tokens,heads,head_dim].
Build int32 packed-sequence boundaries for a list of segment lengths.
Return block-major indices for one row-major [H,W] patch grid.
Return adjacent-pair 2D RoPE frequencies shaped [H*W,D/2,2].
Pack one patch grid into fixed spatial blocks for sparse vision layers.