Spaces:
Running on Zero
Running on Zero
Commit History
28 days ago
-
Move v2 into CorridorKeyModule, drop licence files for links, Native quality, no frame cap, auto window by size Running
1ef5ded -
Pin torch 2.9.1 (tested v2 version), hide UI-only event from API, document ZeroGPU size
6dcf06b -
Add CorridorKey v2 (GPU) with v1/v2 switch, v2 default; v1 unchanged behind --version v1
30aa4cc
29 days ago
-
Add notice v1
Verified signature309dd62
-
postprocess at model res, defer resize+write to CPU (saves ~35s GPU)
GPU phase: postprocess (clean_matte + despill) at 1024 instead of 4K (8x fewer pixels), save uint8 to /tmp (~4MB/frame). No 4K file encoding during GPU time. After GPU release (free CPU): load 1024, resize to output res (LANCZOS4), write all 4 outputs (comp+fg+matte+processed). Before: 28s inference@4K + 26s write@4K = 62s GPU Target: 16s inference@1024 + 1s save = ~22s GPUf4a7288 -
compact UI: resolution+screen color in row, despeckle in row
18d73cb -
fix: remove tree paths from credit links
51cee71 -
pin upstream commit IDs in credits
0cabf66 -
fix: blue CPU is available (1024 only), not green-only
119149d -
update all references: green → green/blue
804c80b -
status shows CPU + GPU time breakdown
323e65e -
add blue 1024 ONNX (FP16 on disk, FP32 at runtime), rename models
- corridorkey_1024-fp32.onnx (299MB, green) - corridorkey_2048-fp32.onnx (383MB, green) - corridorkey_blue_1024-fp16.onnx (148MB, stored FP16, converted to FP32 at load) - Total: 828MB / 1GB LFS - Blue CPU: auto-downgrades to 1024 if 2048 selected - Added onnx + onnxconverter-common deps for FP16→FP32 conversion646f0cd -
blue screen support: GPU-only, auto-detection, no ONNX/LFS
- Auto-detect screen color from first frame background pixels - Blue model downloaded from nikopueringer/CorridorKeyBlue_1.0 on first use - fast_chromascreen_mask: green (HSV 35-85) + blue (HSV 100-130) - despill supports screen_channel=1 (green) or 2 (blue) in both numpy and torch - Model cache keyed by (img_size, screen_color) - CPU/ONNX path: green model only, despill adapts to detected color - UI: Auto/Green/Blue radio. CLI: --screen-color flag7b2ad18 -
safetensors loading, Phase 0 4x faster (uint8), total time in status
- Prefer .safetensors over .pth (faster load, no pickle) - Phase 0: save uint8 RGB (25MB/frame) instead of float32 (99MB/frame) — 4x less disk I/O - Status now shows total wall time33e616b -
quality: lower clean_matte threshold 0.25→0.02, always keep largest component
Upstream fix: 0.25 threshold severed wispy hair strands (alpha 0.02-0.25) from the subject body, then area filter deleted them. Now keeps anything alpha > 0.02 connected, and largest component is always preserved regardless of area_threshold. Applied to both CPU (clean_matte) and GPU (_clean_matte_single_gpu) paths.1363975 -
cleanup: stale comments, dead import, redundant makedirs, fix batch size in UI
a2a7a3e -
simplify: merge write functions, fix missing Processed output, bulk transfer
- Merged _write_frame_fast + _write_frame_outputs into single _write_frame - GPU path now writes Processed (RGBA PNG) — was silently empty in ZIP - Bulk numpy→torch transfer (np.stack once, single .cuda()) instead of N small ones - Removed dead total_elapsed variable9d23c67 -
remove dead code: AOTI export, inductor/triton cache, shared_results, deferred write
2a4471f -
disable torch.compile on ZeroGPU — net negative for GreenFormer
Tested on H200: - max-autotune: 118s, 0 triton kernels (cublas wins for small matrices) - reduce-overhead: 36s compile + 48s graph recording = 84s for 5% speedup - eager: 0.32s/frame with zero overhead — best for 120s budget torch.compile still enabled for local GPU (no time budget).f4a2965 -
fix: reduce-overhead instead of max-autotune (118s→~30s), dedicated export endpoint
max-autotune on H200: 118s compile, 0 triton kernels generated — just cublas benchmarking. reduce-overhead: CUDA graphs without slow autotune, fits in 120s budget. Export .pt2 button: separate @spaces.GPU(duration=300) call with triple fallback: 1. AOTInductor aoti_compile_and_package → .pt2 2. torch.compiler.save_cache_artifacts → mega-cache .bin 3. tar inductor+triton cache → .tar.gzc53eb28 -
triple-fallback artifact export + triton cache
After compile, tries in order: 1. AOTInductor aoti_compile_and_package → .pt2 (best) 2. torch.compiler.save_cache_artifacts → mega-cache .bin (PyTorch 2.7+) 3. In-memory only (fallback) Also: TRITON_CACHE_DIR set for kernel persistence Download button finds all artifact types449e82f -
export .pt2 after compile + download button
After first inference, tries torch.export to save compiled model as .pt2. UI: Accordion "Compiled Model Artifacts" with download button. Flow: run inference at 1024 → check for .pt2 → download7720399 -
always compile with triton (max-autotune) + probe AOTI
First request: ~37s compile (one-time per container session) All subsequent: full triton + CUDA graphs speed, model stays compiled in memory Also probes spaces.zero.torch.aoti for future pre-compiled artifact support4537006 -
simplify pipeline timing in README
cc14934 -
enable triton+CUDA graphs via torch.compile(max-autotune)
Warm ZeroGPU: triton kernels + CUDA graphs (1.5-2x). Cold: skip. 4K timing: mask 22.6s + load 5s + infer 28.9s + write 14.5s + stitch 9s = 80sf1d6e7f -
fix README: accurate torch.compile description, no triton/AOTI claim
cdef1d9 -
update README: fix batch size, add GPU optimization docs
Speed comparison (264x480 not directly comparable to 4K): - OLD (2026-04-30): 264x480, batch 32, 0.21s/fr, TIMED OUT at 120s (33% done) - NEW (2026-05-02): 3840x2160 4K, batch 32, 0.32s/fr, COMPLETED in 49.2s69eef34 -
fix randperm overflow at 4K: per-frame connected components
c9b234a -
GPU postprocessing pipeline + TF32 + conditional torch.compile
8ea0c8b
-
add ZeroGPU GPU inference (FP16, flash-attn, batch=32@1024/16@2048)
0b6961f
-
professional output package (Comp+FG+Matte+Processed)
c2d53e4 -
download button for all output modes
16d8be4 -
fix gradio cache_examples None output crash
d041804 -
fix example cache crash
40a8177 -
initial commit
20c856c
-
initial commit
2b1c753