Nodes/ComfyUI-MiRipple/Mi-Ripple Diagnose
ComfyUI Node

Mi-Ripple Diagnose

Measure the grid artifact before you try to kill it

By hiroki-abe-58·Created 14 days ago·Updated 14 days ago· 0
Mi-Ripple Diagnose
  • image
  • heatmap
  • board
  • scale_mask
  • granule_mask
  • lattice_detected
  • report
◄size_policy512x512 only►
◄keep_recordsfalse►

Most artifact-fixing nodes are a promise: run me and the image gets better. This one is a measuring instrument. It looks at a single image on your CPU, decides whether it has either of the two artifact classes its upstream code can find - an isolated periodic lattice, and granule noise in flat regions - and gives you pictures and masks showing what it found. Your pixels come out untouched. That's the point.

Why you'd reach for it at all

Sooner or later you get a faint regular grid, or a crawling grain over what should be clean wall and sky. The reflex is to open a denoiser and start shoving sliders. Wrong order: SUPIR and SeedVR2 happily add texture to images that didn't need restoring, and you can't reliably subtract a regular pattern afterward. Before you spend a pass destroying detail, it's worth one node that says "four isolated spectral peaks, here are the periods" - or "no, that's your brick wall."

This is MIYANG's Mi-Ripple diagnosis code, vendored locally and run on your CPU: no key, no network, no model weights. The namesake project is mostly a hosted regeneration service; this is the local half, unofficial.

What it actually measures

Everything runs on the lightness channel, after your IMAGE tensor is quantised to 8 bits - the official code reads files, so the wrapper writes a temp PNG and runs it exactly as the CLI would.

  • Lattice. An FFT, log-amplitude minus a local median baseline, keeping only small isolated components far enough from DC (radius ≥ 24 px), so big blobs and low-frequency energy can't trigger it. It fires when at least two survive and the strongest clears an excess threshold - and the period in pixels lands in the report.
  • Granules. Frame cut into 96 px windows, flat vs edge-oriented; each flat window gets band-passed statistics (spread, kurtosis, blob coverage, anisotropy) rolled up into none / suspected / flat / pervasive.
  • Scale-like texture. A whole-frame index over 128 px tiles on a 1280-wide canonical canvas, graded none / suspected / structured.

image must be exactly one RGB image; batches and alpha are refused with a message naming the shape. size_policy defaults to 512x512 only, the scope the author verified - anything else is refused, never quietly cropped; any size (unverified) runs the official code as-is. keep_records copies the official JSON sidecars, boards and XML trace to output/mi-ripple/<run id>/.

The outputs, and where they go

heatmap is the official tile heat map, red for flagged tiles; board is the official diagnosis board, window crops plus the residual band. Both are IMAGE - Preview Image them and you can see whether the machine agrees with your eyes. scale_mask and granule_mask are MASKs, 1 inside the flagged tiles and windows, in your input's coordinates - worth knowing, because the heatmap isn't (upstream downscales anything wider than 1280 onto its canvas). Composite with a mask to treat only the flagged region, or invert it to protect that region.

lattice_detected is a BOOLEAN, more useful than it sounds: gate your repair branch on it and it only runs when there's something to repair. report is JSON as a STRING - flags, counts, and next_official_action, i.e. what the official rules would do next with regeneration disabled.

Installing

Through ComfyUI Manager, search Mi-Ripple Local (registry name mi-ripple), or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/hiroki-abe-58/ComfyUI-MiRipple
pip install -r ComfyUI-MiRipple/requirements.txt

Nothing to download - no checkpoints, no models folder. scikit-image is genuinely used; httpx is installed only because upstream's regeneration client imports it. Use the same Python that runs ComfyUI.

Where people get burned

The node isn't in the menu. Check the startup console for [Mi-Ripple] not loaded:. Either scikit-image is missing from ComfyUI's environment, or your ComfyUI predates the V3 node API this pack imports - the loader catches the ImportError, logs it, and registers nothing, so the node vanishes instead of erroring loudly.

It refuses your 1024×1024 image. That's the policy working. The pack's own example workflow scales ComfyUI's bundled example.png to 512×512 with the core ImageScale node first; do the same, or switch to any size (unverified) and accept you're off the verified map.

A "suspected" verdict isn't a bug. Upstream's thresholds flag legitimate repeating textures too - brick, hatching, weave. Which is exactly why you diagnose first.

The verdict

Install it for the diagnosis half and stay sceptical of the rest. It can't wreck an image, it runs in well under a second at 512 on CPU, and it turns "does this look fried to you?" into numbers you can compare across two upscalers. Fair warning: there's no community discussion of Mi-Ripple anywhere - no tutorials, no threshold lore. You get the author's evidence table, unusually honest about its failures, and then your own eyes.

Categoryimage/mi-ripple

Inputs (3)

NameTypeDefaultDescription
imageIMAGEOne RGB image (batch 1). Quantised to 8 bits like the official file input.
size_policyCOMBO512x512 only'512x512 only' (verified scope) refuses other sizes. 'any size (unverified)' runs the official code on any size without resizing or cropping; results there were not compared with the official code.
keep_recordsBOOLEANfalseCopy the official records (JSON sidecars, diagnosis / verify boards, XML trace) to output/mi-ripple/<run id>/ for inspection

Outputs (6)

NameTypeDescription
heatmapIMAGEOfficial scale heat map (red = flagged 128 px tiles)
boardIMAGEOfficial diagnosis board (window crops and 3-8 px residual)
scale_maskMASK1 inside flagged scale-index tiles
granule_maskMASK1 inside flat windows flagged as granular
lattice_detectedBOOLEAN—
reportSTRING—