diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 9118d74f7..fe90daa25 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -351,7 +351,7 @@ def connect_paste(button, local_paste_fields, input_comp, override_settings_comp prompt = file.read() else: prompt = '' - shared.log.debug(f'paste prompt: {prompt}') + shared.log.debug(f'Paste prompt: {prompt}') params = parse_generation_parameters(prompt) script_callbacks.infotext_pasted_callback(prompt, params) res = [] diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 25fa779f0..cf8b2b37a 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -27,7 +27,8 @@ from modules.shared import opts, log round_bracket_multiplier = 1.1 square_bracket_multiplier = 1.0 / 1.1 re_AND = re.compile(r"\bAND\b") -re_weight = re.compile(r"^(.*?)(?:\s*:\s*([-+]?(?:\d+\.?|\d*\.\d+)))?\s*$") +# re_weight = re.compile(r"^(.*?)(?:\s*:\s*([-+]?(?:\d+\.?|\d*\.\d+)))?\s*$") +re_weight = re.compile(r"^((?:\s|.)*?)(?:\s*:\s*([-+]?(?:\d+\.?|\d*\.\d+)))?\s*$") ScheduledPromptConditioning = namedtuple("ScheduledPromptConditioning", ["end_at_step", "cond"]) schedule_parser = lark.Lark(r""" !start: (prompt | /[][():]/+)* diff --git a/modules/ui.py b/modules/ui.py index eafdbe3d4..51ec22577 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -44,6 +44,7 @@ def gr_show(visible=True): sample_img2img = "assets/stable-samples/img2img/sketch-mountains-input.jpg" sample_img2img = sample_img2img if os.path.exists(sample_img2img) else None +paste_function = None # Using constants for these since the variation selector isn't visible. # Important that they exactly match script.js for tooltip to work. @@ -471,22 +472,23 @@ def create_ui(startup_timer = None): (txt2img_prompt, "Prompt"), (txt2img_negative_prompt, "Negative prompt"), (steps, "Steps"), - (sampler_index, "Sampler"), - (latent_index, "Latent sampler"), - (restore_faces, "Face restoration"), - (cfg_scale, "CFG scale"), - (clip_skip, "Clip skip"), (seed, "Seed"), + (sampler_index, "Sampler"), + (cfg_scale, "CFG scale"), (width, "Size-1"), (height, "Size-2"), - (batch_size, "Batch size"), (subseed, "Variation seed"), (subseed_strength, "Variation strength"), + (clip_skip, "Clip skip"), + (latent_index, "Latent sampler"), + (denoising_strength, "Denoising strength"), + (refiner_denoise_start, "Denoising strength"), + (refiner_denoise_end, "Denoising end"), + (restore_faces, "Face restoration"), + (batch_size, "Batch size"), + (batch_count, "Batch count"), (seed_resize_from_w, "Seed resize from-1"), (seed_resize_from_h, "Seed resize from-2"), - (denoising_strength, "Denoising strength"), - (show_second_pass, lambda d: "Denoising strength" in d), - (show_second_pass, lambda d: gr.Row.update(visible="Denoising strength" in d)), (hr_scale, "Hires upscale"), (hr_upscaler, "Hires upscaler"), (hr_second_pass_steps, "Hires steps"), @@ -824,20 +826,29 @@ def create_ui(startup_timer = None): (img2img_prompt, "Prompt"), (img2img_negative_prompt, "Negative prompt"), (steps, "Steps"), - (sampler_index, "Sampler"), - (restore_faces, "Face restoration"), - (cfg_scale, "CFG scale"), - (image_cfg_scale, "Image CFG scale"), - (clip_skip, "Clip skip"), (seed, "Seed"), + (sampler_index, "Sampler"), + (cfg_scale, "CFG scale"), (width, "Size-1"), (height, "Size-2"), - (batch_size, "Batch size"), (subseed, "Variation seed"), (subseed_strength, "Variation strength"), + (clip_skip, "Clip skip"), + (latent_index, "Latent sampler"), + (denoising_strength, "Denoising strength"), + (refiner_denoise_start, "Denoising strength"), + (refiner_denoise_end, "Denoising end"), + (restore_faces, "Face restoration"), + (batch_size, "Batch size"), + (batch_count, "Batch count"), (seed_resize_from_w, "Seed resize from-1"), (seed_resize_from_h, "Seed resize from-2"), - (denoising_strength, "Denoising strength"), + (hr_scale, "Hires upscale"), + (hr_upscaler, "Hires upscaler"), + (hr_second_pass_steps, "Hires steps"), + (hr_resize_x, "Hires resize-1"), + (hr_resize_y, "Hires resize-2"), + (image_cfg_scale, "Image CFG scale"), (mask_blur, "Mask blur"), *modules.scripts.scripts_img2img.infotext_fields ] diff --git a/wiki b/wiki index bdc13d705..6257ac57c 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit bdc13d7053215d3135134809a9d3a4182f8f9c9f +Subproject commit 6257ac57cc10407994b1bb1d800b589666e694b5