Nodes/ControlNet Auxiliar/modaux: content
ComfyUI Node

modaux: content

Content shuffle, the preprocessor that un-shuffles your image

By madtunebk·Created 2 years ago·Updated 2 years ago· 17
modaux: content
  • image
  • IMAGE
detect_resolution512
image_resolution512
h512
w512
f10

Every pack has one node that makes you do a double take, and in ControlNet Auxiliar it's modaux: content. Instead of extracting edges or depth from your image, it scrambles the pixels into a locally-shuffled mess - and that mess is the point. The idea: feed the shuffled image to a ControlNet that was trained to reconstruct the original, and the model is forced to rebuild fine detail from the prompt. It's a detail-recovery and retexturing trick from the SD 1.5 era, and honestly it's an acquired taste. This is the least-used node in the pack, and you should treat it as "if you know, you know."

How it works

ContentShuffleDetector from controlnet-aux loads no weights at all - it's pure image processing. It generates a random noise field, turns it into a distortion flow, and uses cv2.remap to warp patches of the image around locally. Colors and local texture survive; positions get jumbled. The result keeps the palette and grain of the source but destroys the composition, so the only way to get a coherent picture back is for the ControlNet to genuinely re-render it.

That's the workflow: the scrambled map goes into a ControlNet trained for it - lllyasviel shipped a control_sd15_content_shuffle model with the original ControlNet release - and the model reassembles the content while the prompt steers what it becomes. People use it for things like "take this anime screencap's color and detail, re-render it as a realistic scene" or texture redraws where you want local style preserved but everything else regenerated.

The honest caveat: content-shuffle conditioning never made the jump to the modern bases. The 2025-26 union checkpoints for SDXL, Flux, and Z-Image cover canny, depth, pose, MLSD, HED, scribble, and gray - no content mode. So this node's target ControlNet lives on SD 1.5, which automatically makes it a legacy-tooling play.

The inputs

The standard image, detect_resolution (512), and image_resolution (512), plus three that shape the scramble:

  • h and w (default 512) - the internal grid size the shuffle noise is generated at. Keep them in step with your working resolution.
  • f (default 10) - the noise "frequency," which roughly sets how chunky the scramble is. Small values give fine-grained texture shuffles; larger values scramble in bigger blocks.

The output is the scrambled IMAGE, wired into a ControlNet Apply node with a content-shuffle ControlNet (SD 1.5 only, remember).

Install and practical notes

Same pack as the rest:

cd ComfyUI/custom_nodes
git clone https://github.com/madtunebk/ComfyUI-ControlnetAux.git
cd ComfyUI-ControlnetAux
pip install -r requirements.txt

or ComfyUI Manager → search "ControlNet Auxiliar". Restart, and there's no weight download - this node is instant on first use. And unlike the DWPose sibling in this pack, there's no mmdet/mmcv/mmpose dependency to wrestle with.

Where people get burned is expecting a conventional result. If you wire this into a normal canny/depth workflow, you'll get chaos - the shuffle map is only meaningful to a model that was trained on shuffled inputs. And since that model is SD 1.5-era, this is a node for legacy workflows, experiments, and people who like a bit of controlled weirdness. If that's not you, skip it. It's the one node in the pack you can safely ignore - but it's also the one you'll remember.

CategoryControlNet Auxiliar

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
detect_resolutionINT512256–1024
image_resolutionINT512256–1024
hoptINT5121–1024
woptINT5121–1024
foptINT101–1024

Outputs (1)

NameTypeDescription
IMAGEIMAGE