wcde / sd-webui-kohya-hiresfix

227 stars 10 forks source link

Batch support fix #10

Closed ArrowM closed 1 year ago

ArrowM commented 1 year ago

Changes

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.