wcde / sd-webui-kohya-hiresfix

224 stars 9 forks source link

Batch support fix #10

Closed ArrowM closed 7 months ago

ArrowM commented 7 months 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.