InpaintingMaskPreprocessor<T>
Models & Types ยท AiDotNet.Diffusion.Preprocessing
Inpainting mask preprocessor for ControlNet conditioning.
Inheritance: DiffusionPreprocessorBase<T> โ InpaintingMaskPreprocessor<T>
For Beginners
This prepares a mask that tells the AI which parts of the image to regenerate (white) and which to keep (black). The feathering option creates smooth transitions at mask edges for more natural blending.
How It Works
Processes inpainting masks by binarizing and optionally feathering edges. The output is a single-channel mask where 1.0 indicates regions to inpaint and 0.0 indicates regions to preserve.
Constructors
| Constructor | Summary |
|---|---|
InpaintingMaskPreprocessor(double binarizeThreshold, int featherRadius) |
Initializes a new inpainting mask preprocessor. |
Properties
| Property | Summary |
|---|---|
ControlType OutputControlType { get; } |
|
int OutputChannels { get; } |
Methods
| Method | Summary |
|---|---|
Tensor<T> Transform(Tensor<T> data) |