autoshade README

项目的 README,来自 github.com/skymanbp/autoshade。合并为一个 markdown 文件:README.md。

AutoShade icon

AutoShade

Describe the picture. Keep the RAW.

AI decides what to change — a deterministic Rust engine does it.
An editable, Lightroom-ready recipe instead of AI pixels.


Release Platforms Rust License

Download v1.19.0  ·  Website  ·  Manual  ·  Showcase  ·  In depth


Desert canyon at dusk: straight conversion, generated target, the recovered recipe rendered on the RAW, and the same recipe on the AI-denoised RAW, with a 1:1 detail row

Straight conversion → generated target → recovered recipe on the 61 MP RAW → same recipe after AI denoise. Bottom row: 1:1 crops.


[!TIP] The generated picture is a target, never the delivery. An image model paints the look you describe; AutoShade fits an editable develop recipe to it and renders that recipe on the full-resolution RAW. The recipe carries the look, the sensor carries the detail — and in the recipe path, the AI never touches a pixel.

Two AI paths, kept apart in the app, the command line and this page:


Highlights

🎯 Reverse-fit any look
reimagine generates the picture from your frame; match recovers a recipe from it — or from any finished rendition of the same shot. Look error 0.161 → 0.023.

🌌 A RAW denoiser trained here
Cleans the sensor mosaic before demosaic. Keeps 98.70 % of 17,817 faint stars on a real ISO 2500 frame.

📐 Every slider is a written law
Tone, Texture, Sharpening, masks and lens geometry are closed-form laws with named constants, each pinned by its own test.

🔁 Round-trips through Lightroom
An exported .xmp is merged byte for byte into Lightroom's own; the full develop survives a Lightroom rewrite and imports back exactly.

🖼️ Your library is the style guide
Point it at finished photos you love; each develop sees up to 3 that share its scene and light as references. Embeddings run locally.

🧩 Local AI masks, no API key
Subject, sky and point-prompted objects (BiRefNet, OneFormer, SAM 2.1), plus HDR, focus and noise stacking.

Showcase

Stone viaduct: straight conversion, generated target, and the recovered recipe rendered on the RAW, with a 1:1 detail row

Reverse-fit. Prompt: “a clearer afternoon, a little more contrast, a slightly deeper blue sky.” The recipe renders the look on the 9504 × 6336 RAW; the generated frame carries neither the detail nor the resolution.


Lakeside island town: straight conversion and three AI develops driven by three different direction texts

One RAW, four looks. Straight conversion, then moody, golden and vivid — only the direction text changes.


One 1:1 window of a 61 MP star field, two ways: AutoShade's neutral develop with no denoise and with its own denoiser at the 71 % default

ISO 2500 star field, 1:1. AutoShade with no denoise, then its own denoiser at 71 %. Clean colour, natural grain, faint stars intact.

Every number and prompt → Showcase

What is new here

Six techniques you will not find in another RAW developer. Each is written up in full — equations, figures, refused training runs — in AutoShade in depth.

Technique In one line
1 Generate, then reverse-fit An editable recipe from any finished look, solved at the distribution level
2 Evidence-gated local fit A divergence score D picks full solve or bounded mode; every local move must earn its place
3 Style by retrieval SigLIP 2 search over your own finished photos, not a preset
4 Every slider is a written law Tone, Texture, Sharpening, masks and lens geometry as closed-form laws, each pinned by its own test
5 A denoiser with pre-written pass marks Trained on this project's data; two later runs failed their marks and were refused
6 The camera's own look A per-photo base curve read from the embedded preview, like with like

How it works

AutoShade architecture: three front ends over one Rust library with the reference library, reverse-fit, local producers, the local-field analyzer and the two-photo blocks; local Python sidecars for embeddings, descriptions, correspondence, segmentation and two denoisers, plus the depth and face sidecars (eight in all); opt-in external AI services

Diagram generated from autoshade.architecture.json · zoom it online · full design in ARCHITECTURE.md · measurements in AutoShade in depth

Install and quickstart

Platform Get it
Windows AutoShade-Setup-1.19.0.exe — per-user, no admin. Or the portable autoshade-1.19.0-windows-x64.zip
macOS AutoShade-1.19.0-macos-universal.zip (Apple silicon + Intel), or -macos-cli.zip
Linux AutoShade-1.19.0-linux-x64.zip — command line only

All on the v1.19.0 release page. Python 3 is needed only for the local AI sidecars; model weights download on first use.

[!NOTE] macOS: the app is ad-hoc signed, not notarised — on first launch use System Settings → Privacy & Security → Open Anyway (once per machine).

Desktop app — pick a mode, open a photo (Ctrl+O), move a slider, export with Ctrl+Shift+E. The original is never touched.

Mode For
Landscape Everything: the full develop, masks and both AI paths
Portraits Everything, plus a panel for people, skin, eyes and the background
Normal A short one-click panel for phone and jpg photos
Workshop Say what you want; the AI does it with the app's own tools, and can combine two photos

Choosing a mode · Workshop mode · Two photos in the Workshop · Workshop modules

CLI

# manual develop
autoshade apply photo.ARW recipe.json -o developed.tif

# AI develop, end to end
autoshade auto photo.ARW --guidance "natural color; protect highlights" -o developed.tif

# describe a look, then recover it as an editable recipe on the RAW
autoshade reimagine photo.ARW --prompt "a clearer afternoon, deeper blue sky"
autoshade match photo.ARW out/photo.reimagine.png --render

# two photos of one scene: how well they line up, then the sky of the second put into the first
autoshade pair measure photo.ARW other.ARW --area sky
autoshade pair composite photo.ARW other.ARW --area sky

Upgrades, silent installs and every command: User manual.

Release assets and checksums

Built by GitHub Actions from the tag; checksums.txt carries every SHA-256. The RAW denoiser weights are uploaded by hand to the release the sidecar pins — releases/download/v1.6.0/autoshade-raw-denoise-v2.pth, mirrored byte-exact on Hugging Face — and refused unless size and SHA-256 match the pin in python/denoise_raw.py.

File Size SHA-256
autoshade.exe (CLI) 30,960,640 bytes 2a3d7467a479743eaf7eb300126f484cbd970dcc069d705ccfa492dcb9191cb9
autoshade-gui.exe (desktop app) 39,715,840 bytes 6852bd5f2fd3e2ecd15ad6bfa99ef9c74046e3343d9825838705e5d0664a1a39
AutoShade-Setup-1.19.0.exe (installer) 19,043,888 bytes a28b9a38ee1934ab32ee63c55d207519ebc470bb8d4c137a400c59d7daf45b52
autoshade-1.19.0-windows-x64.zip (portable archive) 26,449,762 bytes 97ebf42d6d7e8a3a46ea4aa8c826310feb2b203ce58dd0c6a15f6eb3eb23823a
AutoShade-1.19.0-macos-universal.zip (macOS app bundle) 52,399,917 bytes 793dbd4fcd90958ca6b471ae7355d69e8c5b6b69635027881a3aee76eee5daf7
AutoShade-1.19.0-linux-x64.zip (Linux command line only) 12,492,106 bytes 62d32515d3a41c3348498f64dee15aa1c766c1de490a655441ab5b04542f0657
AutoShade-1.19.0-macos-cli.zip (macOS command line only) 22,869,615 bytes e8d7c92742be75fd1baaf4fe950485d5abf72e12a69cdc21c606daecfb5ca71c
autoshade-raw-denoise-v2.pth (RAW denoiser weights, fetched on demand from the v1.6.0 release) 130,590,559 bytes ffafa40a53f52092149db2fcf03636117ad6855e1068142d4f6b03b634e9f9c4
Build from source

Rust edition 2024, rustc/cargo 1.94.

cargo build --release                                   # CLI
cargo build --release --features gui --bin autoshade-gui  # desktop app

Local AI tools need Python packages (weights download on first use):

Tool Packages
Subject mask (BiRefNet) torchvision timm einops
Subject fallback (U²-Net) rembg
Sky / objects (OneFormer, SAM 2.1) transformers torch
AI denoise torch opencv-python numpy einops requests

Supported formats

Canon CR2 develop
.cr2 · Canon EOS 40D
Canon CR3 develop
.cr3 · Canon EOS R6
Nikon NEF develop
.nef · Nikon D700
Sony ARW develop
.arw · Sony α7 III
Olympus ORF develop
.orf · Olympus E-M5
Panasonic RW2 develop
.rw2 · Panasonic DMC-GX85
Pentax PEF develop
.pef · Pentax K-5
Ricoh DNG develop
.dng · Ricoh GR II
Fujifilm RAF X-Trans develop
.raf · Fujifilm X-S10 — X-Trans, approximate

Nine real CC0 files, fully decoded and neutral-rendered — not embedded previews.

Camera RAW — 24 extensions

arw, dng, raw, raf, nef, cr2, cr3, orf, rw2, pef, srw, 3fr,
fff, iiq, mef, mos, erf, kdc, dcr, dcs, crw, nrw, mrw, ari

Decoded by rawler 0.7.2, which carries 725 camera models. No embedded preview: 12 of the 24 formats store none. They are orf, srw, nrw, mef, mos, kdc, dcr, dcs, erf, iiq, crw, and ari; AutoShade renders its own neutral version instead.

Baked rasters — 8 extensions: jpg jpeg png tif tiff bmp webp gif, with ICC conversion.

Tech stack

Rust (rustc/cargo 1.94, edition 2024) · rawler · image · qcms · rayon · egui/eframe · tiny_http — Python sidecars on PyTorch.

RAW decode, 24 formats, 725 bodies · deterministic f32 develop engine · hand-rolled XMP layer (no XML crate) for byte-exact Lightroom merges. Per-subsystem notes: In depth → Implementation · equations and provenance: TECH_STACK.md.

Status and limitations

License

MIT — see LICENSE. Showcase photographs © 2026 skymanbp, all rights reserved (not MIT).

Models, fonts and samples

Model weights download separately and remain their authors' property; every pinned model also has a byte-exact mirror on Hugging Face (Azng0/autoshade-mirror-*), checksum-verified either way — table in python/_mirror.py.

Model Purpose License
SCUNet AI denoise (baked sources) Apache-2.0
DRUNet-colour (DPIR), fine-tuned here as autoshade-raw-denoise-v2.pth AI denoise (RAW mosaic) MIT; fine-tuning pairs from RawNIND, CC BY-SA 4.0
BiRefNet Subject segmentation MIT
U²-Net Subject fallback Apache-2.0
OneFormer ADE20K Sky segmentation MIT
SAM 2.1 Point-prompted object masks Apache-2.0
MoGe-2 ViT-L (code in python/_moge/) AI lens blur depth map MIT (DINOv2 backbone code Apache-2.0)
MediaPipe Face Landmarker (BlazeFace + Face Mesh V2) Portraits mode face and eye outlines Apache-2.0
SigLIP 2 Style embeddings Apache-2.0
Qwen3-VL-2B-Instruct Local look descriptions Apache-2.0
Stable Diffusion 2.1 DIFT correspondence field CreativeML Open RAIL++-M

Fonts: subset Noto faces (SIL OFL) and a Lucide icon face (ISC) — texts in assets/fonts/. RAW samples: the nine format-grid files are from raw.pixls.us under CC0 1.0, SHA-256-verified.

Thanks to the rawler, image, qcms, rayon, clap, serde, ureq, egui/eframe, tiny_http and local-model communities.


Made for photographers who want to know what the AI changed — in numbers.

autoshade (skymanbp/autoshade)

正在搜索数据库…

这是什么东西?AutoShade 是一款 AI 辅助的 RAW 照片修图工具:你描述想要的效果,GPT 风格的视觉分析步骤会提出一套调整方案,然后由确定性的 Rust 引擎把这套方案渲染到全分辨率的 RAW 文件上——生成与 Lightroom 兼容的 XMP sidecar 文件,而不是用 AI 生成像素。
AI 是真的生成我最终的照片,还是只是辅助修图?AI 只负责生成一张参考目标图或读取你的提示词,绝不会碰最终输出的像素。AutoShade 会根据这张目标图拟合出一份可编辑的修图方案,并渲染到你原始的 RAW 文件上,因此细节都来自传感器数据。
我怎么把它跑起来?从 v1.9.0 发布页面下载适合你平台的预编译版本:Windows 安装包或便携 zip、macOS 通用应用包或仅含 CLI 的 zip,或 Linux x64 CLI zip;然后在桌面应用里打开一张照片(Ctrl+O),进行调整,再导出(Ctrl+Shift+E)。
使用它需要 Python 或 API 密钥吗?只有本地的 AI sidecar 功能(蒙版、降噪、嵌入向量、描述)才需要 Python 3;模型权重会在首次使用时自动下载,而且一切都在本地运行,不需要任何 API 密钥。
安装上有什么坑,或者哪些平台不支持?macOS 版本只做了 ad-hoc 签名,没有经过公证(notarised),首次启动时需要在系统设置里手动允许运行;另外没有经过公证的 macOS 版本,Linux 上没有桌面图形界面(只有 CLI),X-Trans RAW 去马赛克和与 Adobe 完全逐位一致的渲染也明确不在支持范围内。
它支持哪些操作系统和界面?它提供桌面应用、CLI 和本地回环的 Web 界面三种形态,共享同一个 Rust 库,支持 Windows、macOS(Apple 芯片和 Intel)以及 Linux(Linux 上只有 CLI)。
我的照片库或像素数据会离开我的电脑吗?你的照片库始终保存在本地且只读;只有当你主动触发需要远程调用的 AI 操作时,像素数据才会离开你的电脑,其余所有嵌入向量和蒙版计算都在本地完成。
支持哪些 RAW 格式和相机?它通过 rawler 库解码 725 个相机机型的 24 种 RAW 扩展名(例如 CR2、CR3、NEF、ARW、ORF、RW2、PEF、DNG、RAF),另外还支持 JPG、PNG、TIFF 等 8 种已烘焙的位图格式,并带 ICC 色彩转换。
与 Lightroom 的兼容性有多准确?AutoShade 直接实测过一致性:Texture 锚点在 45/45 个点上误差都在 ±0.02 以内,径向蒙版在 41/41 个点上误差都在 1px 以内,生成的 XMP sidecar 可以逐字节合并,因此修改在 Lightroom 重写并重新打开文件后能完全保留。
除了生成风格,本地 AI 还能做什么?本地 sidecar 提供主体/天空/点选提示的物体分割(BiRefNet、OneFormer、SAM 2.1)、一个专门训练的 RAW 降噪器(对微弱星点的保留率达 98.70%,Lightroom 为 98.80%)、HDR/对焦/降噪堆栈,以及基于 SigLIP 2 嵌入向量在你自己的照片库中做风格检索。
为什么要自己训练 RAW 降噪器,而不用 Lightroom 的?作者专门用这个项目的数据训练了降噪器,并预先写好了合格标准;后来两次训练都没达标而被弃用,只有一次达到标准的训练最终发布,在星空测试上做到了与 Lightroom Denoise 接近的水平。
作者
skymanbp
大小
26.9 MB
星标
1.1K
时长
5个月
提交 · 90 天