We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55a23b2 commit e6ff0b5Copy full SHA for e6ff0b5
comfy/context_windows.py
@@ -76,7 +76,7 @@ def add_window(self, full: torch.Tensor, to_add: torch.Tensor, dim=None) -> torc
76
idx = tuple([slice(None)] * dim + [self.index_list])
77
full[idx] += to_add
78
return full
79
-
+
80
def get_region_index(self, num_regions: int) -> int:
81
region_idx = int(self.center_ratio * num_regions)
82
return min(max(region_idx, 0), num_regions - 1)
0 commit comments