Repository navigation
Dev AI Edit XMP Findings
Status: research done 2026-09-26; step 1 in progress (1d/1f changed AI Edit's style path); first experiment results 2026-10-03 (one non-raw photo, below). The page records what Camera Raw's XMP (
crs:) can express, how that maps onto the Lightroom SDK, and which questions only Lightroom itself can answer. Those questions are what Help → Plug-in Extras → Developer: Run Develop-Settings Experiments… runs (see below). If the XMP idea comes back, start here rather than re-running the investigation.Work has started: the first building blocks, a native model of Lightroom's develop settings (key registry, typed model, readers for the Lua form and for XMP), are the
lrg-developcrate. The XMP reader parses Lightroom's bundled presets and the current state of that sidecar corpus with no unknown key (counts and method in Native Develop Model). The crate also writes develop presets and builds semantic, gradient and luminance-range corrections (Writing XMP presets, Building corrections). Rebuilt with those builders, Adobe's adaptive presets match Adobe's corrections field for field once both go through the preset writer (names and sync ids apart); see Native Develop Model for the fields the writer holds back (LocalHue, LocalGrain, point colour, digests) and the lowerCompatibleVersionin 10 of 38. Nothing calls the preset writer yet; AI Edit's style path already uses the crate (white balance in 1d, more sliders in 1f — see Native Develop Model).
AI Edit applies a recipe of global sliders through photo:applyDevelopSettings
and adds masks through LrDevelopController UI automation. The proposal was to
write .xmp develop settings instead, so AI Edit could use every develop
feature. There were three ways to deliver them: the current pipeline, a develop
preset, or an XMP per photo. The concern that came with it: the image AI Edit
analyses is a downscaled, cropped export, so mask coordinates predicted on it do
not match the full-size photo.
-
XMP is the right data model, but usually not the right transport. The
crs:key space is the same tablephoto:getDevelopSettings()returns andapplyDevelopSettings()/addDevelopPresetForPlugin()accept. That includes masks, asMaskGroupBasedCorrections → CorrectionMasks. The mapping is mechanical:- drop the
crs:prefix -
rdf:Seqbecomes an array, a nestedrdf:Descriptionbecomes a table - point curves become flat number arrays
- drop the
-
What AI Edit lacks is in its recipe schema, not in the SDK. Missing today:
the full colour grading, profiles as a
Look, B&W mix, calibration, lens profile, lens blur, every AI mask type (people parts, landscape classes), linear/radial/range masks. This is proven for the global sliders. New masks written through the SDK are so far shown only by third-party plugins; a new AI mask throughapplyDevelopSettingsis what E2 tests, and on Lightroom 15.6 it works oncephoto:updateAISettings()follows (one non-raw photo, Results). - The resolution concern disappears for semantic AI masks. Subject, sky, background, people parts and landscape classes are stored without geometry. Lightroom computes them itself at about 2880 px.
- The frame of reference is the real problem. Geometric masks and the crop live in a different frame from the export. The mapping is exact and computable, except under lens warp and Upright.
-
The training data already holds masks. 497 of 1,294 stored training
examples carry the full
getDevelopSettings()table with masks, so a style engine could learn masks from the user's own edits without anyone re-saving. Masks are also the norm in real edits: on the corpus below, 83 % of photos edited in 2026 have one, and across all years 79 % of masked photos use a subject mask.
- The 1,045 presets bundled with Lightroom Classic 15.5.1, 38 of them Adobe "Adaptive" presets with AI masks.
- A corpus of 12,338 edited photos: LrC sidecars written by LrC 10.2–15.5.1, Canon 3:2 sensors, one photographer.
- A read-only copy of that catalog:
Adobe_imageDevelopSettings,croppedWidth/Heightand orientation. - The Lightroom Classic SDK 15.3 API reference.
- Third-party plugins that write masks: jasondentler/photo-workflow-mcp and Wyyyyuu/lightroom-style.
- darktable's
src/develop/lightroom.c, ExifTool'scrstag table, and Adobe community threads.
crs:MaskGroupBasedCorrections rdf:Seq — one entry per mask in the Masks panel
What="Correction", CorrectionAmount (1 = 100 %, 0..2), CorrectionActive,
CorrectionName, CorrectionSyncID (32 hex), Local* sliders
crs:CorrectionMasks rdf:Seq — the mask's components, applied in order
What, MaskActive, MaskName, MaskBlendMode, MaskInverted, MaskSyncID, MaskValue, ...
| Encoding | Meaning |
|---|---|
MaskBlendMode=0 |
add |
MaskBlendMode=1 + MaskValue=0
|
subtract |
MaskBlendMode=1 + MaskInverted=true
|
intersect (A ∩ B = A − ¬B; 105 corpus cases) |
For a radial gradient, Flipped is always !MaskInverted. For a range mask,
CorrectionRangeMask.Invert is always equal to MaskInverted (every range
mask in the sidecar corpus, luminance and colour, intersections included), so
an intersected luminance range carries Invert="true"; the builders set both
mirrors themselves.
| Class | What |
Depends on frame/resolution? |
|---|---|---|
| Semantic AI |
Mask/Image + MaskSubType / MaskSubCategoryID
|
No. Only the intent is stored; Lightroom recomputes it. This is the only kind Adobe's presets contain. |
| Select Object |
Mask/Image subtype 0 + crs:Gesture (a 4-point polygon or brush strokes) |
The hint geometry is frame-dependent; Lightroom refines it. |
| Geometric |
Mask/Gradient (ZeroX/Y, FullX/Y), Mask/CircularGradient (Top/Left/Bottom/Right, Angle, Feather) |
Frame-dependent, see below. |
| Brush |
Mask/Aggregate → Mask/Paint (Dabs: d x y, M x y, r R, f F) |
Frame-dependent. Strokes sometimes live only in .acr / the catalog (MaskBrushTable). |
| Range |
Mask/RangeMask + CorrectionRangeMask (Type 2 = luminance LumRange, 1 = colour) |
Luminance: no. Colour: photo-specific samples. |
Computed AI mask bitmaps never live in modern XMP. They sit in a sibling
<basename>.acr (8-bit TIFF, JPEG-XL) keyed by MaskDigest, or in the catalog's
.lrcat-data. They cannot be written by us.
| SubType | Category | Meaning | Evidence |
|---|---|---|---|
| 1 | – | Subject | Adobe presets + 5,149 corpus masks |
| 2 | – | Sky | Adobe presets + corpus |
| 0 | 22 | Background | corpus (603), user presets; not in Adobe presets |
| 0 | – + Gesture
|
Select Object | corpus (99) |
| 3 | 2–9, 11, 12 | People part, preset form (reportedly all people, unconfirmed) | every Adobe portrait preset |
| 0 | 2–9, 11, 12 | People part of one specific person (created in the UI) | corpus |
| 0 | 50001–50008 | Landscape classes | Adobe landscape presets |
| 0 | 20036 | Whole person | 4 corpus masks, meaning unconfirmed |
People-part categories:
| Id | Part |
|---|---|
| 2 | Face skin |
| 3 | Iris & pupil |
| 4 | Body skin |
| 5 | Hair |
| 6 | Lips |
| 7 | Facial hair |
| 8 | Sclera |
| 9 | Eyebrows |
| 11 | Clothes |
| 12 | Teeth |
Landscape categories:
| Id | Class |
|---|---|
| 50001 | Architecture |
| 50002 | Mountains |
| 50003 | Artificial ground |
| 50004 | Natural ground |
| 50005 | Vegetation |
| 50006 | Sky (≠ subtype 2) |
| 50007 | Water |
| 50008 | Snow |
-
LocalExposure2012is stored as EV/4: ±1 means ±4 EV. - The other signed sliders are UI/100:
Contrast2012,Highlights2012,Shadows2012,Whites2012,Blacks2012,Clarity2012,Dehaze,Texture,Saturation,Temperature,Tint,Sharpness. -
LocalToningHueis in degrees. - The tone keys carry
2012.LocalTemperature,LocalTint,LocalTexture,LocalDehazeandLocalSaturationdo not.
A preset-safe AI mask looks like Adobe's own: the definition only, with
ReferencePoint="0.500000 0.500000", ErrorReason="0", and none of MaskDigest,
InputDigest, FullMaskSize, WholeImageArea, Origin, CorrectionID, MaskID.
Verified on the corpus and the catalog:
-
Every geometric value lives in one frame. This covers crop, gradients,
radial, brush dabs, AI
ReferencePoints and even LrC's ownmwg-rsface regions. The frame is the uncropped image in sensor orientation (beforetiff:Orientation), normalised per axis (x/W, y/H). A pixel circle is therefore a normalised ellipse.-
croppedWidth = (R−L)·W_sensorholds for orientation 8 in 123/123 cases, for orientation 6 in 10/10 and for orientation 1 in 271/271. The display-frame hypothesis never matches.
-
-
The crop is a rotated rectangle.
CropLeft/TopandCropRight/Bottomare opposite corners of a rectangle rotated by +CropAnglein sensor pixel space. This reproduces the catalog's cropped size to ≤2.5 px on 570/570 angled crops. -
Brush
Radiusis normalised by the sensor width, which is the long side for every camera in the corpus. Dabs are spaced at 0.30 × radius. - AI mask canvases are always about 2880×1920 in sensor orientation, independent of the crop and of the size of any export.
The AI Edit export is none of that. It is rendered (default 3072 px long edge,
Defaults.lua) after lens correction, Upright, crop, crop angle and
orientation. Today the plugin sends the backend no dimensions, crop or
orientation.
Export pixel → XMP mask coordinate (without warp), given the develop
settings CropLeft/Top/Right/Bottom = L/T/R/B, CropAngle = θ, orientation and
sensor-oriented W, H:
-
Normalise the export pixel:
x = (i+0.5)/w_export,y = (j+0.5)/h_export. -
Undo the orientation to get crop-local
(u, v):Orientation (u, v)1 (x, y)3 (1−x, 1−y)6 (y, 1−x)8 (1−y, x)Mirrored orientations flip the sense of θ; they are untested.
-
Compute the crop rectangle in sensor pixels:
-
Δx = (R−L)·W,Δy = (B−T)·H -
w_c = cos θ·Δx + sin θ·Δy,h_c = −sin θ·Δx + cos θ·Δy
-
-
Place the point:
P = (L·W, T·H) + u·w_c·(cos θ, sin θ) + v·h_c·(−sin θ, cos θ). -
The mask coordinate is
(P.x / W, P.y / H).
Lengths scale uniformly by w_c / w_export. With an active lens profile the
residual is a few pixels. With Upright or manual transforms it is unknown, so
geometric masks should not be generated there.
Strategy:
- Prefer semantic AI masks. They are resolution-independent and the only preset-safe kind.
- Per photo only: object boxes, people
ReferencePoints, and gradient/radial masks through the mapping above. - Never generate brush strokes.
- Never put geometry or a crop into a shared preset.
| Path | Coverage | Batch | Undo | Catalog safety | Verdict |
|---|---|---|---|---|---|
photo:applyDevelopSettings(tbl, name, flattenAuto) |
all flat keys; new gradient/radial/brush/range masks proven by third-party plugins; new AI masks work when followed by photo:updateAISettings() (E2, LrC 15.6, one non-raw photo) |
one write gate, no module switch | one step | good | primary path, AI masks included |
LrApplication.addDevelopPresetForPlugin + applyDevelopPreset(p, _PLUGIN, amount, updateAI) (updateAI: 15.3+) |
same table; AI masks incl. sub-categories proven by photo-workflow-mcp; in LrC 15.6 the preset's masks replace the photo's, updateAI = true left the preset's sky mask pending for 60 s, and the amount changed nothing (E4c, E4e) |
AI compute per photo | one step | hidden presets, no delete API; deleting the file right after applying keeps the edit within the session (E4f) | not needed for AI masks |
.xmp preset file |
full XMP incl. SupportsAmount flags |
no SDK import; the user imports via Presets → Import (visible immediately), a file dropped into the folder needs a restart | – | LrC normalises on import and silently drops invalid keys | export artifact, not an apply path |
.xmp sidecar + Read Metadata from Files
|
full XMP |
no documented SDK call; undocumented photo:readMetadata() is unverified |
replaces all metadata | auto-write-XMP can clobber the file; JPEG/DNG means rewriting originals; virtual copies have no XMP | expert export only |
LrDevelopController (today) |
AI types without sub-category or geometry | module switch, sleeps | many steps | ok | fallback for LrC < 15.3 |
"Write an .xmp preset, import it, apply it, delete it" has no SDK form as
such: there is no call to import a preset file and none to delete a preset.
Its programmatic equivalent is the plugin-preset row:
addDevelopPresetForPlugin writes the preset file, applyDevelopPreset
applies it, and LrFileUtils.delete removes the file at the path
preset:getFile() returns. Whether the edit survives that, and what Lightroom
still lists until a restart, is E4f.
- AI Edit writes and trains on the develop key
Temp, which occurs in 0 of 17,814 catalog rows. The real keys areTemperature/Tint(raw) andIncrementalTemperature/IncrementalTint(non-raw). White balance is most likely never learnt and never applied. E1 confirmed it on a non-raw photo (LrC 15.6):{Temp}is accepted without an error and changes nothing, and next toWhiteBalance = "Custom"only the mode changes (E1a, E1d). Fixed in AI Edit (step 1, PR 1d): the style engine now reads the white balance typed from the real keys and sends it asedit.white_balance(see Dev-Develop-Model andPOST /v1/edit/stylein Dev-Backend-API); only the develop experiments still writeTemp, on purpose. - The dormant LLM path has several problems:
-
EnableLensCorrections(the panel toggle) is written where the profile toggleLensProfileEnableis meant. - The profile is written as
CameraProfile="Adobe Color". In current Lightroom that is aLookon top ofCameraProfile="Adobe Standard". Importing an.xmppreset silently drops that value (verified); thatapplyDevelopSettingsdoes the same is likely but unverified. E11 tests the correct form, aLookon top of anAdobe Standardbase profile. - The crop maths assumes the export frame.
-
- Reported by the research, not yet reproduced: the mask fallback in
DevelopEditManagerwrites aCorrectionsub-table withlocal_*keys in UI units. That shape does not exist, so the fallback is a no-op that reports success.
-
Apply directly (replaces today's pipeline). Apply the full native table
through
applyDevelopSettingsin one write gate and one history step. AI masks go in the same table, followed byphoto:updateAISettings(): E2 shows that works (LrC 15.6), and the plugin-preset route replaces the photo's masks (E4c). UI automation stays only for LrC < 15.3. -
As preset. The backend renders an
.xmppreset containing only semantic masks, with no crop, geometry or lens identity. The user imports it through the Presets panel. It is shareable and gets the amount slider. - XMP per photo. Only as an explicit "export a sidecar for ACR or other tools" for raw masters, with warnings, because of the metadata replacement and auto-write clobbering above.
Wherever the XMP is produced, it should come from one native-table model in the
backend. That model needs a whitelist with ranges, a mask builder, and a
denylist: FilterList, RetouchAreas, digests, CorrectionID/MaskID,
Crop* in presets, and camera-specific looks.
Help → Plug-in Extras → Developer: Run Develop-Settings Experiments…
(TaskDevelopExperiments.lua; the pure helpers are in DevelopExperiments.lua).
Use a throwaway test catalog.
-
Import copies of three or four photos (the task takes at most four):
- a raw rotated in camera (portrait) whose crop is straightened or changes the aspect ratio. Without that, E13 can only answer "ambiguous";
- a raw that shows a person and sky. The sky and hair masks in E2 find nothing on other photos;
- optionally a raw with strong lens distortion;
- a JPEG.
E13's full readback gives Lightroom's defaults only for photos without develop edits (its verdict says which photos have edits), so leave at least one raw and the JPEG untouched after import, with Raw Defaults set to Adobe Default. E11 needs a raw. No develop preset is needed: E11b takes its complete
Lookfrom a photo, best from a second raw with a different profile. Lightroom's bundled presets carry Looks only as stubs (Stubbed="true", noParameters), so they cannot supply one. -
Turn Automatically write changes into XMP off in that catalog.
-
Select the photos, then run the task from any module. It switches to the Library module on purpose, because E2 asks whether masks can be added outside Develop.
| Id | Question | What it does |
|---|---|---|
| E13 | Which orientation do getRawMetadata('dimensions') / 'croppedDimensions' use, and what does orientation look like? What does a photo's full develop-settings table hold? |
Read-only. Logs metadata, the full list of raw-metadata keys, and the develop settings. Fits the crop model under every width/height interpretation, and says "ambiguous" when two interpretations fit equally. Also records every top-level getDevelopSettings() key: scalars verbatim, tables by shape (small all-scalar tables such as tone curves with their values), Look as name/UUID/amount plus whether Parameters exist, masks as in E2. Whether the photo has develop edits comes from Lightroom's own Has Adjustments search (narrowed to the file name, and trusted only when the name search finds the photo), plus editCount and lastEditTime. On an unedited raw and JPEG this is Lightroom's raw and non-raw default table; the verdict says "has develop edits - not a default table" when it is not, and names the white-balance family. The full dump is in the JSON. |
| E1 | Does applyDevelopSettings accept Temp? Does a white-balance mode on its own make Lightroom recompute temperature and tint? |
Uses a fresh virtual copy per variant (LrG Exp E1a … E1g), so each starts from the master's white balance, and diffs the white-balance keys. Raw: {Temp}, {Temperature}, {WhiteBalance="Custom", Temperature, Tint}, {WhiteBalance="Custom", Temp}, then mode only: {WhiteBalance="Daylight"}, {WhiteBalance="Auto"} and {WhiteBalance="Auto"} with optFlattenAutoNow=true. Non-raw: {Temp}, {IncrementalTemperature/Tint}, {Temperature}, {WhiteBalance="Custom", Temp} and the two Auto variants (non-raw files have no Daylight). The Custom+Temp variant keeps a no-op under "As Shot" from being read as a rejected key. Each mode-only copy is first put on a distinctive Custom white balance in its own history step (raw Temperature=3000, Tint=40; non-raw IncrementalTemperature=-40, IncrementalTint=40), so a recomputation always shows as a change. After the mode is written, the copy is read back right away and then every 0.5 s for up to 15 s, stopping at the first change of Temperature/Tint (raw) or IncrementalTemperature/IncrementalTint (non-raw). The verdict says "recomputed ... after N s" or "not recomputed within N s". A flattened Auto that reads back as Custom with new values is reported as flattened, not as a rejected mode. Raw or not is decided by the photo's white-balance family, so a DNG converted from a JPEG counts as non-raw. |
| E11 | Does an Adobe Raw profile Look transfer through applyDevelopSettings, and in which form? |
Raw photos only. Non-raw photos get a "skipped" verdict: E11 tests Adobe Raw Looks, which need a raw file, and creative Looks on non-raw files are not tested. The base profile is the master's when it is an Adobe Standard variant (e.g. Adobe Standard v2), otherwise Adobe Standard, so only the Look changes. LrG Exp E11a: a stub in the form Lightroom's presets carry it, {Name, UUID, Amount=1, Stubbed=true}, using the first of Adobe Vivid, Adobe Landscape and Adobe Color whose name differs from the photo's current Look. LrG Exp E11c: the same stub without Stubbed, so the difference between the two forms is visible. LrG Exp E11b: a complete Look with Parameters, taken at run time from, in this order: another selected photo's Look (not an Adobe Adaptive Look, and a camera-restricted Look only from a photo of the same camera model); the Look the E11a copy read back, if Lightroom filled in the stub; the photo's own Look, written onto a copy that was first switched to a stubbed different Look in an LrGenius E11b prepare step (inconclusive if that switch did not take); and, as a last resort, an installed develop preset whose Look has Parameters. The source goes into the step data. Nothing of a Look is stored in the plugin or the report beyond name, UUID, flags and key counts. Reads back CameraProfile, Look.Name, Look.UUID and whether Parameters exist, and says honoured / ignored / changed / error. If the preset scan runs, presets it could not read are counted and named in the skip reason, and a scan in which every read failed is a failed step. |
| E2 | Can applyDevelopSettings add a new AI mask, when is it computed, and how long does it take? |
On an LrG Exp E2 copy: adds a subject mask (+1 EV), then waits up to 30 s for Lightroom to compute it unasked. The first detection in a session loads the model, so a short wait would be misleading. If nothing happened, calls photo:updateAISettings() and polls for up to 60 s for MaskDigest / ErrorReason, recording needsUpdateAISettings and isAvailableForEditing along the way. The E2c verdict and step data carry how long the updateAISettings() call itself took, any wait for write access before it, and how long from the start of the call until the mask reached a final state. The time is marked as a lower bound when Lightroom was already computing: the photo was locked before the update could start, or at some point during the unasked wait. A correction whose AI tool disappears is reported as such and is not counted as a ready mask. A run-level line lists the timings per photo and marks the first measured photo, whose time may include loading the model. Then adds sky, background and hair masks in one call, updates once and polls each. "Computed, nothing found" means the definition was accepted but the photo has no such content. |
| E4 | How do plugin presets behave, and are preset masks merged with or replacing the photo's? | Adds a preset twice under one name with different content, and records the uuid, file path, file contents and preset count. On an LrG Exp E4 copy it first seeds a linear gradient via applyDevelopSettings, then applies the preset with updateAI=true; whether the gradient survives answers merge vs replace. It applies the preset again and counts the corrections carrying its sync id. Then it applies two amount presets, one without and one with the SupportsAmount flags, at 50 and 200, and reads back the before and after values. Last, E4f: creates "LrGenius Experiment E4f" (Contrast2012=25 plus a subject mask), applies it with updateAI=true to an LrG Exp E4f copy and reads it back, then deletes the file preset:getFile() reports with LrFileUtils.delete. It deletes only a file (never a directory) whose name is the preset's name, alone or followed by a suffix starting with a non-alphanumeric character ("E4f 2"), that is not another E4 preset's file, and that sits next to the other E4 preset files or inside a Plugin Develop Presets folder (DevelopExperiments.presetFileDeletable); anything else is refused and reported. After the delete it records whether getDevelopPresetsForPlugin still lists the preset (by name and uuid), whether preset:getSetting() still works, whether the first copy kept its contrast and mask, and whether applying the deleted preset object to a second copy (LrG Exp E4f after delete) works, fails or does nothing. It then re-adds the same name, records whether and where a file appears, and deletes that file too. Before the add it records every preset of that name already listed, with whether its file exists. After the re-add it also records whether the new preset holds the new settings (Contrast2012=15) or the deleted one's, and how many presets of that name are listed. The verdict says whether "apply then delete" is viable within the session, judged only on what the apply changed: a preset with no visible effect is inconclusive, and a subject mask that was still pending at the delete limits the verdict to the settings. Restart behaviour is a manual check: plugin presets never appear in the Develop presets panel, so it looks in the Plugin Develop Presets folder; running E4 again after the restart reports the presets of that name still listed, split into "file missing" (kept somewhere other than the file), "file present" (left over, or written back at quit) and none. The final dialog always shows the E4f outcome, past the per-experiment cap. |
Output.
- A Markdown report plus the same data as JSON next to it, written where you
choose. If a
.jsonof that name already exists, a numbered name is used instead; the final dialog shows both paths. The report holds the verdicts, a checklist of things the SDK cannot read back (history step names, what a mask covers, AI progress dialogs), and every step's raw readback. Long step data (E13's full develop-settings readback) is cut off in the Markdown; the JSON has it in full. - A failed step is recorded, not hidden. An error is often the answer itself
(e.g.
Temprejected).
Cleanup.
- Delete the
LrG Exp …virtual copies (E1a–E1g, E11a–E11c, E2, E4, the E4 amount copies, and E4f'sLrG Exp E4fandLrG Exp E4f after delete). - E4's plugin presets ("LrGenius Experiment E4", "… E4 Amount", "… E4 Amount Flagged") cannot be deleted through the SDK. They are files in Lightroom's preset folder, outside the catalog and shared by every catalog, so deleting the test catalog does not remove them. Their paths are in the final dialog and in the report header; delete those files by hand. A later run records how many presets of that name already existed.
- E4f deletes its own preset files. The list in the final dialog and the report header holds only files that still exist, so an E4f file shows up there only when E4f stopped before deleting it (no virtual copy, the photo stayed locked, the apply or its readback failed, or the run was canceled), when the delete failed or was refused, or when applying the deleted preset wrote the file back.
The Lua writer (lrg_develop::lua::write, PR 1g) represents every
alternative E1, E2, E4 and E11 measure as a LuaOptions switch and decides
none of them; the defaults are LuaOptions::PROVISIONAL and how far the
evidence carries each is LuaOptions::EVIDENCE. Which field each
experiment bears on, the evidence, what is still open, each field's status
and the steps after a run are in one table:
Dev: Native Develop Model — Options and what decides them.
Read its "Still open" column before marking a field settled: for several
fields the experiments apply only one form, so a working run confirms it
without measuring the alternative, and one field (int_flag_as) no
experiment touches at all. The first run's answers are in
Results.
The plugin spec plugin/spec/native_wire_format_spec.lua checks the
goldens only for rules that hold whatever the experiments answer and
accepts both forms of each provisional encoding, and the Rust tests check
every single flip, so flipping a field needs a re-bless, not a test change
(Wire goldens).
Write-side forms the experiments as built do not measure (the Lua writer
holds each as a LuaOptions alternative; see the table linked above):
- Whether the 0/1 flag keys (
LensProfileEnable,AutoLateralCA,CropConstrainToWarp,HDREditMode) take booleans, or need numbers: no experiment writes one (int_flag_as). Cheap evidence: read back photos the LLM path already appliedAutoLateralCAto as a boolean. - Mask enums as numeric strings (
mask_enum_as = String): E2/E4 write numbers only. - A mask correction without
EnableMaskGroupBasedCorrections(panel_switches = None; the default is nowMaskOnly, the form E2 applied): applied by no experiment; the first run cannot tell it fromMaskOnly, because the switch was already on in the source photo (E13). Every other panel switch (PANEL_SWITCHES) is unverified. - A correction with only its own
Local*keys (local_form = Sparse), an AI mask withoutMaskVersion/ReferencePoint/ErrorReason(mask_form = Minimal), and any luminance range applied throughapplyDevelopSettings. - A non-raw
{WhiteBalance = "Custom", IncrementalTemperature, IncrementalTint}(wb_custom_with_numberson non-raw files), and a named mode other thanDaylight/Autoalone (wb_mode_only). - A camera-restricted or an Adobe Adaptive
Look, and whether an adaptive one computes itsAILookafterupdateAISettings(). - Applying a wire golden unchanged (decoded with JSON.lua): the experiments apply hand-built tables, never the writer's own output. Needed before the goldens are frozen.
Other open questions:
-
CircularGradient.Angleconvention and the direction ofZerovsFull. - Whether masks sit before or after lens correction and Upright.
- Mirrored orientations and non-3:2 sensors.
- Whether a digest-less AI mask in a sidecar is recomputed on Read Metadata.
- Whether LrC accepts a self-built Denoise
Table_blob. - Import normalisation of generated
.xmppresets. - Whether subtype-3 people parts apply to every person in the photo.
One run of the experiments on Lightroom Classic 15.6 in a test catalog,
run from the Library module, with one photo: a non-raw TIFF (a
virtual copy without develop edits, process version 15.4). No raw file was
in the run, so everything raw-only (E1e, E11) did not run. E2's people-part
mask ended with ErrorReason 1 (nothing found); the report does not say
whether the photo shows a person. Every answer below is about one non-raw
photo on 15.6, read back within seconds in the Library module: Lightroom may
resolve Auto white balance or compute AI masks only when Develop renders the
photo. The manual checks of the report (history step names, the white
balance in the Basic panel, what the masks cover, the AI progress dialog,
the look of the amount copies, E4f after a restart, a freshly imported raw
and JPEG for the default tables) are not answered yet.
| Experiment | Result | Settles | Stays open |
|---|---|---|---|
| E13 (frame) |
orientation = "AB"; the crop model fits with 0 px error, under the reported and the swapped frame alike (a landscape photo without a crop) |
nothing about the frame | a portrait raw with a straightened crop |
| E13 (readback) | 172 top-level keys, editCount 0, Has Adjustments false: the non-raw default table as one photo (a virtual copy of a TIFF) carries it. E.g. Sharpness 0 (raw 40), SharpenRadius 1, SharpenDetail 25, SharpenEdgeMasking 0, LuminanceSmoothing 0, ColorNoiseReduction 0 (raw 25) with Detail/Smoothness 50, CameraProfile "Embedded", ToneCurveName2012 "Linear", WhiteBalance "As Shot", IncrementalTemperature/IncrementalTint 0, no Temperature key |
the registry's non-raw defaults for the keys it read (145 rows; HDRMaxValue 2.3 held back as possibly per image; Native Develop Model) |
keys absent from the readback (absence can mean "written only when used"); the report's own check of a freshly imported JPEG and raw for the default tables |
| E1a |
{Temp = 20} accepted, nothing changed |
Temp is silently ignored, not rejected |
— |
| E1b |
{IncrementalTemperature = 21, IncrementalTint = 11} without a mode: both stored, WhiteBalance stays "As Shot" |
numbers alone leave the mode at As Shot in the readback, so the writer keeps writing Custom with them (wb_custom_with_numbers, supported); whether As Shot + numbers renders them is the open Basic-panel check |
Custom + incremental numbers in one call; whether As Shot + numbers renders them (Basic panel); raw E1b against E1c |
| E1c |
{Temperature = 22} on non-raw: stored as Temperature, WhiteBalance stays "As Shot", the incremental keys unchanged |
Lightroom keeps a raw-family key on a non-raw photo as a dead value: the writer's one-family rule stands | raw E1c (Custom + numbers) |
| E1d |
{Temp = 15, WhiteBalance = "Custom"}: Temp ignored, only the mode changed |
as E1a | — |
| E1e | did not run (Daylight, raw only) |
— | a raw file |
| E1f/E1g |
{WhiteBalance = "Auto"} alone, from a Custom precondition: the mode becomes Auto, the incremental numbers read back unchanged within 15 s, with and without optFlattenAutoNow
|
the readback showed no recomputed numbers within 15 s (run from the Library module; the Basic-panel check is open): wb_mode_only = false, flatten_auto_now = false, and a mode alone is refused for non-raw photos; EMIT_NAMED_WB_MODES stays off |
raw Auto and Daylight; the Basic-panel check |
| E11 | skipped (Adobe Raw Looks need a raw file) | — |
look_form, on a raw file |
| E2a | a digest-less subject mask in the preset form (numbers, the 23 zero Local* keys, the mask switch on) is kept, run from the Library module |
applyDevelopSettings adds new AI masks outside Develop; mask_form (subject, sky and background), local_form and mask_enum_as work. panel_switches = MaskOnly was sent, but E13 shows the switch was already true on the source photo (E2's copies inherit it), so the run does not tell None from MaskOnly
|
people parts (E2d); None against MaskOnly
|
| E2b | without updateAISettings() the mask is still pending after 30 s |
still pending after 30 s in the Library module: the writer asks for the update (ai_update) |
whether opening the photo in Develop computes it |
| E2c | after photo:updateAISettings() it is computed (call 0.6 s, ready 0.6 s) |
ai_update = true |
timing on a raw and with the model not yet loaded |
| E2d | sky and background computed the same way; a hair (people part) mask, MaskSubType 3 / MaskSubCategoryID 5 (the writer's form), ended failed with ErrorReason 1 (nothing found); the report does not say whether the photo shows a person |
one update computes several masks | people parts: the subType-3 form on a photo with a visible person (form or photo is not known) |
| E4a/E4b | plugin presets are created outside a write gate; a same-name add overwrites (same uuid, same file) | the preset lifecycle | — |
| E4c | applying a preset with masks replaces the photo's existing masks; applyDevelopPreset(..., updateAI = true) left the preset's sky mask pending for 60 s (Library module) |
the preset route loses masks, and its updateAI flag did not compute the mask within 60 s in the Library module |
whether the AI progress dialog appeared (manual) |
| E4d | re-applying updates the mask in place (same sync id, one correction) | sync ids identify a correction across applies | — |
| E4e | amount 50 and 200 change nothing: globals and mask values stay at the preset's, with and without SupportsAmount/SupportsAmount2
|
preset_amount_flags has no effect in 15.6 |
the look of the amount copies (manual) |
| E4f | deleting the preset file right after applying keeps the photo's edit; until a restart Lightroom keeps listing the deleted preset and even applies it; re-adding the name writes the file again with the same uuid | "apply then delete" works within a session (settings only: the mask was still pending at the delete) | what a restart changes (manual) |
What it settles for step 2. The viable route for AI masks is direct:
photo:applyDevelopSettings() with the masks in the table, then
photo:updateAISettings(). Plugin presets are not needed for masks and are
worse at them: they replace the photo's existing masks, their updateAI
flag did not compute the mask, and their amount is ignored. The Lua writer's
options follow this run (LuaOptions::EVIDENCE and
Options and what decides them):
the AI-mask forms for subject, sky and background, ai_update and the
non-raw mode-only choices (wb_mode_only, flatten_auto_now) are settled
for non-raw files on 15.6. wb_custom_with_numbers is only supported:
Custom with the incremental numbers (the writer's non-raw form) was never
applied. panel_switches = MaskOnly is only supported (the switch was
already on). People-part masks, int_flag_as, look_form and every
raw-side white-balance question stay open.
Lightroom Classic 15.6, test catalog, Library module, one photo: an
edited Canon CR3 (editCount 5, cropped square, Look "R5M2 Standard V2a",
process version 15.4). It answers the raw side of E1, E11 and E13 and repeats
E2 and E4. Its report is not committed.
| Experiment | Result | Settles | Stays open |
|---|---|---|---|
| E13 |
orientation = "AB"; the crop model fits with 0.0015 px error under the reported frame and not under swapped dimensions (2728 px off); 178 top-level keys on an edited photo |
dimensions and croppedDimensions come as reported; the readback is not a default table |
a portrait raw with a straightened crop; a fresh raw for the raw defaults |
| E1a/E1d |
{Temp} accepted, nothing changed; with WhiteBalance = "Custom" only the mode changed |
Temp is ignored on raw too |
none |
| E1b/E1c |
{Temperature} alone is stored; Custom + Temperature + Tint is stored whole |
the raw white-balance family writes as the writer does | Basic-panel check |
| E1e/E1f/E1g |
Daylight, Auto and Auto + optFlattenAutoNow set the mode; Temperature/Tint stay at 3000/40 for 15.2 s |
wb_mode_only and flatten_auto_now stay off on raw as well |
whether Develop resolves the mode on render (Basic panel) |
| E11a/E11c | a stub of "Adobe Vivid", with or without Stubbed, leaves CameraProfile Adobe Standard and no Look (the photo's own Look is dropped, none is set) |
the stub form does not apply a Look | E11b: the copy could not be switched away from its own Look, so a complete Look with Parameters is untested |
| E2 | as in the first run: pending after 30.4 s, computed 1.0 s after updateAISettings() (call 0.9 s); sky, background and hair computed within 2.3 s |
the hair mask (subType 3, sub-category 5) works; its first failure was the photo | people parts other than hair; several people |
| E4 | as in the first run: masks replaced, re-apply in place, amount ignored (identical values at 50 and 200 with and without the flags), apply then delete works in the session | the preset route stays rejected; amount has no effect | the look of the amount copies; the restart behaviour (E4f) |
Third run (2026-10-23, after a Lightroom restart). E11 and E4 again, on a
second Canon CR3 (018A0060.CR3, Look "Adobe Color" with Parameters):
- E11a/E11c: the same as before. A stub of "Adobe Vivid", with or without
Stubbed, leavesCameraProfileAdobe Standard and no Look. The result does not depend on the photo or on which Look it carried. - E11b: inconclusive again, for the same reason: the copy could not be switched away from its own Look first, because every Look write ends with no Look. A complete Look needs a source photo that carries a different Look than the target: select two such photos for the run.
- E4: identical to the earlier run (masks replaced, sky mask pending after 60.7 s, amount ignored, re-apply in place). The restart question is answered: "LrGenius Experiment E4f" was not listed after the restart and had no file, so Lightroom forgets a deleted plugin preset at the restart.
Fourth and fifth reports (2026-10-23). report3 holds E1 (not E11) on
two more raws, 018A0028.CR3 and 018A0060.CR3; report4 holds E13 on a
portrait raw, 018A0052.CR3 without crop:
- E1 on two further raws: identical to the first raw run.
Tempis ignored,Temperaturealone is stored,Custom+Temperature+Tintis stored whole, andDaylight/Auto/Auto+optFlattenAutoNowset the mode only, withTemperature/Tintunchanged for 15.2 s. Three raws now agree. - E13, portrait raw (
orientation = "DA"):dimensionsandcroppedDimensionsare reported in the display frame (5464 x 8192), while the raw-metadatawidth/heightstay in the sensor frame (8192 x 5464). The verdict stays "ambiguous", because an uncropped photo fits both frames; the portrait case still lacks a straightened crop. - E13 readback of an unedited raw (
hasAdjustmentsfalse, thougheditCountis 3): 178 top-level keys,CameraProfile"Adobe Standard", Look "Adobe Color" withParameters,Temperature4250,Tint7, crop 0/1/0/1. This is a raw default table, apart from the as-shot white balance and the lens profile digest, which depend on the file.
Sixth and seventh reports (2026-10-23). E11 on two raws, 018A0040.CR3
and 018A0065.CR3 (report_e11), and E13 on a straightened portrait raw,
018A0062.CR3 (report_e13):
- E11a/E11c: the stub again leaves no Look, on both photos. E11b is
inconclusive a third time, because both photos carry the same Look
("Adobe Color", UUID
B952C231...), so there is no other Look to take as the source and the copy cannot be switched away from its own. E11 needs two raws with different Looks; neither of the photos picked so far has one. - E13,
orientation = "DA",CropAngle19.98,CropLeft0.25487,CropRight0.74513: the verdict is settled.dimensions(5464 x 8192) andcroppedDimensions(3763 x 5641) are both in display orientation. The crop model fits only with both dimensions swapped (0.49 px error against more than 1500 px for every other reading): theCrop*fractions and the angle act on the sensor frame (8192 x 5464), and the result is reported rotated byorientation. The first portrait report (no crop) could not tell these apart. - The unedited raw readback has 179 top-level keys here against 178 on
018A0052.CR3; the difference was not examined.
Eighth report (2026-10-23, report_e11_2). E11 on 018A0500.CR3
(Look "Adobe Color") and 018A0516.CR3 (CameraProfile "Camera Neutral", no
Look):
- E11b is answered: a complete Look with
Parameters, taken from the other selected photo ("Adobe Color"), is honoured. The copy ends on CameraProfile Adobe Standard with Look "Adobe Color",Parameterskept. - E11a and E11c, the stub with and without
Stubbed, are ignored on the photo with no Look (the Look stays empty). On a photo with a Look they drop it. A stub never sets a Look. - So
look_formhas to beFullto transfer a Look, and it is now the default. It needs the source Look'sParameters, which a Look read from an XMP preset or a training row may not carry: the writer then reportsLook.Parametersas skipped. The wire goldens with a Look were re-blessed.
What changes for step 2. Nothing in the writer: it already writes
Temperature/Tint/Custom as a family, never Temp, and asks for
updateAISettings() after masks. look_form is Full since E11b. The evidence
rows in LuaOptions::EVIDENCE carry the raw answers.
Still open, for a second run on raw files:
- a portrait raw (rotated in camera) with a straightened crop, for E13's frame, and a fresh, unedited raw for the raw default table;
- a raw for E1b/E1c (
Custom+ numbers), E1e (Daylight), Auto on raw, and E11 (theLookforms); - a photo with a visible person, to check E2's people-part form
(
MaskSubType3 with a sub-category, which failed withErrorReason1 in the first run) and not only the photo; - a variant that applies a wire golden unchanged (decoded with JSON.lua), still needed before the goldens are frozen;
- the manual checks listed above.
Lightroom Classic 16.0, test catalog, Library module, the plugin from the
checkout driving AI Edit's retoucher (EditLoop.lua) on Canon CR3 files: every
round's table from the Lua writer (LuaMode::Apply, LuaOptions::default())
through photo:applyDevelopSettings(), then photo:updateAISettings(), with the
photo's own corrections passed back raw (merged by CorrectionSyncID). Seven
photos, cloud model Gemini 3.1 Pro and local Gemma 4 E4B (MLX).
| Question | Result |
|---|---|
| AI masks the experiments had not covered |
Face skin and iris and pupil (people parts, the preset form MaskSubType 3) and the landscape class vegetation (50005) were all computed on photos that show them, next to subject, sky and background |
| The photo's own masks passed back raw | Kept and still computed ("Maske 1", a sky mask, on two photos), next to the new corrections |
| Re-applying a correction with the same sync id, round after round | Replaced in place: three rounds left one LrGenius · Sky, never two |
updateAISettings() after each round |
Every mask computed before the render (needsUpdateAISettings false), within the plugin's 30 s wait |
| Taking the photo back (the plugin's Discard) | Every key the loop wrote returned to its starting value; with own masks, MaskGroupBasedCorrections = the own ones alone; without, an empty list removed the loop's masks
|
| White balance |
Custom + Temperature/Tint on raw applied as written. A relative temperature a small model sent for a raw file was dropped by the recipe builder and reported |
Not covered: a non-raw file (the catalog held none), a straightened or cropped
portrait, Lightroom before 16.0. The LuaOptions::EVIDENCE rows still describe the
experiments alone; this run supports mask_form for people parts and landscape
classes without changing the writer.