diff --git a/README.md b/README.md index 49c0268..fbcf9f8 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,11 @@ Screenshot of config-txt2img.json, which can be opened with the "Open config fil
Click to view Changelog +#### 9/04/2023 +* Fixed config presets that used radio button components not working +#### 8/31/2023 +* Updated for Automatic1111 [v1.6.0](https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.6.0) +* Added support for "Refiner" (txt2img_enable-checkbox) and "Switch at" (txt2img_switch_at) components for txt2img and img2img, which are used for SDXL Refiner models. The refiner checkpoint component is not supported. #### 5/15/2023 * The UI no longer needs to be reloaded when creating a new config preset #### 4/29/2023 diff --git a/scripts/config_presets.py b/scripts/config_presets.py index da348fa..6159a9a 100644 --- a/scripts/config_presets.py +++ b/scripts/config_presets.py @@ -933,6 +933,15 @@ class Script(scripts.Script): if component_name in index_type_components and type(component_value) == int: current_components[component_name] = component_map[component_name].choices[component_value] + # A1111 1.6.0 changed radio buttons values into tuples. + # For example, for the "img2img_mask_mode" component it changed from: + # ['Inpaint masked', 'Inpaint not masked'] + # to + # [('Inpaint masked', 'Inpaint masked'), ('Inpaint not masked', 'Inpaint not masked')] + # Using a type == tuple check here will ensure compatibility with the older versions. + if type(current_components[component_name]) == tuple: + current_components[component_name] = current_components[component_name][0] + #print("Components after :", current_components) return list(current_components.values())