process() is only called once at the start of each batch request, so step_limit never gets reset to 0, but it should be each time we start generating a new image. The easiest fix I could think of is finding the number of steps per image (base step # + the hires step #) and resetting step_limit after we've called denoiser_callback() that # of times. I also added a call to remove_current_script_callbacks() which we should probably be doing anyways.
Changes
process()
is only called once at the start of each batch request, sostep_limit
never gets reset to 0, but it should be each time we start generating a new image. The easiest fix I could think of is finding the number of steps per image (base step # + the hires step #) and resettingstep_limit
after we've calleddenoiser_callback()
that # of times. I also added a call toremove_current_script_callbacks()
which we should probably be doing anyways.