Force model availability, if inside a condition they will only be checked once so in order to see new models you would need to restart streamlit.

This commit is contained in:
ZeroCool940711 2022-10-05 23:47:05 -07:00
parent c2f1970e6b
commit 173d527979

View File

@ -294,14 +294,14 @@ def layout():
save_as_jpg = st.checkbox("Save samples as jpg", value=st.session_state['defaults'].txt2img.save_as_jpg, help="Saves the images as jpg instead of png.")
# check if GFPGAN, RealESRGAN and LDSR are available.
if "GFPGAN_available" not in st.session_state:
GFPGAN_available()
#if "GFPGAN_available" not in st.session_state:
GFPGAN_available()
if "RealESRGAN_available" not in st.session_state:
RealESRGAN_available()
#if "RealESRGAN_available" not in st.session_state:
RealESRGAN_available()
if "LDSR_available" not in st.session_state:
LDSR_available()
#if "LDSR_available" not in st.session_state:
LDSR_available()
if st.session_state["GFPGAN_available"] or st.session_state["RealESRGAN_available"] or st.session_state["LDSR_available"]:
with st.expander("Post-Processing"):