diff --git a/CHANGELOG.md b/CHANGELOG.md index 61e101524..ad0be2dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,11 @@ - new History tab where you can see all jobs since the server startup and optionally download any of the previously generated images/videos access via *system -> history* + - server restart from ui now replaces currently running process + instead of trying to reload python modules in-place + - add option to enable/disable clip skip + disabled by default to avoid issues with frequent incorrect recommendations + in *settings -> pipeline modifiers* - configurable restore metadata from image to settings and to params in *settings -> image metadata* - **API** diff --git a/TODO.md b/TODO.md index bf27e236f..6af2839a0 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,8 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma ## Current -- ModernUI for custom model loader +- ModernUI for custom model loader +- ModernUI for history tab ### Issues/Limitations diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 901da2f7a..98c2b39cd 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -129,6 +129,8 @@ def create_buttons(tabs_list): def should_skip(param): skip_params = [p.strip().lower() for p in shared.opts.disable_apply_params.split(",")] + if not shared.opts.clip_skip_enabled: + skip_params += ['clip skip'] all_params = [p.lower() for p in get_all_fields()] valid = any(p in all_params for p in skip_params) skip = param.lower() in skip_params @@ -225,15 +227,16 @@ def connect_paste(button, local_paste_fields, input_comp, override_settings_comp if os.path.exists(filename): with open(filename, "r", encoding="utf8") as file: prompt = file.read() - shared.log.debug(f'Paste prompt: type="params" prompt="{prompt}"') + shared.log.debug(f'Prompt parse: type="params" prompt="{prompt}"') else: prompt = '' else: - shared.log.debug(f'Paste prompt: type="current" prompt="{prompt}"') + shared.log.debug(f'Prompt parse: type="current" prompt="{prompt}"') params = parse(prompt) script_callbacks.infotext_pasted_callback(prompt, params) res = [] applied = {} + skipped = {} for output, key in local_paste_fields: if callable(key): v = key(params) @@ -248,6 +251,7 @@ def connect_paste(button, local_paste_fields, input_comp, override_settings_comp if should_skip(key): debug(f'Paste skip: "{key}"="{v}"') res.append(gr.update()) + skipped[key] = v continue try: valtype = type(output.value) @@ -262,7 +266,8 @@ def connect_paste(button, local_paste_fields, input_comp, override_settings_comp applied[key] = val except Exception: res.append(gr.update()) - debug(f"Parse apply: {applied}") + list_applied = [{k: v} for k, v in applied.items() if not callable(v) and not callable(k)] + shared.log.debug(f"Prompt restore: apply={list_applied} skip={skipped}") return res if override_settings_component is not None: diff --git a/modules/shared.py b/modules/shared.py index fa4bf61fa..78f90cea7 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -558,6 +558,9 @@ options_templates.update(options_section(('quantization', "Quantization Settings })) options_templates.update(options_section(('advanced', "Pipeline Modifiers"), { + "clip_skip_sep": OptionInfo("