IGuidanceMethod<T>

Interfaces · AiDotNet.Diffusion.Guidance

Interface for guidance methods that modify noise predictions during diffusion sampling.

Known implementations: AdaptiveProjectedGuidance<T>, DynamicCFGScheduler<T>, ELLAAdapter<T>, PerturbedAttentionGuidance<T>, RescaledCFG<T>, SelfAttentionGuidance<T>

For Beginners

Guidance is like an invisible hand that steers the AI toward your prompt. Standard CFG compares “with prompt” vs “without prompt” predictions. Advanced methods like PAG and SAG use attention manipulation for better results.

How It Works

Guidance methods control how the diffusion model balances prompt adherence and image quality during generation. Different methods offer different trade-offs.

Properties

Property Summary
GuidanceType GuidanceType { get; } Gets the type of guidance this method implements.

Methods

Method Summary
Tensor<T> Apply(Tensor<T> unconditional, Tensor<T> conditional, double scale, double timestep) Applies guidance to combine conditional and unconditional noise predictions.