VideoTransformer3DLayer<T>

Layers · AiDotNet.Diffusion.NoisePredictors

The released Upscale-A-Video Transformer3D block.

Inheritance: LayerBase<T> → VideoTransformer3DLayer<T>

Implements: IShapeContract

How It Works

It combines a temporal (3,1,1) ResNet, per-frame spatial/text transformer processing, zero-initialized temporal attention, GEGLU, and an outer residual. The implementation accepts arbitrary frame counts.

Constructors

Constructor Summary
VideoTransformer3DLayer(int channels, int contextDimension, int headCount, int spatialSize, bool onlyCrossAttention) Creates the released Transformer3D block.

Properties

Property Summary
IReadOnlyList<ILayer<T>> TemporalTrainingLayers { get; } Gets the temporal adapters optimized while the pretrained spatial transformer is frozen.
bool OnlyCrossAttention { get; } Gets whether the first attention sublayer also attends to text.
bool SupportsTraining { get; }
bool TemporalAttentionIsZeroInitialized { get; } Gets whether temporal attention starts as a zero residual adapter.
bool UsesTemporalAttention { get; } Gets whether the block contains the released temporal attention path.

Methods

Method Summary
IReadOnlyList<ILayer<T>> GetSubLayers()
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) Derived from this type’s [TensorLayout] declarations.
Tensor<T> Forward(Tensor<T> input, Tensor<T> context) Runs the block for an NCFHW video and text encoder states.
void ResetState()
void SetTrainingMode(bool isTraining)
void UpdateParameters(T learningRate)