diff --git a/README.md b/README.md
index b456dbb..ec24a5a 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
- 
+ 
diff --git a/README_RU.md b/README_RU.md
index 27fc87e..c72cb60 100644
--- a/README_RU.md
+++ b/README_RU.md
@@ -2,7 +2,7 @@
- 
+ 
diff --git a/reactor_ui/reactor_main_ui.py b/reactor_ui/reactor_main_ui.py
index c9a274a..6af44d2 100644
--- a/reactor_ui/reactor_main_ui.py
+++ b/reactor_ui/reactor_main_ui.py
@@ -11,9 +11,14 @@ from modules import shared
# SAVE_ORIGINAL: bool = False
def update_fm_list(selected: str):
- return gr.Dropdown.update(
- value=selected, choices=get_model_names(get_facemodels)
- )
+ try: # GR3.x
+ return gr.Dropdown.update(
+ value=selected, choices=get_model_names(get_facemodels)
+ )
+ except: # GR4.x
+ return gr.Dropdown(
+ value=selected, choices=get_model_names(get_facemodels)
+ )
# TAB MAIN
def show(is_img2img: bool, show_br: bool = True, **msgs):
@@ -24,29 +29,56 @@ def show(is_img2img: bool, show_br: bool = True, **msgs):
if evt.index == 2:
# if SAVE_ORIGINAL != selected:
# SAVE_ORIGINAL = selected
- return {
- control_col_1: gr.Column.update(visible=False),
- control_col_2: gr.Column.update(visible=False),
- control_col_3: gr.Column.update(visible=True),
- # save_original: gr.Checkbox.update(value=False,visible=False),
- imgs_hash_clear: gr.Button.update(visible=True)
- }
+ try: # GR3.x
+ return {
+ control_col_1: gr.Column.update(visible=False),
+ control_col_2: gr.Column.update(visible=False),
+ control_col_3: gr.Column.update(visible=True),
+ # save_original: gr.Checkbox.update(value=False,visible=False),
+ imgs_hash_clear: gr.Button.update(visible=True)
+ }
+ except: # GR4.x
+ return {
+ control_col_1: gr.Column(visible=False),
+ control_col_2: gr.Column(visible=False),
+ control_col_3: gr.Column(visible=True),
+ # save_original: gr.Checkbox.update(value=False,visible=False),
+ imgs_hash_clear: gr.Button(visible=True)
+ }
if evt.index == 0:
- return {
- control_col_1: gr.Column.update(visible=True),
- control_col_2: gr.Column.update(visible=False),
- control_col_3: gr.Column.update(visible=False),
- # save_original: gr.Checkbox.update(value=SAVE_ORIGINAL,visible=show_br),
- imgs_hash_clear: gr.Button.update(visible=False)
- }
+ try: # GR3.x
+ return {
+ control_col_1: gr.Column.update(visible=True),
+ control_col_2: gr.Column.update(visible=False),
+ control_col_3: gr.Column.update(visible=False),
+ # save_original: gr.Checkbox.update(value=SAVE_ORIGINAL,visible=show_br),
+ imgs_hash_clear: gr.Button.update(visible=False)
+ }
+ except: # GR4.x
+ return {
+ control_col_1: gr.Column(visible=True),
+ control_col_2: gr.Column(visible=False),
+ control_col_3: gr.Column(visible=False),
+ # save_original: gr.Checkbox.update(value=SAVE_ORIGINAL,visible=show_br),
+ imgs_hash_clear: gr.Button(visible=False)
+ }
if evt.index == 1:
- return {
- control_col_1: gr.Column.update(visible=False),
- control_col_2: gr.Column.update(visible=True),
- control_col_3: gr.Column.update(visible=False),
- # save_original: gr.Checkbox.update(value=SAVE_ORIGINAL,visible=show_br),
- imgs_hash_clear: gr.Button.update(visible=False)
- }
+ try: # GR3.x
+ return {
+ control_col_1: gr.Column.update(visible=False),
+ control_col_2: gr.Column.update(visible=True),
+ control_col_3: gr.Column.update(visible=False),
+ # save_original: gr.Checkbox.update(value=SAVE_ORIGINAL,visible=show_br),
+ imgs_hash_clear: gr.Button.update(visible=False)
+ }
+ except: # GR4.x
+ return {
+ control_col_1: gr.Column(visible=False),
+ control_col_2: gr.Column(visible=True),
+ control_col_3: gr.Column(visible=False),
+ # save_original: gr.Checkbox.update(value=SAVE_ORIGINAL,visible=show_br),
+ imgs_hash_clear: gr.Button(visible=False)
+ }
progressbar_area = gr.Markdown("")
with gr.Tab("Main"):
diff --git a/scripts/reactor_version.py b/scripts/reactor_version.py
index 977d7ff..307a6d9 100644
--- a/scripts/reactor_version.py
+++ b/scripts/reactor_version.py
@@ -1,5 +1,5 @@
app_title = "ReActor"
-version_flag = "v0.7.1-a1"
+version_flag = "v0.7.1-a2"
from scripts.reactor_logger import logger, get_Run, set_Run
from scripts.reactor_globals import DEVICE