DualXVSROptions

Options & Configuration · AiDotNet.Video.Options

Configuration options for DualX-VSR, the dual axial spatial x temporal transformer for real-world video super-resolution without motion compensation.

Inheritance: ModelOptions → NeuralNetworkOptions → DualXVSROptions

For Beginners

DualX-VSR upscales video four times without estimating motion. These settings control how wide and deep its attention is and how it is trained: first to match clean frames, then also to look realistic.

How It Works

Defaults follow Cao et al. 2025 (arXiv 2506.04830), Tables 6-8 and Sec. 5.1: a 64-channel 3x3 shallow convolution, 2x2 patches embedded to 1,280 channels, six vertical-temporal then six horizontal-temporal blocks, 12 heads, MLP ratio 2, RoPE with base 10,000, temporal transformers of depth 2 in the embedding and the reconstruction, x4 upsampling and 16-frame clips. Training is AdamW at 5e-5 for 500,000 bicubic pretraining and 150,000 real-degradation fine-tuning iterations on Charbonnier loss, then 25,000 iterations at 1e-5 for the generator and discriminator on Charbonnier, perceptual and GAN losses weighted 0.01, 1 and 0.005. The paper gives no code; HeadDim (64, vit-pytorch’s ViViT default) is the head width that reproduces its 127.95M parameters, and AdamW’s unstated decay is PyTorch’s 0.01.

Constructors

Constructor Summary
DualXVSROptions() Initializes a new instance with default values.
DualXVSROptions(DualXVSROptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets the ONNX runtime options.
double AdversarialLearningRate { get; set; } Gets or sets the generator’s AdamW rate in the GAN stage (1e-5).
double AdversarialPixelWeight { get; set; } Gets or sets the Charbonnier weight in the GAN stage (0.01).
double CharbonnierEpsilon { get; set; } Gets or sets the Charbonnier ε (1e-6, i.e.
double DiscriminatorLearningRate { get; set; } Gets or sets the discriminator’s AdamW rate (1e-5).
double GANWeight { get; set; } Gets or sets the GAN loss weight in the GAN stage (0.005).
double LearningRate { get; set; } Gets or sets the AdamW rate of the pretraining and fine-tuning stages (5e-5).
double MlpRatio { get; set; } Gets or sets the MLP’s hidden width as a multiple of the token width (2).
double PerceptualWeight { get; set; } Gets or sets the perceptual loss weight in the GAN stage (1; 0 leaves the VGG19 out).
double RopeBase { get; set; } Gets or sets the rotary position embedding’s base b (10,000).
double WeightDecay { get; set; } Gets or sets AdamW’s decoupled weight decay (0.01, PyTorch’s default; the paper states none).
int DiscriminatorChannels { get; set; } Gets or sets the discriminator’s base width (64, RealBasicVSR’s U-Net discriminator).
int EmbedDim { get; set; } Gets or sets the dual axial transformer’s token width (1,280).
int EmbeddingTemporalDepth { get; set; } Gets or sets the blocks of the input embedding’s temporal transformer (2).
int HeadDim { get; set; } Gets or sets the channels of each attention head (64).
int HorizontalDepth { get; set; } Gets or sets the horizontal-temporal attention blocks, which follow the vertical ones (6).
int NumFeatures { get; set; } Gets or sets the shallow convolution’s channels and the per-pixel temporal transformers’ width (64).
int NumFrames { get; set; } Gets or sets the frames of a clip (16).
int NumHeads { get; set; } Gets or sets the attention heads of every transformer (12).
int PatchSize { get; set; } Gets or sets the side of the square image patch a token covers (2).
int ReconstructionIterations { get; set; } Gets or sets the Charbonnier-only iterations before the GAN stage (650,000: 500,000 pretraining plus 150,000 fine-tuning, which differ only in their data).
int ReconstructionTemporalDepth { get; set; } Gets or sets the blocks of the reconstruction’s temporal transformer (2).
int ScaleFactor { get; set; } Gets or sets the spatial upscaling factor, a power of two (4).
int VerticalDepth { get; set; } Gets or sets the vertical-temporal attention blocks (6).
string ModelPath { get; set; } Gets or sets the path to the ONNX model file.