wxDai commited on
Commit
62566e8
·
1 Parent(s): e739624

drop the sageattention wheel: this GPU class runs cuDNN (8/20 bench); runtime falls back gracefully

Browse files
README.md CHANGED
@@ -23,8 +23,9 @@ DiT + streaming VAE pipeline, served on ZeroGPU.
23
  module scope under ZeroGPU's CUDA-emulation layer.
24
  - Each session leases a real GPU in a `@spaces.GPU` fork; the main process is a
25
  thin WebSocket byte-pipe (H.264 both ways, MJPEG fallback).
26
- - Custom CUDA kernels (`joyomni_ops`, `sageattention`) ship as prebuilt cp310 /
27
- torch-2.9.1 wheels in `wheels/` — matching ZeroGPU's supported stack.
 
28
 
29
  ## Notes
30
 
@@ -33,5 +34,5 @@ DiT + streaming VAE pipeline, served on ZeroGPU.
33
  not the first user session.
34
  - `torch.compile` is inert in ZeroGPU forks; each fork instead pays a short warmup
35
  (CUDA-graph capture, KV fill), so the first 2-3 chunks are slower.
36
- - A session runs up to ~150s of GPU time. Free ZeroGPU quota is limited — this is a
37
- small-scale demo.
 
23
  module scope under ZeroGPU's CUDA-emulation layer.
24
  - Each session leases a real GPU in a `@spaces.GPU` fork; the main process is a
25
  thin WebSocket byte-pipe (H.264 both ways, MJPEG fallback).
26
+ - The custom CUDA kernels (`joyomni_ops`: FP8 GEMM + fused norm/rope) ship as a
27
+ prebuilt cp310 / torch-2.9.1 wheel in `wheels/` — matching ZeroGPU's supported
28
+ stack. Attention runs on plain cuDNN SDPA (fastest on this GPU class).
29
 
30
  ## Notes
31
 
 
34
  not the first user session.
35
  - `torch.compile` is inert in ZeroGPU forks; each fork instead pays a short warmup
36
  (CUDA-graph capture, KV fill), so the first 2-3 chunks are slower.
37
+ - A session runs up to ~120s of GPU time (shorter retries when the queue is busy).
38
+ Free ZeroGPU quota is limited — this is a small-scale demo.
app.py CHANGED
@@ -10,7 +10,7 @@ to ZeroGPU's fork model, without modifying the code it vendors:
10
  in-process.
11
 
12
  Hardware: ZeroGPU size="xlarge" = RTX Pro 6000 Blackwell (sm_120, 96GB);
13
- the sm_120 joyomni_ops + SageAttention wheels in wheels/ match it.
14
  """
15
  from __future__ import annotations
16
 
@@ -41,9 +41,10 @@ os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True")
41
  os.environ.setdefault("GRADIO_SSR_MODE", "false")
42
 
43
  # Kernel path: FP8 + CUDA graph on plain cuDNN SDPA. Sage int8 stays OFF — the Space GPU
44
- # is an RTX PRO 6000 Blackwell (probe-verified), where cuDNN beats sage at every serving
45
- # shape (2026-08-20 bench; sage only wins on GeForce's half-rate fp32-accum). The wheel
46
- # still ships, so JOYOMNI_SAGE_ATTN=1 in Space settings can re-enable it for an A/B.
 
47
  os.environ.setdefault("JOYOMNI_FP8_IMG", "1")
48
  os.environ.setdefault("JOYOMNI_FP8_TXT", "1")
49
  os.environ.setdefault("JOYOMNI_CUDA_GRAPH", "1")
@@ -86,7 +87,7 @@ CKPT_ROOT = Path(os.environ.get("JOYOMNI_CKPT_ROOT", str(_DATA / "checkpoints"))
86
  SESSION_DURATION = int(os.environ.get("JOYOMNI_SPACES_DURATION", "120"))
87
 
88
 
89
- # Prebuilt sm_120 wheels: pip runs before repo files exist on Spaces — install here.
90
  def _ensure_local_wheels() -> None:
91
  import importlib.util
92
  import subprocess
@@ -94,7 +95,6 @@ def _ensure_local_wheels() -> None:
94
  wheel_dir = DEPLOY_ROOT / "wheels"
95
  specs = [
96
  ("joyomni_ops", "joyomni_ops-0.1.0-cp310-cp310-linux_x86_64.whl"),
97
- ("sageattention", "sageattention-2.2.0-cp310-cp310-linux_x86_64.whl"),
98
  ]
99
  for mod, whl in specs:
100
  if importlib.util.find_spec(mod) is not None:
 
10
  in-process.
11
 
12
  Hardware: ZeroGPU size="xlarge" = RTX Pro 6000 Blackwell (sm_120, 96GB);
13
+ the sm_120 joyomni_ops wheel in wheels/ matches it.
14
  """
15
  from __future__ import annotations
16
 
 
41
  os.environ.setdefault("GRADIO_SSR_MODE", "false")
42
 
43
  # Kernel path: FP8 + CUDA graph on plain cuDNN SDPA. Sage int8 stays OFF — the Space GPU
44
+ # is an RTX PRO 6000 Blackwell (probe-verified), where cuDNN beats sage across the 480p
45
+ # serving shapes (2026-08-20 bench; sage only wins on GeForce's half-rate fp32-accum).
46
+ # The sage wheel is no longer shipped (recover from git history if a GeForce tier ever
47
+ # appears); JOYOMNI_SAGE_ATTN=1 without it just logs a fallback to SDPA (dit.py).
48
  os.environ.setdefault("JOYOMNI_FP8_IMG", "1")
49
  os.environ.setdefault("JOYOMNI_FP8_TXT", "1")
50
  os.environ.setdefault("JOYOMNI_CUDA_GRAPH", "1")
 
87
  SESSION_DURATION = int(os.environ.get("JOYOMNI_SPACES_DURATION", "120"))
88
 
89
 
90
+ # Prebuilt sm_120 wheel: pip runs before repo files exist on Spaces — install here.
91
  def _ensure_local_wheels() -> None:
92
  import importlib.util
93
  import subprocess
 
95
  wheel_dir = DEPLOY_ROOT / "wheels"
96
  specs = [
97
  ("joyomni_ops", "joyomni_ops-0.1.0-cp310-cp310-linux_x86_64.whl"),
 
98
  ]
99
  for mod, whl in specs:
100
  if importlib.util.find_spec(mod) is not None:
wheels/sageattention-2.2.0-cp310-cp310-linux_x86_64.whl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:983e1f21123b81916f110077e19982f97c69e0de4fb0bdf7ef8501baf0c6f9eb
3
- size 14974158