Spaces:
Running on Zero
Running on Zero
Commit History
-
Drop torch.compile from the upscale model; run eager (#50) (#70)
Unverified signatureDev-Space A/B via UPSCALE_COMPILE (#69), 53 frames, back-to-back runs: - compiled (832x624 / 624x832): model_time 10.56-11.04s cold, 2.72-5.42s warm, almost entirely the per-request first-call (compile/guard) penalty - eager (544x832): model_time 0.96s cold and 0.96s warm, first call ~0.1s Eager's steady compute is ~25% slower per pixel (~+0.2s per request at 832x624), far below the 1.9-10s compile penalty it removes. Remove the compile path and the now-unneeded UPSCALE_COMPILE flag, and update the profiler docstring that assumed compile. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>d7bfd39 -
Report baseline, upscale delta, and total device VRAM in upscale profile (#51) (#66)
Unverified signatureThe existing peak-memory line can't answer #51's headroom question on its own: reset_peak_memory_stats resets the peak, not what's already resident, so the ~35 GiB peak includes whatever the process held before upscale started (e.g. the diffusion pipeline), and the device's total VRAM wasn't logged at all. With UPSCALE_PROFILE=1, add a second memory line with the allocated/reserved baseline at run start, upscale's own delta above it, and total/free VRAM from torch.cuda.mem_get_info, plus headroom against peak reserved. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>f3eac0a
-
Break down upscale's non-model overhead into named profiling spans (#61)
UpscaleProfiler previously only measured model() calls, leaving the ~74% of upscale wall time spent outside them as one opaque "non_model" number. Adds a span() context manager and wraps job_grouping, tile_merge, frames_to_tensor, pre_pad, host_transfer, and pil_convert so the next UPSCALE_PROFILE=1 run on the dev Space localizes where that time actually goes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>ea4ada4
-
Add opt-in profiling to the upscale stage for #48 benchmarking
Gated by UPSCALE_PROFILE=1 (off by default, zero overhead when unset). Reports, per upscale_frames() call: wall time vs. model time vs. non-model overhead, split into first-call-at-a-(tile-shape,batch-size) vs. steady-state repeat calls (to expose torch.compile recompilation cost — the #50 question), plus peak CUDA memory alongside the current TILE_SIZE/FRAME_BATCH_SIZE/MAX_TILE_BATCH constants (the #51 headroom question). Profiling logic lives in its own UpscaleProfiler class (postprocess/upscale/profiling.py) so the tiling/inference hot path in upscale.py isn't cluttered with timing bookkeeping. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>678f3ac