ContentShufflePreprocessor<T>

Models & Types · AiDotNet.Diffusion.Preprocessing

Content shuffle preprocessor for ControlNet conditioning.

Inheritance: DiffusionPreprocessorBase<T> → ContentShufflePreprocessor<T>

For Beginners

This is like the Shuffle preprocessor but smarter — it groups similar-looking parts of the image together before rearranging. ControlNet uses this to capture the “feel” and colors of your image without copying the exact arrangement.

How It Works

Performs content-aware shuffling that rearranges image regions based on similarity rather than random permutation. Groups similar pixels together while destroying spatial layout, preserving texture and color distributions more faithfully than random shuffling.

Constructors

Constructor Summary
ContentShufflePreprocessor(int blockSize, int seed) Initializes a new content shuffle preprocessor.

Properties

Property Summary
ControlType OutputControlType { get; }
int OutputChannels { get; }

Methods

Method Summary
Tensor<T> Transform(Tensor<T> data)