SammySnake commited on
Commit
3751e88
·
verified ·
1 Parent(s): de2a6e9

Deploy CPU GeoCLIP and StreetCLIP priors; download weights only on HF

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -55,7 +55,8 @@ def cpu_threads():
55
 
56
 
57
  torch.set_num_threads(cpu_threads())
58
- torch.set_num_interop_threads(1)
 
59
 
60
  _MODELS = {}
61
  _GALLERY = None
@@ -153,6 +154,7 @@ def status():
153
  "captions": 100, "coordinate_candidates": 100, "top_k": 20,
154
  "queue": 8, "inference_concurrency": 1},
155
  "runtime": {"torch_threads": torch.get_num_threads(),
 
156
  "cpu_affinity_count": len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else None,
157
  "cpu_max": read_limit("/sys/fs/cgroup/cpu.max"),
158
  "memory_max": read_limit("/sys/fs/cgroup/memory.max"),
 
55
 
56
 
57
  torch.set_num_threads(cpu_threads())
58
+ # The HF/ZeroGPU runtime initializes inter-op scheduling before this app loads.
59
+ # Do not reset that process-global one-shot setting after initialization.
60
 
61
  _MODELS = {}
62
  _GALLERY = None
 
154
  "captions": 100, "coordinate_candidates": 100, "top_k": 20,
155
  "queue": 8, "inference_concurrency": 1},
156
  "runtime": {"torch_threads": torch.get_num_threads(),
157
+ "torch_interop_threads": torch.get_num_interop_threads(),
158
  "cpu_affinity_count": len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else None,
159
  "cpu_max": read_limit("/sys/fs/cgroup/cpu.max"),
160
  "memory_max": read_limit("/sys/fs/cgroup/memory.max"),