fix: batch index

This commit is contained in:
Bingsu
2023-07-18 20:19:00 +09:00
parent b2b64fe288
commit 88de22b4eb

View File

@@ -498,14 +498,15 @@ class AfterDetailerScript(scripts.Script):
@staticmethod
def need_call_process(p) -> bool:
i = p.batch_index
i = p._ad_idx
bs = p.batch_size
return i == bs - 1
return i % bs == bs - 1
@staticmethod
def need_call_postprocess(p) -> bool:
i = p.batch_index
return i == 0
i = p._ad_idx
bs = p.batch_size
return i % bs == 0
@rich_traceback
def process(self, p, *args_):