Upload dc.py
Browse files
dc.py
CHANGED
@@ -787,7 +787,6 @@ def get_vaes():
|
|
787 |
return vae_model_list
|
788 |
|
789 |
|
790 |
-
#show_diffusers_model_list_detail = False
|
791 |
cached_diffusers_model_tupled_list = get_tupled_model_list(load_diffusers_format_model)
|
792 |
def get_diffusers_model_list(state: dict = {}):
|
793 |
show_diffusers_model_list_detail = get_state(state, "show_diffusers_model_list_detail")
|
@@ -798,7 +797,6 @@ def get_diffusers_model_list(state: dict = {}):
|
|
798 |
|
799 |
|
800 |
def enable_diffusers_model_detail(is_enable: bool = False, model_name: str = "", state: dict = {}):
|
801 |
-
# global show_diffusers_model_list_detail
|
802 |
show_diffusers_model_list_detail = is_enable
|
803 |
new_value = model_name
|
804 |
index = 0
|
@@ -809,7 +807,7 @@ def enable_diffusers_model_detail(is_enable: bool = False, model_name: str = "",
|
|
809 |
else:
|
810 |
new_value = load_diffusers_format_model[index]
|
811 |
set_state(state, "show_diffusers_model_list_detail", show_diffusers_model_list_detail)
|
812 |
-
return gr.update(value=is_enable), gr.update(value=new_value, choices=get_diffusers_model_list()), state
|
813 |
|
814 |
|
815 |
def load_model_prompt_dict():
|
|
|
787 |
return vae_model_list
|
788 |
|
789 |
|
|
|
790 |
cached_diffusers_model_tupled_list = get_tupled_model_list(load_diffusers_format_model)
|
791 |
def get_diffusers_model_list(state: dict = {}):
|
792 |
show_diffusers_model_list_detail = get_state(state, "show_diffusers_model_list_detail")
|
|
|
797 |
|
798 |
|
799 |
def enable_diffusers_model_detail(is_enable: bool = False, model_name: str = "", state: dict = {}):
|
|
|
800 |
show_diffusers_model_list_detail = is_enable
|
801 |
new_value = model_name
|
802 |
index = 0
|
|
|
807 |
else:
|
808 |
new_value = load_diffusers_format_model[index]
|
809 |
set_state(state, "show_diffusers_model_list_detail", show_diffusers_model_list_detail)
|
810 |
+
return gr.update(value=is_enable), gr.update(value=new_value, choices=get_diffusers_model_list(state)), state
|
811 |
|
812 |
|
813 |
def load_model_prompt_dict():
|