CATDMModel<T>

Models & Types · AiDotNet.Diffusion.VirtualTryOn

CATDM model for controllable appearance transfer diffusion for virtual try-on.

Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → CATDMModel<T>

For Beginners

CATDM gives you more control over how clothes fit. Beyond just placing clothes on a person, you can control how tight or loose they look, how the fabric drapes, and other fine details of the garment’s appearance.

How It Works

CATDM uses appearance-transfer attention (ATA) to transfer garment appearance features while a shape control module ensures proper garment deformation based on body pose. Supports fine-grained attribute control like fit tightness and drape.

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 30 };
var personGarment = Tensor<float>.CreateRandom(new[] { 1, 4, 64, 48 });
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 CATDMModel<float>(options: options))
    .Build(trainX, trainY);
var tryOn = result.Predict(personGarment);

Constructors

Constructor Summary
CATDMModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, UNetNoisePredictor<T> predictor, StandardVAE<T> vae, IConditioningModule<T> conditioner, int? seed)

Properties

Property Summary
IConditioningModule<T> Conditioner { get; }
INoisePredictor<T> NoisePredictor { get; }
IVAEModel<T> VAE { get; }
int LatentChannels { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()