Bobby Claude Opus 5.5 commited on
Commit
a78e035
·
1 Parent(s): df74830

Record speed phase 1+2 findings

Browse files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. AGENTS.md +1 -0
AGENTS.md CHANGED
@@ -31,3 +31,4 @@ Type: code
31
  - Original-runtime bench (2026-10-06): `TRELLIS_BENCH=1` adds `/bench_generate` (sampler/steps overrides, stage timings) and `/bench_bakes` (several `to_glb` configs on the session state in one GPU call, `BAKE_TIMINGS` log lines) and loads the MDT weights. Pitfall: `sample_sparse_structure` does not merge `pipeline.json` sampler params, so production SS sampling runs `rescale_t=1`, CFG on all steps (unlike SLAT, which merges).
32
  - Progress bars (2026-10-06, branch `codex/3dai-progress`, dev only): ZeroGPU DOES stream `gr.Progress` from the GPU worker (`spaces` RPCs `Queue.set_progress`); live API run on dev: `Generating 3D structure 15%` @4.1s → `Rendering preview 45%` @17.3s → `Finishing preview 90%` @18.1s (cold), bake `Texturing 3D model 35%` @1.9s → `Packaging 3D model 84%` @6.6s. `track_tqdm=True` let sampler tqdm (`Sampling 10/12`) replace the stage level, so production Progress params are plain `gr.Progress()`. `progress_bar.js` (one `gr.HTML` `js_on_load` controller per op: preview, glb, stl) eases toward 95% on measured timings, adopts real stage label/percent from Gradio's status tracker (video tracker for preview, `show_progress_on=[glb_progress]` for GLB), and completes/hides from `js=` preprocess hooks on backend deps (js-only deps still never continue a chain). Anonymous headless-browser visits hit ZeroGPU 429 (`user: null`) after today's runs, so live UI success paths were verified only on the local stub server.
33
  - Reuse/click-through logging (2026-10-06, branch `codex/3dai-reuse-log`, `usage_log.py`): each `@spaces.GPU` body logs one `GPU_CALL {"fn","pid","calls_in_worker","since_prev_call_s","since_worker_start_s","texture_size","session","in_gpu_s","ok","t"}` (process-global counters reset per worker pid; `session` = first 12 hex of sha256(Gradio session_hash)); the main process logs `LABS_EVENT {"event": preview_done|glb_done|stl_done, "session","t",...}` (`took_s` = handler time, so click time = `t - took_s`; `via: "pro"` for Pro-fallback runs; `extract_model`/STL read the session from Gradio's `LocalContext.request`, so endpoint signatures are unchanged). `python scripts/reuse_report.py [--space 3dai|3dai-dev] [--file saved.log]` reads the run-log SSE (current container only) and prints reuse per fn, preview→preview reuse across sessions, idle-gap spread and GLB/STL click-through + preview→click delay.
 
 
31
  - Original-runtime bench (2026-10-06): `TRELLIS_BENCH=1` adds `/bench_generate` (sampler/steps overrides, stage timings) and `/bench_bakes` (several `to_glb` configs on the session state in one GPU call, `BAKE_TIMINGS` log lines) and loads the MDT weights. Pitfall: `sample_sparse_structure` does not merge `pipeline.json` sampler params, so production SS sampling runs `rescale_t=1`, CFG on all steps (unlike SLAT, which merges).
32
  - Progress bars (2026-10-06, branch `codex/3dai-progress`, dev only): ZeroGPU DOES stream `gr.Progress` from the GPU worker (`spaces` RPCs `Queue.set_progress`); live API run on dev: `Generating 3D structure 15%` @4.1s → `Rendering preview 45%` @17.3s → `Finishing preview 90%` @18.1s (cold), bake `Texturing 3D model 35%` @1.9s → `Packaging 3D model 84%` @6.6s. `track_tqdm=True` let sampler tqdm (`Sampling 10/12`) replace the stage level, so production Progress params are plain `gr.Progress()`. `progress_bar.js` (one `gr.HTML` `js_on_load` controller per op: preview, glb, stl) eases toward 95% on measured timings, adopts real stage label/percent from Gradio's status tracker (video tracker for preview, `show_progress_on=[glb_progress]` for GLB), and completes/hides from `js=` preprocess hooks on backend deps (js-only deps still never continue a chain). Anonymous headless-browser visits hit ZeroGPU 429 (`user: null`) after today's runs, so live UI success paths were verified only on the local stub server.
33
  - Reuse/click-through logging (2026-10-06, branch `codex/3dai-reuse-log`, `usage_log.py`): each `@spaces.GPU` body logs one `GPU_CALL {"fn","pid","calls_in_worker","since_prev_call_s","since_worker_start_s","texture_size","session","in_gpu_s","ok","t"}` (process-global counters reset per worker pid; `session` = first 12 hex of sha256(Gradio session_hash)); the main process logs `LABS_EVENT {"event": preview_done|glb_done|stl_done, "session","t",...}` (`took_s` = handler time, so click time = `t - took_s`; `via: "pro"` for Pro-fallback runs; `extract_model`/STL read the session from Gradio's `LocalContext.request`, so endpoint signatures are unchanged). `python scripts/reuse_report.py [--space 3dai|3dai-dev] [--file saved.log]` reads the run-log SSE (current container only) and prints reuse per fn, preview→preview reuse across sessions, idle-gap spread and GLB/STL click-through + preview→click delay.
34
+ - Speed phases 1+2 (2026-10-06, branch `codex/3dai-speed-phase12`, dev only; receipts `../3dai-benchmarks/2026-10-06/phase12/RESULTS.md`): SLAT samples under fp16 autocast (`SLAT_FP16`; the old inner autocast took the fp32 `input_layer` dtype), flow full attention uses SDPA while windowed decoder attention keeps xformers (`FULL_ATTENTION_SDPA`), CFG runs cond+uncond in one forward (`BATCHED_CFG`), alpha WebM encodes `-deadline realtime -cpu-used 8`, bake starts from the projected average with 300·(t/2048) steps capped 300 at lr 3e-3. Preview and bake share ONE `@spaces.GPU` function `gpu_task(mode, …)` (spaces pools workers per decorated function; `GPU_CALL` fn = `gpu_task:preview|bake`), reservations unchanged per mode. Dev API, warm-worker hit: preview 4.8-6.3s (1.9x vs 9.1-12.1s), GLB right after preview 4.4-6.1s (1.5-1.6x); worker reaped after ~70s idle, so a GLB clicked ≥65s later is 8.8-10.0s (no gain). Pitfall: SDPA + batched CFG change the seed-42 sample (cybertruck rear deck turns tan in the Gaussians); fp16 alone does not. A/B more seeds before prod or set both constants False.