Add a total_steps value to sampler callback.

This commit is contained in:
comfyanonymous
2023-05-03 12:58:10 -04:00
parent 93c64afaa9
commit 908dc1d5a8
4 changed files with 11 additions and 7 deletions

View File

@@ -100,7 +100,9 @@ class ProgressBar:
self.current = 0
self.hook = PROGRESS_BAR_HOOK
def update_absolute(self, value):
def update_absolute(self, value, total=None):
if total is not None:
self.total = total
if value > self.total:
value = self.total
self.current = value