fix controlnet with batch count

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-01-05 15:12:20 -05:00
parent 17760cf75b
commit 1f150ef466
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -201,7 +201,7 @@ def process_hires(p: processing.StableDiffusionProcessing, output):
update_sampler(p, shared.sd_model, second_pass=True)
orig_denoise = p.denoising_strength
p.denoising_strength = strength
p.task_args.pop('image', None) # remove image override from hires
orig_image = p.task_args.pop('image', None) # remove image override from hires
hires_args = set_pipeline_args(
p=p,
model=shared.sd_model,
@@ -245,6 +245,8 @@ def process_hires(p: processing.StableDiffusionProcessing, output):
shared.log.error(f'Processing step=hires: args={hires_args} {e}')
errors.display(e, 'Processing')
modelstats.analyze()
if orig_image is not None:
p.task_args['image'] = orig_image
p.denoising_strength = orig_denoise
shared.state.job = prev_job
shared.state.nextjob()