mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-15 06:41:00 -08:00
Strip comments from hires fix prompt
This commit is contained in:
parent
bef51aed03
commit
5f4203bf9b
1 changed files with 7 additions and 0 deletions
|
|
@ -26,6 +26,13 @@ class ScriptStripComments(scripts.Script):
|
||||||
p.main_prompt = strip_comments(p.main_prompt)
|
p.main_prompt = strip_comments(p.main_prompt)
|
||||||
p.main_negative_prompt = strip_comments(p.main_negative_prompt)
|
p.main_negative_prompt = strip_comments(p.main_negative_prompt)
|
||||||
|
|
||||||
|
if getattr(p, 'enable_hr', False):
|
||||||
|
p.all_hr_prompts = [strip_comments(x) for x in p.all_hr_prompts]
|
||||||
|
p.all_hr_negative_prompts = [strip_comments(x) for x in p.all_hr_negative_prompts]
|
||||||
|
|
||||||
|
p.hr_prompt = strip_comments(p.hr_prompt)
|
||||||
|
p.hr_negative_prompt = strip_comments(p.hr_negative_prompt)
|
||||||
|
|
||||||
|
|
||||||
def before_token_counter(params: script_callbacks.BeforeTokenCounterParams):
|
def before_token_counter(params: script_callbacks.BeforeTokenCounterParams):
|
||||||
if not shared.opts.enable_prompt_comments:
|
if not shared.opts.enable_prompt_comments:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue