vidcraft / utils.py
ihsanvp's picture
fix: out of memory error
ce3d7bb
raw
history blame
298 Bytes
from gradio import Progress
def create_progress_updater(start: int, total: int, desc: str, progress: Progress):
def updater(pipe, step, timestep, callback_kwargs):
if progress:
progress((step + start + 1, total), desc=desc)
return callback_kwargs
return updater