batch
cli_batchBatch-process all supported media files in a directory to remove AI provenance metadata and watermarks from images, video, audio, and text.
Instructions
Process all supported media files (images, videos, audio, text) in a directory.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"directory": "<directory>"
},
"name": "cli_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Processing mode. | visible |
| seed | No | Random seed for reproducibility. Default 0: all profiles are certified at a fixed seed, because SynthID removal near the strength floor is seed-dependent. | |
| tile | No | Process large images in overlapping tiles instead of one forward pass. This keeps the input's native dimensions instead of applying --max-resolution, but still regenerates every tile. Engages only when the long side exceeds --tile-size. Default off. | |
| force | No | Run the diffusion scrub even when no invisible AI watermark is locally detectable. Default: skip it (regeneration only degrades a clean image; a skip never claims the image is watermark-free -- this package has no local SynthID pixel decoder). | |
| preset | No | Cleaning preset: lossless-fast (metadata + fast visible), balanced (auto backend + verified signals), or deep-clean (full studio pixel/audio regeneration). | |
| vendor | No | Known AI generator cohort (image: openai, google, microsoft, meta; audio/video: google, elevenlabs, suno, udio, openai, cartesia, meta, resemble, microsoft). Naming the cohort asserts the invisible mark is present and runs the certified scrub even when provenance metadata was already stripped. | auto |
| backend | No | Fill backend for visible-mark removal (localize -> fill). auto: best available, LaMa > MI-GAN > cv2 (a learned backend needs the 'lama' or 'migan' extra; else cv2, with a warning). cv2: classical inpaint (no model download, smears texture). migan: MI-GAN ONNX (light, ~1 GB, the memory-tight pick). lama: big-LaMa ONNX (best quality, ~4.7 GB). | auto |
| unsharp | No | Unsharp-mask sharpening strength (0 = off, typical: 0.3-0.8). | |
| hf_token | No | Hugging Face API token. | |
| humanize | No | Analog Humanizer film grain intensity (0 = off, typical: 2.0-6.0). | |
| pipeline | No | Pipeline profile. qwen-zimage (DEFAULT, Apache-2.0) = Qwen-Image-2512 + Lightning + Canny, followed by SAM-masked Z-Image face repair; qwen21-zimage (NON-COMMERCIAL / PERSONAL & RESEARCH USE ONLY under the Qwen Research License) = Qwen-Image-2.1 + texture-fix VAE + Canny + the same Z-Image face stage; sdxl-zimage = the same recipe and the same face stage on an SDXL global pass, which needs more denoise; chroma-zimage = the same face stage on an Apache-2.0 Chroma1 global pass; auto = pick the commercial-safe engine from the provenance (sdxl-zimage for Google, chroma-zimage for Microsoft, qwen-zimage for OpenAI/Meta/unknown). All are CUDA-ONLY -- install the qwen-zimage extra. There is no CPU or MPS profile for invisible-watermark removal. | qwen-zimage |
| strength | No | Denoising strength (0.0-1.0). Default: profile-adaptive (qwen-zimage uses resolution-adaptive denoise, with flat OpenAI 0.15625 / Google 0.35 / Microsoft InvisMark 0.15 / Meta Content Seal 0.1 floors; qwen21-zimage uses the same curve and floors with OpenAI 0.2, local quality acceptance and Google 0.45; sdxl-zimage uses OpenAI 0.15 / Google 0.5 / unknown 0.5; chroma-zimage uses OpenAI 0.2 / Microsoft 0.125 / Google 0.5 / Meta 0.17, from the C2PA issuer). | |
| directory | Yes | directory | |
| tile_size | No | Tile dimension in px for --tile. Default 1024. | |
| output_dir | No | Output directory (default: <dir>_clean/). | |
| cpu_offload | No | Offload model components to CPU between CUDA calls instead of keeping the whole pipeline in VRAM, at the cost of speed. Forces the face stack to offload instead of using automatic residency, on every profile. It reaches the global stack of qwen-zimage, qwen21-zimage, and sdxl-zimage, which also stream theirs automatically on a card too small to hold it; chroma-zimage keeps its global stack resident either way. | |
| sensitivity | No | How hard to trust a borderline mark. auto: relax a mark only when metadata or a same-product sibling mark corroborates it (safe; clean images untouched). strict: high-precision visual gate only, never relaxed. To act on a mark YOU can see but the detector missed, use 'erase --region' or '--mark <name> --no-detect' rather than a blanket relaxation. | auto |
| tile_overlap | No | Overlap between adjacent tiles in px (feather-blended, no seam). Default 128. | |
| max_resolution | No | Cap long side (px) before diffusion; 0 = native and preserves the most detail. Raise only on GPU OOM. | |
| adaptive_polish | No | Restore the input's detail level after removal (capped unsharp + edge-masked grain targeting the input's sharpness, sparing text), countering the over-smoothed look. Unset follows the profile: ON for sdxl-zimage, OFF for qwen-zimage, whose upstream-matching output is left unchanged. It self-limits where there is no detail deficit (text/flat graphics). Independent of --unsharp/--humanize. | |
| controlnet_scale | No | Canny ControlNet conditioning scale on the global stage (structure/text preservation strength). Higher = closer to original structure. |