StitchDiffusionModel<T>
Models & Types · AiDotNet.Diffusion.Panorama
StitchDiffusion model for seamless 360-degree panorama generation with wrap-around consistency.
Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → StitchDiffusionModel<T>
For Beginners
StitchDiffusion creates full 360-degree panoramas where the left edge connects perfectly to the right edge, forming a complete surround view. Perfect for VR content or immersive environments.
How It Works
StitchDiffusion generates 360-degree panoramas by ensuring the left and right edges connect seamlessly. Uses circular padding in the latent space and a stitching loss to maintain continuity at the wrap-around boundary.
Example
var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 30 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 4, 64, 256 });
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 StitchDiffusionModel<float>(options: options))
.Build(trainX, trainY);
var panorama = result.Predict(noise);
Constructors
| Constructor | Summary |
|---|---|
StitchDiffusionModel(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() |