Merge pull request #2663 from space-nuko/fix-xyplot-steps
Fix XY-plot steps if highres fix is enabled
This commit is contained in:
commit
9563636489
1 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,7 @@ import gradio as gr
|
|||
|
||||
from modules import images
|
||||
from modules.hypernetworks import hypernetwork
|
||||
from modules.processing import process_images, Processed, get_correct_sampler
|
||||
from modules.processing import process_images, Processed, get_correct_sampler, StableDiffusionProcessingTxt2Img
|
||||
from modules.shared import opts, cmd_opts, state
|
||||
import modules.shared as shared
|
||||
import modules.sd_samplers
|
||||
|
@ -354,6 +354,9 @@ class Script(scripts.Script):
|
|||
else:
|
||||
total_steps = p.steps * len(xs) * len(ys)
|
||||
|
||||
if isinstance(p, StableDiffusionProcessingTxt2Img) and p.enable_hr:
|
||||
total_steps *= 2
|
||||
|
||||
print(f"X/Y plot will create {len(xs) * len(ys) * p.n_iter} images on a {len(xs)}x{len(ys)} grid. (Total steps to process: {total_steps * p.n_iter})")
|
||||
shared.total_tqdm.updateTotal(total_steps * p.n_iter)
|
||||
|
||||
|
|
Loading…
Reference in a new issue