Open skills/mi-ripple/SKILL.md →
AI coding agents should read this skill first. It contains the complete workflow for installing Mi-Ripple, processing an image, inspecting the generated evidence, requesting permission before paid regeneration, and returning the actual result. The skill never authorizes paid regeneration on the user's behalf.
Install it from the canonical repository:
https://github.com/miyang-ai/Mi-Ripple
Direct skill URL:
https://raw.githubusercontent.com/miyang-ai/Mi-Ripple/main/skills/mi-ripple/SKILL.md
Reference implementation of Mi-Ripple, MIYANG's diagnosis-guided workflow for restoring grid-like and scale-like artifacts introduced by iterative, reference-conditioned AI image editing.
Try Mi-Ripple on the MIYANG Lab website →
Experience Mi-Ripple with Alice →
Visit the MIYANG official website →
Mi-Ripple does not apply one aggressive filter to every image. It first separates:
- Periodic lattice artifacts: isolated spectral peaks that can be selectively notched with low measured distortion.
- Granular artifacts in unstructured regions: 3–8 px texture that can be reduced behind a structure-protection mask.
- Content-entangled artifacts: repeated texture overlapping hair, foliage, fabric, or other legitimate detail. These require human review or optional regeneration from a cleaned reference.
Important
This is a research implementation, not a universal artifact detector. Automatic scores are triage signals. Review the generated heat maps and comparison boards before accepting an output.
These are the five comparisons currently used by the MIYANG Lab tool. Open an image to inspect it at native resolution.
| Before | After |
|---|---|
![]() |
![]() |
The images share the same source composition but come from separate experimental branches: direct regeneration versus cleaned-reference regeneration followed by selective lattice notching. Regeneration is not pixel-aligned restoration and can change fine semantic details.
| Before | After |
|---|---|
![]() |
![]() |
| Before | After |
|---|---|
![]() |
![]() |
| Before | After |
|---|---|
![]() |
![]() |
| Before | After |
|---|---|
![]() |
![]() |
Python 3.11 or newer is required.
git clone https://github.com/miyang-ai/Mi-Ripple.git
cd Mi-Ripple
python -m venv .venv
source .venv/bin/activate
pip install -e .OpenCV-based face protection is optional:
pip install -e ".[face]"For development:
pip install -e ".[dev]"
pytestLocal deterministic processing is the default:
mi-ripple input.png output/The output directory contains:
- a diagnosis JSON and visual inspection boards;
- intermediate masks and processed candidates;
- a machine-readable XML decision trace;
- a final image when the deterministic route can deliver one;
- a sidecar containing hashes, parameters, measurements, and the final outcome.
If artifacts overlap image content, the default route stops with
needs_human_decision. Optional regeneration requires explicit permission and a
MIYANG API key:
export MIYANG_API_KEY=...
mi-ripple input.png output/ --allow-regen --max-regen 1Regeneration may change image content, dimensions, and color. Its output remains a candidate until a person accepts it.
from pathlib import Path
from mi_ripple.pipeline import run
result = run(Path("input.png"), Path("output"))
print(result["outcome"], result["final"])Individual measurement and processing modules are also public:
mi_ripple.diagnosismi_ripple.scale_indexmi_ripple.notchmi_ripple.spatialmi_ripple.referencemi_ripple.verify
The accompanying paper is:
Yicheng Xu, Jiayin Chen, and Muting Wang. Mi-Ripple: Restoring Images Degraded by Iterative AI Editing. MIYANG Technology (Shanghai) Co., Ltd., 2026.
The LaTeX manuscript, references,
and publication figures are included in paper/.
| Artifact forms | Targeted restoration |
|---|---|
![]() |
![]() |
See docs/ALGORITHM.md for the decision flow and docs/LIMITATIONS.md before interpreting reported scores. Provider integration and billing boundaries are documented in docs/REGENERATION.md. The publication-ready manuscript will be linked here when its permanent public record is available.
The test suite uses synthetic deterministic inputs. The documented comparison and paper figures are curated publication assets; private user images and internal production archives are not included.
See CONTRIBUTORS.md.
The source code is released under the MIT License.
MIYANG, its logo, and associated product branding are trademarks or brand assets of MIYANG Technology (Shanghai) Co., Ltd. The MIT License does not grant rights to use those marks. See TRADEMARKS.md.
Copyright © 2026 MIYANG Technology (Shanghai) Co., Ltd.














