stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: KeyError: 'st.session_state has no key "GFPGAN_model"

Open dineshdharme opened this issue 1 year ago • 6 comments

What happened?

A bug happened!

KeyError: 'st.session_state has no key "GFPGAN_model". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization'

Version

0.0.1 (Default)

What browsers are you seeing the problem on?

Chrome

Where are you running the webui?

Linux

Custom settings

No custom settings.

Relevant log output

Traceback (most recent call last):
  File "/home/scadza/anaconda3/envs/ldm/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 562, in _run_script
    exec(code, module.__dict__)
  File "/mnt/stabilitydiffusion/hlky-webui-starting/stable-diffusion-webui/scripts/webui_streamlit.py", line 177, in <module>
    layout()
  File "/mnt/stabilitydiffusion/hlky-webui-starting/stable-diffusion-webui/scripts/webui_streamlit.py", line 141, in layout
    layout()
  File "scripts/txt2img.py", line 406, in layout
    use_GFPGAN=st.session_state["use_GFPGAN"], GFPGAN_model=st.session_state["GFPGAN_model"] ,
  File "/home/scadza/anaconda3/envs/ldm/lib/python3.8/site-packages/streamlit/runtime/state/session_state_proxy.py", line 93, in __getitem__
    return get_session_state()[key]
  File "/home/scadza/anaconda3/envs/ldm/lib/python3.8/site-packages/streamlit/runtime/state/safe_session_state.py", line 111, in __getitem__
    return self._state[key]
  File "/home/scadza/anaconda3/envs/ldm/lib/python3.8/site-packages/streamlit/runtime/state/session_state.py", line 440, in __getitem__
    raise KeyError(_missing_key_error_message(key))
KeyError: 'st.session_state has no key "GFPGAN_model". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization'

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

dineshdharme avatar Oct 06 '22 18:10 dineshdharme

try clearing userconfig in configs/webui

codedealer avatar Oct 06 '22 18:10 codedealer

no effect. still same error.

dineshdharme avatar Oct 06 '22 19:10 dineshdharme

I had the same issue with a clean install. In the UI, I was able to go to Model Manager and hit the download button for GFPGAN to fix it.

brian000 avatar Oct 06 '22 22:10 brian000

yeah that worked.

dineshdharme avatar Oct 07 '22 04:10 dineshdharme

Seeing the same issue. How do I navigate to Model Manager?

chrisbigelow avatar Oct 08 '22 04:10 chrisbigelow

Seeing the same issue. How do I navigate to Model Manager?

Launch the Streamlit webui, it's one of the options in the hamburger menu on the left.

PrivateGER avatar Oct 08 '22 15:10 PrivateGER