Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Settings broken without GPU #1782

Open
1 task done
jangrewe opened this issue May 6, 2023 · 0 comments
Open
1 task done

[Bug]: Settings broken without GPU #1782

jangrewe opened this issue May 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jangrewe
Copy link

jangrewe commented May 6, 2023

What happened?

I only have 2GB VRAM on my "server", and because of that i always run out of memory even with all (i think) the optimizations enabled.
So i tried skipping the --gpus all, as i found some discussions and PR that suggest using only the CPU should also work (even if it's a bit slow).

Unfortunately, when going to the Settings page, i then immediately get an error because no GPU is found: "IndexError: list index out of range"

File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 563, in _run_script
    exec(code, module.__dict__)
File "/sd/scripts/webui_streamlit.py", line 203, in <module>
    layout()
File "/opt/conda/lib/python3.8/site-packages/loguru/_logger.py", line 1251, in catch_wrapper
    return function(*args, **kwargs)
File "/sd/scripts/webui_streamlit.py", line 192, in layout
    layout()
File "/opt/conda/lib/python3.8/site-packages/loguru/_logger.py", line 1251, in catch_wrapper
    return function(*args, **kwargs)
File "/sd/scripts/Settings.py", line 56, in layout
    help=f"Select which GPU to use. Default: {device_list[0]}").split(":")[0])

Version

0.0.1 (Default)

What browsers are you seeing the problem on?

Firefox

Where are you running the webui?

Linux

Custom settings

No response

Relevant log output

ERROR      @ 2023-05-06 20:40:32 | __main__:layout:192 - An error has been caught in function 'layout', process 'MainProcess' (29), thread 'ScriptRunner.scriptThread' (139908492556032):
Traceback (most recent call last):

  File "/opt/conda/lib/python3.8/threading.py", line 890, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f3f2b67cca0><Thread(ScriptRunner.scriptThread, started 139908492556032)>
  File "/opt/conda/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f3f2b67c9d0><Thread(ScriptRunner.scriptThread, started 139908492556032)>
  File "/opt/conda/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
    │    │        │     ()
    │    │        └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
    │    └ <bound method ScriptRunner._run_script_thread of ScriptRunner(_session_id='f726daa9-eb6c-4b21-9f41-e32ea06a1a81', _main_scrip...
    └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
  File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 298, in _run_script_thread
    self._run_script(request.rerun_data)
    │    │           │       └ <property object at 0x7f3f1275e400>
    │    │           └ ScriptRequest(type=<ScriptRequestType.RERUN: 'RERUN'>, _rerun_data=RerunData(query_string='', widget_states=widgets {
    │    │               id: "...
    │    └ <function ScriptRunner._run_script at 0x7f3f12640040>
    └ ScriptRunner(_session_id='f726daa9-eb6c-4b21-9f41-e32ea06a1a81', _main_script_path='/sd/scripts/webui_streamlit.py', _uploade...
  File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 563, in _run_script
    exec(code, module.__dict__)
         │     │      └ <member '__dict__' of 'module' objects>
         │     └ <module '__main__' from '/sd/scripts/webui_streamlit.py'>
         └ <code object <module> at 0x7f3f0853b3a0, file "/sd/scripts/webui_streamlit.py", line 22>

  File "/sd/scripts/webui_streamlit.py", line 203, in <module>
    layout()
    └ <function layout at 0x7f3e0bb93dc0>

> File "/sd/scripts/webui_streamlit.py", line 192, in layout
    layout()
    └ <function layout at 0x7f3e0b7765e0>

  File "/sd/scripts/Settings.py", line 56, in layout
    help=f"Select which GPU to use. Default: {device_list[0]}").split(":")[0])

IndexError: list index out of range
ERROR      @ 2023-05-06 20:40:32 | __main__:<module>:203 - An error has been caught in function '<module>', process 'MainProcess' (29), thread 'ScriptRunner.scriptThread' (139908492556032):
Traceback (most recent call last):

  File "/opt/conda/lib/python3.8/threading.py", line 890, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f3f2b67cca0>
    └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
  File "/opt/conda/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f3f2b67c9d0>
    └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
  File "/opt/conda/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
    │    │        │    └ ()
    │    │        └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
    │    └ <bound method ScriptRunner._run_script_thread of ScriptRunner(_session_id='f726daa9-eb6c-4b21-9f41-e32ea06a1a81', _main_scrip...
    └ <Thread(ScriptRunner.scriptThread, started 139908492556032)>
  File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 298, in _run_script_thread
    self._run_script(request.rerun_data)
    │    │           │       └ <property object at 0x7f3f1275e400>
    │    │           └ ScriptRequest(type=<ScriptRequestType.RERUN: 'RERUN'>, _rerun_data=RerunData(query_string='', widget_states=widgets {
    │    │               id: "...
    │    └ <function ScriptRunner._run_script at 0x7f3f12640040>
    └ ScriptRunner(_session_id='f726daa9-eb6c-4b21-9f41-e32ea06a1a81', _main_script_path='/sd/scripts/webui_streamlit.py', _uploade...
  File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 563, in _run_script
    exec(code, module.__dict__)
         │     │      └ <member '__dict__' of 'module' objects>
         │     └ <module '__main__' from '/sd/scripts/webui_streamlit.py'><code object <module> at 0x7f3f0853b3a0, file "/sd/scripts/webui_streamlit.py", line 22>

> File "/sd/scripts/webui_streamlit.py", line 203, in <module>
    layout()
    └ <function layout at 0x7f3e0bb93dc0>

  File "/sd/scripts/webui_streamlit.py", line 192, in layout
    layout()
    └ <function layout at 0x7f3e0b7765e0>

  File "/sd/scripts/Settings.py", line 56, in layout
    help=f"Select which GPU to use. Default: {device_list[0]}").split(":")[0])

IndexError: list index out of range
2023-05-06 20:40:32.481 Uncaught app exception
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 563, in _run_script
    exec(code, module.__dict__)
  File "/sd/scripts/webui_streamlit.py", line 203, in <module>
    layout()
  File "/opt/conda/lib/python3.8/site-packages/loguru/_logger.py", line 1251, in catch_wrapper
    return function(*args, **kwargs)
  File "/sd/scripts/webui_streamlit.py", line 192, in layout
    layout()
  File "/opt/conda/lib/python3.8/site-packages/loguru/_logger.py", line 1251, in catch_wrapper
    return function(*args, **kwargs)
  File "/sd/scripts/Settings.py", line 56, in layout
    help=f"Select which GPU to use. Default: {device_list[0]}").split(":")[0])
IndexError: list index out of range

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jangrewe jangrewe added the bug Something isn't working label May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant