fix control batch and hires

This commit is contained in:
Vladimir Mandic
2024-03-17 14:53:15 -04:00
parent 2508f4f245
commit d0e35a7a6b
4 changed files with 13 additions and 11 deletions
+3 -3
View File
@@ -324,9 +324,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
def infotext(index): # pylint: disable=function-redefined # noqa: F811
return create_infotext(p, p.prompts, p.seeds, p.subseeds, index=index, all_negative_prompts=p.negative_prompts)
if hasattr(shared.sd_model, 'restore_pipeline') and shared.sd_model.restore_pipeline is not None:
shared.sd_model.restore_pipeline()
for i, x_sample in enumerate(x_samples_ddim):
if hasattr(p, 'recursion'):
continue
@@ -384,6 +381,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
del x_samples_ddim
devices.torch_gc()
if hasattr(shared.sd_model, 'restore_pipeline') and shared.sd_model.restore_pipeline is not None:
shared.sd_model.restore_pipeline()
t1 = time.time()
shared.log.info(f'Processed: images={len(output_images)} time={t1 - t0:.2f} its={(p.steps * len(output_images)) / (t1 - t0):.2f} memory={memstats.memory_stats()}')