mirror of
https://github.com/sd-webui/stable-diffusion-webui.git
synced 2024-12-14 23:02:00 +03:00
Merge pull request #1122 from ZeroCool940711/dev
Removed condition to check if the defaults are in the st.session_state dictionary, this is not needed and would cause issues with it not being reloaded when the user changes something on it.
This commit is contained in:
commit
fe015d2267
@ -22,12 +22,14 @@ except:
|
|||||||
# remove some annoying deprecation warnings that show every now and then.
|
# remove some annoying deprecation warnings that show every now and then.
|
||||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||||
|
|
||||||
if "defaults" not in st.session_state:
|
|
||||||
st.session_state["defaults"] = OmegaConf.load(os.path.join("configs","webui", "webui_streamlit.yaml"))
|
|
||||||
|
|
||||||
if (os.path.exists(os.path.join("configs","webui", "userconfig_streamlit.yaml"))):
|
|
||||||
user_defaults = OmegaConf.load(os.path.join("configs","webui", "userconfig_streamlit.yaml"));
|
|
||||||
st.session_state["defaults"] = OmegaConf.merge(st.session_state["defaults"], user_defaults)
|
st.session_state["defaults"] = OmegaConf.load(os.path.join("configs","webui", "webui_streamlit.yaml"))
|
||||||
|
|
||||||
|
if (os.path.exists(os.path.join("configs","webui", "userconfig_streamlit.yaml"))):
|
||||||
|
user_defaults = OmegaConf.load(os.path.join("configs","webui", "userconfig_streamlit.yaml"));
|
||||||
|
st.session_state["defaults"] = OmegaConf.merge(st.session_state["defaults"], user_defaults)
|
||||||
|
|
||||||
defaults = st.session_state["defaults"]
|
defaults = st.session_state["defaults"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user