initial commit

This commit is contained in:
2025-10-21 13:37:07 +07:00
commit 9cd16e276a
1574 changed files with 2675557 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
from modules import shared
import re
def strip_comments(text):
if shared.opts.enable_prompt_comments:
text = re.sub('(^|\n)#[^\n]*(\n|$)', '\n', text) # whole line comment
text = re.sub('#[^\n]*(\n|$)', '\n', text) # in the middle of the line comment
return text
shared.options_templates.update(shared.options_section(('sd', "Stable Diffusion", "sd"), {
"enable_prompt_comments": shared.OptionInfo(True, "Enable comments").info("Use # anywhere in the prompt to hide the text between # and the end of the line from the generation."),
}))