From 3bc8ee998db5f461b8011a72e6f167012ccb8bc1 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sun, 22 Jan 2023 16:35:42 +0300 Subject: [PATCH] Gen params paste improvement --- modules/generation_parameters_copypaste.py | 4 ++-- modules/processing.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 44c8273f4..98098cc80 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -269,9 +269,9 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model res[k] = v if k.startswith("Hires prompt"): - res["Hires prompt"] = v[1:][:-1] + res["Hires prompt"] = v[1:][:-1].replace(';', ',') elif k.startswith("Hires negative prompt"): - res["Hires negative prompt"] = v[1:][:-1] + res["Hires negative prompt"] = v[1:][:-1].replace(';', ',') # Missing CLIP skip means it was set to 1 (the default) if "Clip skip" not in res: diff --git a/modules/processing.py b/modules/processing.py index c56717f60..01c1b53c9 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -790,8 +790,8 @@ 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}"' - self.extra_generation_params["Hires negative prompt"] = f'"{self.hr_negative_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(",", ";")})' self.hr_upscale_to_x = int(self.width * self.hr_scale) self.hr_upscale_to_y = int(self.height * self.hr_scale) else: