add context-aware image resize

This commit is contained in:
Vladimir Mandic
2024-09-07 11:58:58 -04:00
parent 7f347b0876
commit 605e5f67aa
12 changed files with 98 additions and 56 deletions
+4
View File
@@ -171,6 +171,10 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
p.hr_force = True
# hires
p.denoising_strength = getattr(p, 'hr_denoising_strength', p.denoising_strength)
if p.hr_force and p.denoising_strength == 0:
shared.log.warning('HiRes skip: denoising=0')
p.hr_force = False
if p.hr_force:
shared.state.job_count = 2 * p.n_iter
shared.sd_model = sd_models.set_diffuser_pipe(shared.sd_model, sd_models.DiffusersTaskType.IMAGE_2_IMAGE)