File size: 1,482 Bytes
bb7f1f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""This module adds options to the settings window."""
from modules import shared
from modules import script_callbacks

def on_ui_settings() -> None:
    """Adds options to the settings window."""
    section = ("batchCP ", "batch checkpoint prompt")
    shared.opts.add_option(
        key = "promptRegex",
        info = shared.OptionInfo(
            "{prompt}",
            "Prompt placeholder",
            section=section)
    )

    shared.opts.add_option(
        key = "widthHeightRegex",
        info = shared.OptionInfo(
            "\{\{size:(\d+)x(\d+)\}\}",
            "Width and height Regex",
            section=section)
    )

    shared.opts.add_option(
        key = "batchCountRegex",
        info = shared.OptionInfo(
            "\{\{count:[0-9]+\}\}",
            "Batch count Regex",
            section=section)
    )

    shared.opts.add_option(
        key = "clipSkipRegex",
        info = shared.OptionInfo(
            "\{\{clip_skip:[0-9]+\}\}",
            "Clip skip Regex",
            section=section)
    )

    shared.opts.add_option(
        key = "negPromptRegex",
        info = shared.OptionInfo(
            "\{\{neg:(.*?)\}\}",
            "negative Prompt Regex",
            section=section)
    )

    shared.opts.add_option(
        key = "styleRegex",
        info = shared.OptionInfo(
            "\{\{style:(.*?)\}\}",
            "style Regex",
            section=section)
    )

script_callbacks.on_ui_settings(on_ui_settings)