diff options
author | InvincibleDude <81354513+InvincibleDude@users.noreply.github.com> | 2023-02-05 15:24:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 15:24:41 +0000 |
commit | c3bd113a0b969732a324aff415c49ea9ad434707 (patch) | |
tree | 2652d4bb415e81a9818c7b2a371456c6f16eed6f | |
parent | f4b78e73a424299a496801930e6d8868d8d03e61 (diff) |
Image info fix
-rw-r--r-- | modules/processing.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/processing.py b/modules/processing.py index 61e6dfcd..43fac21c 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -808,6 +808,13 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): def init(self, all_prompts, all_seeds, all_subseeds):
if self.enable_hr:
+ if self.hr_sampler != '---':
+ self.extra_generation_params["Hires sampler"] = self.hr_sampler
+
+ if self.hr_prompt != '':
+ self.extra_generation_params["Hires prompt"] = f'({self.hr_prompt.replace(",", ";")})'
+ self.extra_generation_params["Hires negative prompt"] = f'({self.hr_negative_prompt.replace(",", ";")})'
+
if opts.use_old_hires_fix_width_height and self.applied_old_hires_behavior_to != (self.width, self.height):
self.hr_resize_x = self.width
self.hr_resize_y = self.height
@@ -819,9 +826,6 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): if self.hr_resize_x == 0 and self.hr_resize_y == 0:
self.extra_generation_params["Hires upscale"] = self.hr_scale
- self.extra_generation_params["Hires sampler"] = self.hr_sampler
- self.extra_generation_params["Hires prompt"] = f'({self.hr_prompt.replace(",", ";")})'
- self.extra_generation_params["Hires negative prompt"] = f'({self.hr_negative_prompt.replace(",", ";")})'
self.hr_upscale_to_x = int(self.width * self.hr_scale)
self.hr_upscale_to_y = int(self.height * self.hr_scale)
else:
|