CatVTONModel<T>

Models & Types · AiDotNet.Diffusion.VirtualTryOn

CatVTON model for concatenation-based virtual try-on without warping modules.

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

For Beginners

CatVTON is a simpler approach to virtual try-on. Instead of complex warping to fit clothes to a body, it simply feeds both the person and garment images together and lets the AI figure out how to combine them naturally.

How It Works

CatVTON simplifies virtual try-on by concatenating garment features directly with person features as input, eliminating the need for explicit warping modules. The diffusion model learns to implicitly handle deformation and blending.

Reference: Chong et al., “CatVTON: Concatenation Is All You Need for Virtual Try-On with Diffusion Models”, 2024

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 30 };
var input = 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 CatVTONModel<float>(options: options))
    .Build(trainX, trainY);
var tryOn = result.Predict(input);

Constructors

Constructor Summary
CatVTONModel(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()