Extend H3 spatial fallback ladder
This commit is contained in:
@@ -506,8 +506,8 @@ def _shrink_model_tile_param(param):
|
||||
next_param = dict(param)
|
||||
mode = str(next_param.get("tile_size_mode") or "specific_size")
|
||||
if mode == "rows_cols":
|
||||
rows = min(16, max(1, int(next_param.get("grid_rows", 2) or 2) * 2))
|
||||
cols = min(16, max(1, int(next_param.get("grid_cols", 2) or 2) * 2))
|
||||
rows = min(32, max(1, int(next_param.get("grid_rows", 2) or 2) * 2))
|
||||
cols = min(32, max(1, int(next_param.get("grid_cols", 2) or 2) * 2))
|
||||
if rows == int(next_param.get("grid_rows", 2) or 2) and cols == int(next_param.get("grid_cols", 2) or 2):
|
||||
return None
|
||||
next_param["grid_rows"] = rows
|
||||
@@ -527,7 +527,7 @@ def _shrink_model_tile_param(param):
|
||||
# Jump straight from a coarse specific-size tile to a conservative 4x4
|
||||
# equal-grid split. That usually cuts peak VRAM much harder than halving
|
||||
# the tile size through several retries, and it keeps the later retry
|
||||
# ladder simple: 4x4 -> 8x8 -> 16x16.
|
||||
# ladder simple: 4x4 -> 8x8 -> 16x16 -> 32x32.
|
||||
next_param["tile_size_mode"] = "rows_cols"
|
||||
next_param["grid_rows"] = 4
|
||||
next_param["grid_cols"] = 4
|
||||
|
||||
Reference in New Issue
Block a user