Spaces:
Sleeping
Sleeping
Increase chunk sizes for better performance
Browse files- CTransPath: 2,000 -> 10,000 tiles per chunk (5x increase)
- Optimus: 1,500 -> 10,000 tiles per chunk (6.7x increase)
- Each chunk still well within 180s/300s GPU token limits
- Most slides will process in 1-2 chunks now
- Fewer GPU allocations = better performance
- src/mosaic/analysis.py +2 -2
src/mosaic/analysis.py
CHANGED
|
@@ -83,7 +83,7 @@ def _extract_ctranspath_features(coords, slide_path, attrs, num_workers):
|
|
| 83 |
if IS_ZEROGPU:
|
| 84 |
num_workers = 0
|
| 85 |
# Split into chunks - each chunk gets its own GPU call/token
|
| 86 |
-
chunk_size = 2000
|
| 87 |
logger.info(f"Running CTransPath on ZeroGPU: splitting {len(coords)} tiles into chunks of {chunk_size}")
|
| 88 |
else:
|
| 89 |
num_workers = max(num_workers, 8)
|
|
@@ -176,7 +176,7 @@ def _extract_optimus_features(filtered_coords, slide_path, attrs, num_workers):
|
|
| 176 |
if IS_ZEROGPU:
|
| 177 |
num_workers = 0
|
| 178 |
# Split into chunks - each chunk gets its own GPU call/token
|
| 179 |
-
chunk_size = 1500
|
| 180 |
logger.info(f"Running Optimus on ZeroGPU: splitting {len(filtered_coords)} tiles into chunks of {chunk_size}")
|
| 181 |
else:
|
| 182 |
num_workers = max(num_workers, 8)
|
|
|
|
| 83 |
if IS_ZEROGPU:
|
| 84 |
num_workers = 0
|
| 85 |
# Split into chunks - each chunk gets its own GPU call/token
|
| 86 |
+
chunk_size = 10000 # Increased from 2000 - each chunk gets full 180s
|
| 87 |
logger.info(f"Running CTransPath on ZeroGPU: splitting {len(coords)} tiles into chunks of {chunk_size}")
|
| 88 |
else:
|
| 89 |
num_workers = max(num_workers, 8)
|
|
|
|
| 176 |
if IS_ZEROGPU:
|
| 177 |
num_workers = 0
|
| 178 |
# Split into chunks - each chunk gets its own GPU call/token
|
| 179 |
+
chunk_size = 10000 # Increased from 1500 - each chunk gets full 300s
|
| 180 |
logger.info(f"Running Optimus on ZeroGPU: splitting {len(filtered_coords)} tiles into chunks of {chunk_size}")
|
| 181 |
else:
|
| 182 |
num_workers = max(num_workers, 8)
|