painebenjamin / app.enfugue.ai

ENFUGUE is an open-source web app for making studio-grade images and video using generative AI.
GNU General Public License v3.0
686 stars 65 forks source link

Thread error #86

Closed ArekKubinski closed 1 year ago

ArekKubinski commented 1 year ago

Hello, I am trying to run version 0.2.3 to no luck. I already tried to re download and reinstall it, clearing cache and db don't help also, here some errors:

$ cat enfugue.log 
2023-10-04 23:53:16,582 [cherrypy.error] INFO (_cplogging.py:213) [04/Oct/2023:23:53:16] ENGINE Bus STARTING
2023-10-04 23:53:16,688 [cherrypy.error] INFO (_cplogging.py:213) [04/Oct/2023:23:53:16] ENGINE Serving on https://0.0.0.0:45554
2023-10-04 23:53:16,689 [cherrypy.error] INFO (_cplogging.py:213) [04/Oct/2023:23:53:16] ENGINE Bus STARTED
2023-10-04 23:53:19,579 [cherrypy.error] WARNING (_cplogging.py:213) [04/Oct/2023:23:53:19] ENGINE socket.error 8
  File "cheroot/server.py", line 1287, in communicate
  File "cheroot/server.py", line 1077, in respond
  File "cheroot/wsgi.py", line 141, in respond
  File "cheroot/wsgi.py", line 223, in write
  File "cheroot/server.py", line 1131, in write
  File "cheroot/makefile.py", line 68, in write
  File "cheroot/makefile.py", line 24, in write
  File "cheroot/makefile.py", line 33, in _flush_unlocked
  File "socket.py", line 723, in write
  File "ssl.py", line 1206, in send
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2426)
$ cat enfugue-engine.log 
2023-10-05 15:25:41,074 [enfugue] DEBUG (process.py:350) Received instruction 1, action plan
2023-10-05 15:25:41,115 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936249540>
2023-10-05 15:25:41,115 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936249540>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017905149632 and this is thread id 140017401849536.
2023-10-05 15:25:41,116 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936249440>
2023-10-05 15:25:41,116 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936249440>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017913542336 and this is thread id 140017401849536.
2023-10-05 15:25:41,116 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936248b40>
2023-10-05 15:25:41,116 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936248540>
2023-10-05 15:25:41,116 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936248540>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017913542336 and this is thread id 140017401849536.
2023-10-05 15:25:41,116 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936248a40>
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936248a40>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017393456832 and this is thread id 140017401849536.
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936249340>
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936249340>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017947113152 and this is thread id 140017401849536.
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936249c40>
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936249c40>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017393456832 and this is thread id 140017401849536.
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936249240>
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936249240>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017359886016 and this is thread id 140017401849536.
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936249840>
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936249840>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017947113152 and this is thread id 140017401849536.
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5936248d40>
2023-10-05 15:25:41,117 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5936248d40>
Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017359886016 and this is thread id 140017401849536.
2023-10-05 15:25:41,203 [enfugue] DEBUG (process.py:167) Instruction 1 beginning task “Text to Image: Preparing Inference Pipeline”
2023-10-05 15:25:41,447 [enfugue] DEBUG (manager.py:1915) Inferencing on cuda, defaulting to dtype float16
2023-10-05 15:25:41,702 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5884ddfb40>
2023-10-05 15:25:41,702 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5884ddfb40>
Traceback (most recent call last):
  File "transformers/__init__.py", line 3865, in <module>
    raise OptionalDependencyNotAvailable()
transformers.utils.import_utils.OptionalDependencyNotAvailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
  File "sqlalchemy/engine/default.py", line 692, in do_close
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140017368278720 and this is thread id 140017401849536.
2023-10-05 15:25:41,707 [sqlalchemy.pool.impl.NullPool] DEBUG (base.py:253) Closing connection <sqlite3.Connection object at 0x7f5884dde840>
2023-10-05 15:25:41,707 [sqlalchemy.pool.impl.NullPool] ERROR (base.py:264) Exception closing connection <sqlite3.Connection object at 0x7f5884dde840>
Traceback (most recent call last):
  File "transformers/__init__.py", line 3865, in <module>
    raise OptionalDependencyNotAvailable()
transformers.utils.import_utils.OptionalDependencyNotAvailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "sqlalchemy/pool/base.py", line 262, in _close_connection
#####
this continues for quite a long

This is a clear install and my OS is Linux Ubuntu 23.04 x86_64 GPU: Driver Version: 535.104.12 CUDA Version: 12.2 NVIDIA GeForce MX130 (yes it is 2GB VRAM card 😢)

ArekKubinski commented 1 year ago

Also forgot to mention I was trying to run portable distribution and the errors happen when i click "enfugue" button on the web interface.

painebenjamin commented 1 year ago

Hello @ArekKubinski, thank you for the report!

I can tell you that almost all of those "errors" are known and handled situations, with the actual showstopper being here:

Traceback (most recent call last):
  File "transformers/__init__.py", line 3865, in <module>
    raise OptionalDependencyNotAvailable()
transformers.utils.import_utils.OptionalDependencyNotAvailable

I can't be certain exactly which dependency it is saying is not available without some further digging, but I can say that Enfugue will almost certainly not work on your GPU, I am sorry. The 2GB of VRAM could have potentially been surmounted with a lot of optimization, but unfortunately that card was designed for CUDA 6, an architecture we have long since left behind - even if it does work, you will find unacceptably poor performance.

I'm very sorry to have to be the bearer of bad news! I can at least mention that as of today I've partnered with RunDiffusion.com to offer Enfugue in the cloud, and I know you can at least get a half-hour on an 8GB card there for free if you still want to try Enfugue.

ArekKubinski commented 1 year ago

Yeah, I was suspecting this to happen, thanks for answering, time to run cpu env with conda then 🫠