r3gm commited on
Commit
71edb1d
·
verified ·
1 Parent(s): 953248b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1015,7 +1015,9 @@ with gr.Blocks(fill_width=True, fill_height=False) as app:
1015
  val = re.sub(r'<[^>]+>', '', val) # Delete html and loras
1016
  print("Removed LoRA written in the prompt")
1017
  if key in ["prompt", "neg_prompt"]:
1018
- val = re.sub(r'\s+', ' ', re.sub(r',+', ',', val)).strip()
 
 
1019
  if key in ["Steps", "width", "height", "Seed", "Hires steps", "Image resolution"]:
1020
  val = int(val)
1021
  if key == "FreeU":
 
1015
  val = re.sub(r'<[^>]+>', '', val) # Delete html and loras
1016
  print("Removed LoRA written in the prompt")
1017
  if key in ["prompt", "neg_prompt"]:
1018
+ val = re.sub(
1019
+ r"[^\S\r\n]+", " ", re.sub(r"[ \t]*,[ \t,]*", ", ", val)
1020
+ ).strip()
1021
  if key in ["Steps", "width", "height", "Seed", "Hires steps", "Image resolution"]:
1022
  val = int(val)
1023
  if key == "FreeU":