Fixed error with CustomModel_available not being in session_state after the Settings page change.

This commit is contained in:
ZeroCool940711 2022-09-24 15:27:09 -07:00
parent fa4e63a549
commit 3816b28d2c
3 changed files with 3 additions and 0 deletions

View File

@ -372,6 +372,7 @@ def layout():
with col1_img2img_layout:
# If we have custom models available on the "models/custom"
#folder then we show a menu to select which model we want to use, otherwise we use the main model for SD
custom_models_available()
if st.session_state["CustomModel_available"]:
st.session_state["custom_model"] = st.selectbox("Custom Model:", st.session_state["custom_models"],
index=st.session_state["custom_models"].index(st.session_state['defaults'].general.default_model),

View File

@ -208,6 +208,7 @@ def layout():
with col3:
# If we have custom models available on the "models/custom"
#folder then we show a menu to select which model we want to use, otherwise we use the main model for SD
custom_models_available()
if st.session_state.CustomModel_available:
st.session_state.custom_model = st.selectbox("Custom Model:", st.session_state.custom_models,
index=st.session_state["custom_models"].index(st.session_state['defaults'].general.default_model),

View File

@ -680,6 +680,7 @@ def layout():
with col3:
# If we have custom models available on the "models/custom"
#folder then we show a menu to select which model we want to use, otherwise we use the main model for SD
custom_models_available()
if st.session_state["CustomModel_available"]:
custom_model = st.selectbox("Custom Model:", st.session_state["defaults"].txt2vid.custom_models_list,
index=st.session_state["defaults"].txt2vid.custom_models_list.index(st.session_state["defaults"].txt2vid.default_model),