fix console total progress bar when using txt2img_upscale
add p.txt2img_upscale as indicator
This commit is contained in:
parent
e1dfd452c0
commit
2cf23099eb
|
@ -1227,8 +1227,11 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
|
||||||
if not state.processing_has_refined_job_count:
|
if not state.processing_has_refined_job_count:
|
||||||
if state.job_count == -1:
|
if state.job_count == -1:
|
||||||
state.job_count = self.n_iter
|
state.job_count = self.n_iter
|
||||||
|
if getattr(self, 'txt2img_upscale', False):
|
||||||
shared.total_tqdm.updateTotal((self.steps + (self.hr_second_pass_steps or self.steps)) * state.job_count)
|
total_steps = (self.hr_second_pass_steps or self.steps) * state.job_count
|
||||||
|
else:
|
||||||
|
total_steps = (self.steps + (self.hr_second_pass_steps or self.steps)) * state.job_count
|
||||||
|
shared.total_tqdm.updateTotal(total_steps)
|
||||||
state.job_count = state.job_count * 2
|
state.job_count = state.job_count * 2
|
||||||
state.processing_has_refined_job_count = True
|
state.processing_has_refined_job_count = True
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g
|
||||||
p.enable_hr = True
|
p.enable_hr = True
|
||||||
p.batch_size = 1
|
p.batch_size = 1
|
||||||
p.n_iter = 1
|
p.n_iter = 1
|
||||||
|
p.txt2img_upscale = True
|
||||||
|
|
||||||
geninfo = json.loads(generation_info)
|
geninfo = json.loads(generation_info)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue