FateZeroModel<T>

Models & Types · AiDotNet.Diffusion.Video.VideoEditing

FateZero zero-shot video editing via attention blending.

Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → VideoDiffusionModelBase<T> → FateZeroModel<T>

For Beginners

FateZero performs zero-shot video editing by blending attention patterns from the original and edited videos. It requires no training or fine-tuning - just describe the desired change and it applies it consistently across frames.

How It Works

References:

  • Paper: “FateZero: Fusing Attentions for Zero-shot Text-based Video Editing” (Qi et al., 2023)

FateZero enables zero-shot video editing by fusing self-attention maps from the source video’s DDIM inversion with cross-attention maps from the target prompt. This attention blending preserves the original video’s motion and structure while applying the desired edit. No per-video training or optimization is required.

Technical specifications:

  • Architecture: Attention Blending + DDIM Inversion + Zero-Shot Editing
  • Latent channels: 4
  • Default: 24 frames at 8 FPS
  • Supports I2V: No | T2V: Yes | V2V: Yes

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 50 };
var input = Tensor<float>.CreateRandom(new[] { 1, 4, 24, 64, 64 });
var trainX = Tensor<float>.CreateRandom(4, 8);
var trainY = Tensor<float>.CreateRandom(4, 2);
var result = new AiModelBuilder<float, Tensor<float>, Tensor<float>>()
    .ConfigureModel(new FateZeroModel<float>(options: options))
    .Build(trainX, trainY);
var edited = result.Predict(input);

Constructors

Constructor Summary
FateZeroModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, VideoUNetPredictor<T> predictor, TemporalVAE<T> temporalVAE, IConditioningModule<T> conditioner, int defaultNumFrames, int defaultFPS, int? seed) Initializes a new instance of FateZeroModel with full customization support.

Properties

Property Summary
IConditioningModule<T> Conditioner { get; }
INoisePredictor<T> NoisePredictor { get; }
IVAEModel<T> TemporalVAE { get; }
IVAEModel<T> VAE { get; }
bool SupportsImageToVideo { get; }
bool SupportsTextToVideo { get; }
bool SupportsVideoToVideo { get; }
int LatentChannels { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()