Repository navigation
Expand file tree
/
Copy pathautoshade.architecture.json
More file actions
359 lines (359 loc) · 10 KB
/
Copy pathautoshade.architecture.json
File metadata and controls
359 lines (359 loc) · 10 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
{
"schema_version": 2,
"diagram_type": "architecture",
"meta": {
"title": "AutoShade — architecture and the ideas inside it",
"locale": "en",
"quality_profile": "showcase",
"layout": "computed"
},
"components": [
{
"id": "responses-api",
"type": "external",
"label": "Responses API",
"sublabel": "OpenAI-compatible vision"
},
{
"id": "claude-cli",
"type": "external",
"label": "claude CLI",
"sublabel": "subprocess · OAuth · data only",
"tag": "no API key"
},
{
"id": "desktop-gui",
"type": "frontend",
"label": "Desktop GUI",
"sublabel": "autoshade-gui · eframe 0.29"
},
{
"id": "cli",
"type": "frontend",
"label": "CLI",
"sublabel": "autoshade · clap 4.6"
},
{
"id": "web-ui",
"type": "frontend",
"label": "Local web UI",
"sublabel": "serve · tiny_http · loopback",
"tag": "per-run token"
},
{
"id": "raw-decode",
"type": "backend",
"label": "RAW decode",
"sublabel": "decode.rs · rawler 0.7.2",
"tag": "24 formats · 725 bodies"
},
{
"id": "ai-advisor",
"type": "backend",
"label": "AI advisor",
"sublabel": "propose · verify · judge"
},
{
"id": "edit-recipe",
"type": "backend",
"label": "EditRecipe",
"sublabel": "recipe.rs · bounded JSON",
"tag": "rationale + confidence"
},
{
"id": "render-engine",
"type": "backend",
"label": "Render engine",
"sublabel": "render.rs · measured LR parity",
"tag": "byte-identical"
},
{
"id": "style-index",
"type": "database",
"label": "Style index",
"sublabel": "14-d + 12 settings + SigLIP 2",
"tag": "k = 4 retrieval"
},
{
"id": "develop-store",
"type": "database",
"label": "Develop store",
"sublabel": "store.rs · versions + variants"
},
{
"id": "xmp-sidecar",
"type": "database",
"label": "XMP sidecar",
"sublabel": "xmp.rs · hand-rolled crs: merge",
"tag": "byte-preserving"
},
{
"id": "reverse-fit",
"type": "backend",
"label": "Reverse-fit",
"sublabel": "CDF inverse rendering · D gate",
"tag": "Full / Atmosphere"
},
{
"id": "local-producers",
"type": "backend",
"label": "Local producers",
"sublabel": "zones · bands · quadtree tiles",
"tag": "free-form masks: designed"
},
{
"id": "field-analyzer",
"type": "backend",
"label": "Local-field analyzer",
"sublabel": "12x8x8 bilateral grid · CG",
"tag": "ceiling, read-only"
},
{
"id": "embed-sidecar",
"type": "backend",
"label": "Embedding sidecar",
"sublabel": "embed.py · SigLIP 2 base/16",
"tag": "768-d, pinned"
},
{
"id": "correspond-sidecar",
"type": "backend",
"label": "Correspondence sidecar",
"sublabel": "correspond.py · DIFT on SD 2.1",
"tag": "48x48 field"
},
{
"id": "segment-sidecar",
"type": "backend",
"label": "Segmentation sidecar",
"sublabel": "BiRefNet · OneFormer · SAM 2.1",
"tag": "guided refine"
},
{
"id": "describe-sidecar",
"type": "backend",
"label": "Description sidecar",
"sublabel": "describe.py · Qwen3-VL-2B",
"tag": "one grade sentence"
},
{
"id": "denoise-sidecar",
"type": "backend",
"label": "Denoise sidecar",
"sublabel": "denoise.py · SCUNet × 5",
"tag": "opt-in, baked sources"
},
{
"id": "denoise-raw-sidecar",
"type": "backend",
"label": "RAW denoise sidecar",
"sublabel": "denoise_raw.py · DRUNet",
"tag": "opt-in, on the mosaic"
}
],
"boundaries": [
{
"kind": "region",
"label": "One process, one binary — the AI returns a recipe, not pixels",
"wraps": [
"desktop-gui",
"cli",
"web-ui",
"raw-decode",
"ai-advisor",
"edit-recipe",
"render-engine",
"style-index",
"develop-store",
"xmp-sidecar",
"reverse-fit",
"local-producers",
"field-analyzer"
]
},
{
"kind": "security-group",
"label": "Local sidecars — subprocess, weights pinned to the byte, never in the repo",
"wraps": [
"embed-sidecar",
"correspond-sidecar",
"segment-sidecar",
"describe-sidecar",
"denoise-sidecar",
"denoise-raw-sidecar"
]
},
{
"kind": "security-group",
"label": "External AI services — opt-in, only on user request",
"wraps": [
"responses-api",
"claude-cli"
]
}
],
"connections": [
{
"id": "gui-links-library",
"from": "desktop-gui",
"to": "raw-decode"
},
{
"id": "cli-opens-raw",
"from": "cli",
"to": "raw-decode",
"variant": "emphasis"
},
{
"id": "web-links-library",
"from": "web-ui",
"to": "raw-decode"
},
{
"id": "decode-to-advisor",
"from": "raw-decode",
"to": "ai-advisor",
"label": "preview·EXIF·histogram",
"variant": "emphasis"
},
{
"id": "advisor-calls-responses",
"from": "ai-advisor",
"to": "responses-api",
"label": "HTTPS · strict json_schema",
"variant": "security"
},
{
"id": "advisor-to-recipe",
"from": "ai-advisor",
"to": "edit-recipe",
"label": "bounded slider set",
"variant": "emphasis"
},
{
"id": "recipe-to-verifier",
"from": "edit-recipe",
"to": "claude-cli",
"label": "verify (data, never pixels)",
"variant": "emphasis"
},
{
"id": "verifier-to-render",
"from": "claude-cli",
"to": "render-engine",
"label": "accepted recipe",
"variant": "emphasis"
},
{
"id": "render-to-xmp",
"from": "render-engine",
"to": "xmp-sidecar",
"label": ".xmp + rendered image",
"variant": "emphasis"
},
{
"id": "recipe-to-store",
"from": "edit-recipe",
"to": "develop-store",
"label": "saved per photo path"
},
{
"id": "style-to-advisor",
"from": "style-index",
"to": "ai-advisor",
"label": "4 nearest edits as soft reference"
},
{
"id": "embed-to-style",
"from": "embed-sidecar",
"to": "style-index",
"label": "768-d image embedding"
},
{
"id": "fit-to-producers",
"from": "reverse-fit",
"to": "local-producers",
"label": "global fit · mode"
},
{
"id": "analyzer-to-producers",
"from": "field-analyzer",
"to": "local-producers",
"label": "ceiling · cap · band proposals"
},
{
"id": "producers-to-store",
"from": "local-producers",
"to": "develop-store",
"label": "recovered recipe + masks"
},
{
"id": "correspond-to-fit",
"from": "correspond-sidecar",
"to": "reverse-fit",
"label": "where content moved"
},
{
"id": "segment-to-producers",
"from": "segment-sidecar",
"to": "local-producers",
"label": "sky/land · subject · object"
},
{
"id": "describe-to-style",
"from": "describe-sidecar",
"to": "style-index",
"label": "one sentence per photo"
},
{
"id": "denoise-to-render",
"from": "denoise-sidecar",
"to": "render-engine",
"label": "denoised pixels"
},
{
"id": "denoise-raw-to-render",
"from": "denoise-raw-sidecar",
"to": "render-engine",
"label": "denoised mosaic"
}
],
"cards": [
{
"dot": "cyan",
"title": "Style reference = retrieval over your whole catalogue",
"items": [
"Every Lightroom RAW+XMP pair becomes an exemplar: 14-d EXIF/histogram features, the 12 settings you moved, curve and colour habits",
"Optional 768-d SigLIP 2 image embedding; hybrid distance sum w(q-e)^2 + W_EMB(1-cos), W_EMB = 2.0 from a 147-exemplar scan",
"The 4 nearest past edits reach the advisor as a soft reference; blend cap 0.6, never a copy; the rationale names them"
]
},
{
"dot": "violet",
"title": "Reverse-fit: inverse rendering with an honesty budget",
"items": [
"Luminance CDFs matched at the engine tone knots, least-squares on the slider basis with a model-selection prior; foreign-hue veto >= 45 deg / 5%",
"Structural divergence D picks Full or bounded Atmosphere (EV +-1, WB gain 0.80-1.25, sat +-30, slope 0.5-1.5, confidence <= 0.50)",
"DIFT (SD 2.1) correspondence: 48x48 field, confidence = cyclic consistency x flow smoothness, consulted only when D >= 0.35"
]
},
{
"dot": "amber",
"title": "Local corrections, gated on frozen evidence",
"items": [
"Semantic sky/land zones, XMP-native luminance bands from rank-paired residuals, or colour bands keyed to a hue band's own mean colour; verdicts follow the population a correction moves",
"Quadtree tiles: strongest nodes first, 4x4 stop, both frames >= 3% evidence, CI excludes zero, cross-boundary step <= 0.012, zero-tolerance frame law",
"12x8x8 bilateral-grid analyzer prices the ceiling first (calibration pair: global 0.0961, ceiling 0.0700) and halves the tile budget when the remainder is not tile-shaped"
]
},
{
"dot": "rose",
"title": "Measured, local, quarantined",
"items": [
"Lightroom parity by measurement: Texture 45/45 anchors within 0.02, radial 41/41 vectors within 1 px, brush D1 874 -> 9.8 px; linear openly not pixel-closed",
"Local models licence-screened and sha256/byte-pinned: BiRefNet, OneFormer ADE20K, SAM 2.1, SigLIP 2, SD 2.1 as DIFT featurizer, SCUNet, DRUNet",
"Generated pixels (gpt-image-2 reimagine via the Images API, heal, denoise) live on their own cards and are measured with the same D before any fit"
]
}
]
}