Skip to content

Commit

Permalink
Gen params paste improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
invincibledude committed Jan 22, 2023
1 parent 7f62300 commit 3bc8ee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/generation_parameters_copypaste.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ def parse_generation_parameters(x: str):
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:
Expand Down
4 changes: 2 additions & 2 deletions modules/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,8 @@ def init(self, all_prompts, all_seeds, all_subseeds):
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:
Expand Down

0 comments on commit 3bc8ee9

Please sign in to comment.