GPT Anime Image Denoise (Fish-Scale Removal)
GPT image generation leaves fine fish-scale-like textures in anime / illustration / TV-anime style images. These are visible to the human eye at full resolution, but hard to detect via magnification, high-pass filtering, or spectral analysis — do not judge by yourself whether 'this image has no noise', run it on every GPT anime image that will be delivered.
How to Use in DeepSeek Harness
Prefer using the anime_denoise tool (it runs denoise.py from this directory):
anime_denoise { images: ["D:\\pics\\a.png"] } # Default: ESRGAN 60% scale + L0 0.001
anime_denoise { images: ["D:\\pics"], all: true } # Entire directory, 7 candidates + <name>_sheet.png per image
anime_denoise { images: ["D:\\pics\\a.png"], l0: 0.002 } # Texture residue: strengthen L0
anime_denoise { images: ["D:\\pics\\a.png"], method: "cugan60_l0", outDir: "D:\\out" }
images: absolute paths are safest; you can also pass a folder (processes all images inside). Relative paths are resolved against the host's given working directory.- Default output goes to the plugin-configured
outDir(on Windows, prioritizesPictures\AI绘图\denoiseon the D drive for the current user; if that directory doesn't exist, uses%USERPROFILE%\Pictures\AI绘图\denoise; co-located with AI drawings, no extra folder created next to the image). File name:<original>_<method>.png, size same as input; original is untouched, the output is paired with the original via the method suffix. - If the tool reports "Can't find Python to run the denoising script", write the interpreter's absolute path into the plugin config
pythonPath, or set the environment variableDENOISE_PYTHON.
Fallback: Run the Script Directly When the Tool is Unavailable
Below is the Base directory for this skill; on Windows, if the path contains Chinese characters or spaces, wrap the entire path in quotes:
$py = "C:\path\to\python.exe"
$script = "<Base directory>\denoise.py"
& $py $script "D:\pics\a.png" --method esrgan60_l0 --l0 0.001
& $py $script "D:\pics\a.png" --all
& $py $script "D:\pics" --out "D:\out" --device cuda
Command-line arguments: --out, --all, --method, --l0 (0 to skip L0), --models, --device cuda|mps|cpu. Without --out, the script creates a <original>_denoise subdirectory next to the image; to land in the same output directory as the tool, add --out "D:\out\denoise".
Local Environment (Windows Desktop)
- Interpreter at
%LOCALAPPDATA%\Programs\Python\Python312\python.exe(3.12), with torch / spandrel / numpy / pillow / psutil ready, CUDA available; only runpython setup_env.pyifimport torch, spandrelfails. - Model cache at
%USERPROFILE%\.cache\gpt-anime-denoise:RealESRGAN_x4plus_anime_6B.pthalready present, default method works offline. cugan60*andapisrrequire a first-time online download of weights; if the network is unstable, just use the defaultesrgan60_l0.- GUI (optional):
python denoise_app.pystarts a web version locally. The command line has no "pre-scale ratio" switch (60% is hardcoded); to change pre-scaling, use the GUI. - Troubleshooting:
GET http://127.0.0.1:<current DSH Web port>/api/anime-denoise/statereturns whether Python is available, the output directoryoutDir, model cache list, and skill readiness.
Delivery Rules
- Default delivery:
esrgan60_l0. - If the user wants to choose themselves, pass
all: true(or--all), and deliver<filename>_sheet.png(full-size side-by-side composite) to the user; always give full-size side-by-side images, not zoomed-in crops, because zooming makes differences less visible. - Do not use diffusion-based inpainting, ControlNet, guided/bilateral filtering for denoising: they will redraw eyes or blur the image (see README "Methods tried but not effective").
- For photorealistic images, also deliver the default
esrgan60_l0. RealESRGAN_x4plus, realesr-general-x4v3, SCUNet, and DRUNet have all been tested and are less effective than the default (see README "Photorealistic images"), do not switch to them. - For detail-dense images (hair strands, lace, metallic reflections), run two rounds: take the first round result and run it again, raising
l0to0.002for the second round. The command line cannot change the 60% pre-scaling, so do not copy the GUI's "pre-scale 50%" wording.