Added max-generations slider
parent
8283c03b1b
commit
401682b06e
|
|
@ -1,3 +1,4 @@
|
|||
- 2.3.7 Added a maximum generation slider to combinatorial mode - this replaces the batch_count * batch size calculation used previously.
|
||||
- 2.3.6 Using a Dummy Generator for attention grabber if spacy is not available
|
||||
- 2.3.5 Fixed extras requirement from dynamicprompts
|
||||
- 2.3.4 Changed the don't apply to negative prompts checkbox to apply to prompt magic only.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ sddp_ui = null
|
|||
onUiUpdate(function () {
|
||||
if (!sddp_loaded) {
|
||||
gradioApp().getElementById("dynamic-prompts-enabled").append("Complete documentation is available at https://github.com/adieyal/sd-dynamic-prompts. Please report any issues on GitHub.")
|
||||
gradioApp().getElementById("is-combinatorial").append("Generate all possible prompts up to a maximum of Batch count * Batch size)")
|
||||
gradioApp().getElementById("is-combinatorial").append("Generate all possible prompt combinations.")
|
||||
gradioApp().getElementById("is-magicprompt").append("Automatically update your prompt with interesting modifiers. (Runs slowly the first time)")
|
||||
gradioApp().getElementById("is-feelinglucky").append("Generate random prompts from lexica.art (your prompt is used as a search query).")
|
||||
gradioApp().getElementById("is-fixed-seed").append("Use the same seed for all prompts in this batch")
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ from prompts.generator_builder import GeneratorBuilder
|
|||
|
||||
from ui import wildcards_tab, save_params
|
||||
|
||||
VERSION = "2.3.6"
|
||||
VERSION = "2.3.7"
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
|
@ -136,6 +136,16 @@ class Script(scripts.Script):
|
|||
value=False,
|
||||
elem_id="is-combinatorial",
|
||||
)
|
||||
|
||||
max_generations = gr.Slider(
|
||||
label="Max generations (0 = all combinations - the batch count value is ignored)",
|
||||
minimum=0,
|
||||
maximum=1000,
|
||||
step=1,
|
||||
value=0,
|
||||
elem_id="max-generations",
|
||||
)
|
||||
|
||||
combinatorial_batches = gr.Slider(
|
||||
label="Combinatorial batches",
|
||||
minimum=1,
|
||||
|
|
@ -267,6 +277,7 @@ class Script(scripts.Script):
|
|||
disable_negative_prompt,
|
||||
enable_jinja_templates,
|
||||
no_image_generation,
|
||||
max_generations,
|
||||
]
|
||||
|
||||
def process(
|
||||
|
|
@ -287,6 +298,7 @@ class Script(scripts.Script):
|
|||
disable_negative_prompt,
|
||||
enable_jinja_templates,
|
||||
no_image_generation,
|
||||
max_generations,
|
||||
):
|
||||
|
||||
if not is_enabled:
|
||||
|
|
@ -303,6 +315,10 @@ class Script(scripts.Script):
|
|||
original_prompt, original_negative_prompt = get_prompts(p)
|
||||
original_seed = p.seed
|
||||
num_images = p.n_iter * p.batch_size
|
||||
if max_generations == 0 and is_combinatorial:
|
||||
num_images = None
|
||||
else:
|
||||
num_images = max_generations
|
||||
combinatorial_batches = int(combinatorial_batches)
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in New Issue