Nodes/Mutantwork Power Pack/πŸ”¬ Mutant Forensic Lab
ComfyUI Node

πŸ”¬ Mutant Forensic Lab

A local 'is this AI?' triage node β€” read the report like a detective, not an oracle

By brerereton-beepΒ·Created 3 months agoΒ·Updated 3 months agoΒ· 1
πŸ”¬ Mutant Forensic Lab
  • image
  • image
  • forensic_report
β—„image_pathβ–Ί

Mutant Forensic Lab is the node for when you've got an image and you want to know where it came from - no API keys, no cloud, no cost. You're curating a gallery and want to flag machine-made entries. You're checking a file someone sent you. You're just curious whether that "photo" you found is real. It runs three forensic checks locally and returns the original image plus a scored text report.

Say the thing up front: this is a heuristic, not a detector-classifier. AI detection is a famously unreliable business - the community consensus, from people who actually test these tools, is that detectors throw false positives and miss plenty (one well-upvoted verdict: "AI detectors are trash that give out false positives every time"). So treat the score as triage, and read the pillars, not just the percentage. The report's structure is exactly where the value is.

The three pillars

  • Pillar A - metadata. It reads the PNG text chunks and EXIF that travel inside the file: a ComfyUI workflow chunk means ComfyUI, an A1111 parameters string means Automatic1111/WebUI, a Description tag mentioning Midjourney means Midjourney, and a camera Make/Model means an actual camera. This is the most reliable pillar, because it's not guessing - it's reading what the file literally says.
  • Pillar B - FFT analysis. A 2D Fourier transform looks for the periodic "latent grid" pattern that VAE decoders can leave behind at 8/16/32/64px intervals. Natural photos have a smooth spectral falloff; freshly-decoded diffusion output can show cross-axis peaks.
  • Pillar C - ELA (Error Level Analysis). It re-compresses the image to JPEG quality 90, subtracts, and looks for local "hot spots" - regions that degrade differently because they've been through different numbers of compression cycles. That's compositing or editing evidence, not AI evidence per se.

The final score is a weighted blend: metadata 0.3, FFT 0.4, ELA 0.3. Then you get a verdict line ("CRITICAL MUTATION FOUND" at 80+, down to "BIOLOGICAL SIGNATURE" under 20) and an integrity level. The naming is theatrical, but the mechanics underneath are standard forensic techniques.

Inputs and outputs

  • image (required) - the IMAGE tensor.
  • image_path (optional) - the one that matters, and the source of the most common confusion. A ComfyUI IMAGE tensor is just pixels; the metadata does not ride the wire between nodes. That's true of every ComfyUI image - the workflow chunk lives in the PNG file, not the tensor (the KB's image-io doc is the definitive writeup). So Pillar A can only see real metadata if you give the node the path to the file on disk. Leave it blank and you get FFT + ELA only, and metadata will report "No EXIF Make/Model found."

Outputs are image (pass-through - you can keep wiring it into your Save Image) and forensic_report (STRING - wire it into any display node).

Install

It's part of the ComfyUI-Mutantwork pack. ComfyUI Manager: search ComfyUI-Mutantwork β†’ install β†’ restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/brerereton-beep/ComfyUI-Mutantwork.git
pip install -r ComfyUI-Mutantwork/requirements.txt

This node only needs numpy and Pillow at runtime; the requirements list scipy and opencv-python too, but nothing in the pack's code imports them.

Where people get burned

The FFT grid is a first-save signal. By the time an image has been upscaled, re-encoded, or screenshotted, the grid is gone or distorted - so a clean FFT on a heavily-processed image tells you almost nothing. Conversely, a real photo that's been resized with a mediocre interpolator can throw spurious grid hits. And ELA's honest limitation is built into the code: a clean ELA doesn't prove anything is human - it just means no composite evidence. Use it as one signal among three, and always check image_path when you actually care about the metadata pillar.

CategoryMutantwork

Inputs (2)

NameTypeDefaultDescription
imageIMAGEβ€”
image_pathoptSTRINGβ€”

Outputs (2)

NameTypeDescription
imageIMAGEβ€”
forensic_reportSTRINGβ€”