CubeDiffModel<T>
Models & Types · AiDotNet.Diffusion.Panorama
CubeDiff model for cubemap-based panoramic generation with cross-face consistency.
Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → CubeDiffModel<T>
For Beginners
CubeDiff creates complete 360-degree environments by generating six connected views (like the faces of a cube) simultaneously. Each face connects seamlessly to its neighbors, creating an immersive surround environment perfect for VR or game backgrounds.
How It Works
CubeDiff generates cubemap panoramas by jointly denoising all six cube faces with cross-face attention at the edges. This ensures seamless transitions between faces and produces high-quality 360x180 degree environments.
Example
var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 30 };
var noise = Tensor<float>.CreateRandom(new[] { 6, 4, 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 CubeDiffModel<float>(options: options))
.Build(trainX, trainY);
var panorama = result.Predict(noise);
Constructors
| Constructor | Summary |
|---|---|
CubeDiffModel(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() |