You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#361 landed the per-material thumb-bake pipeline at `bake/preview/` (renderer, orchestrator, vendored shader_ball.glb with native UVs, blank fingerprint gate). #391 landed the canonical `MatVisClient(repo=…, tag=…)` API. Everything is in place to actually run the bake — but there's no GHA workflow that triggers it. Today an operator wanting thumbs has to invoke `python bake/preview/run.py` locally with HF env vars manually set.
The bake fits cleanly into the existing derive matrix architecture: input is `@`, output is per-material per-source artifacts published back to HF. `#365` (concurrency-group fix) ensures that adding a new `kind` doesn't displace pending resize/ktx2 dispatches.
Decision / proposed approach
Add `kind: thumb` to `.github/workflows/derive.yml`'s `workflow_dispatch.inputs.kind` enum (alongside `resize`, `ktx2`).
Plan step extension: when `kind=thumb`, `target-tier` resolves to literal `"thumb"` (no source-tier interpolation needed; the bake reads from the highest tier available per material via the existing `run.py` fallback).
New Dagger function `thumb` in `.dagger/src/mat_vis_ci/main.py` (mirrors `derive` / `derive_ktx2` shape). Inside the baker container:
Run `python bake/preview/run.py --out /tmp/thumbs --source --skip-check`
Upload each `/<material_id>/thumb.png` to HF as `/<material_id>/thumb/thumb.png` (new "thumb" tier)
Update the source's manifest entry: `tiers: {…, thumb: {complete: true}}`
Wrap upload in atomic batches (mirrors the per-file derive's batch convention)
Concurrency key naturally separates via the existing `derive-{repo}-{kind}-{source-tier}-{target-tier}-budget` template — `thumb` lives in its own group.
Live test: dispatch the workflow against `gerchowl/mat-vis-tst@v2026.04.99-tst-full-369` for one source (ambientcg), verify PNGs land + manifest updates
CI `check_thumbs.py` fingerprint gate runs as a workflow step before HF upload (catch silent regressions)
Per-source thumb-tier completeness reported in workflow summary
`hf upload` retries on transient 5xx (already in baker for resize/ktx2; reuse)
Pitfalls
Playwright + Chromium adds ~300MB to the baker image. Either install per-job (slower but isolated) or rebuild the baker image with Playwright pre-installed (faster, larger image). Recommend per-job install for now (matches dev experience).
5000 materials × 25s per render = ~35h sequential per source. Need to either: (a) chunk via matrix-shard-per-source-segment, (b) accept the runtime, or (c) parallelize within the dagger function (multiple browser contexts). Start with (b); revisit if it bottlenecks operations.
Manifest concurrent updates: if thumb dispatch overlaps with resize or ktx2 dispatches that ALSO touch the manifest, last-writer-wins. The bugfix(ci): derive.yml concurrency cancels sibling dispatches (closes #364) #365 concurrency-group separation prevents same-source double-dispatch but doesn't serialize cross-kind manifest writes. Audit `hf_push.py`'s manifest-merge logic — does it merge by source+tier or replace wholesale?
`gh workflow run derive.yml -f kind=thumb -f sources=ambientcg -f repo-id=gerchowl/mat-vis-tst -f release-tag=v2026.04.99-tst-full-369` runs to green
Post-run: `hf api datasets/gerchowl/mat-vis-tst/resolve/v2026.04.99-tst-full-369/release-manifest.json` shows `sources.ambientcg.tiers.thumb.complete=true`
Post-run: `hf api datasets/gerchowl/mat-vis-tst/resolve/v2026.04.99-tst-full-369/ambientcg/Metal007/thumb/thumb.png` returns valid PNG bytes
`MatVisClient(repo="gerchowl/mat-vis-tst", tag="v2026.04.99-tst-full-369").asset("ambientcg", "Metal007").thumb` returns the same bytes (round-trip verify)
Motivation
#361 landed the per-material thumb-bake pipeline at `bake/preview/` (renderer, orchestrator, vendored shader_ball.glb with native UVs, blank fingerprint gate). #391 landed the canonical `MatVisClient(repo=…, tag=…)` API. Everything is in place to actually run the bake — but there's no GHA workflow that triggers it. Today an operator wanting thumbs has to invoke `python bake/preview/run.py` locally with HF env vars manually set.
The bake fits cleanly into the existing derive matrix architecture: input is `@`, output is per-material per-source artifacts published back to HF. `#365` (concurrency-group fix) ensures that adding a new `kind` doesn't displace pending resize/ktx2 dispatches.
Decision / proposed approach
What already exists
Scope
P0
P1
Pitfalls
Acceptance criteria
References