[GH-ISSUE #120] [BUG] generating stable diffusion images is broken in neo branch #74

Closed
opened 2026-10-15 18:04:07 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @FranciscoFornell on GitHub (Aug 13, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/120

Hi! I know neo branch contains work in progress, but I wanted to let you know this, just in case you didn't notice SD feature is broken in that branch. To reproduce the error you just need to use /sd using neo branch, and it instantly fails.
This is the error on SillyTavern-extras console:

[2023-08-13 15:28:42,449] ERROR in app: Exception on /api/image [POST]
Traceback (most recent call last):
File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
^^^^^^^^^^^^^^^^^^
File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\SillyTavern-extras\server.py", line 388, in decorated_view
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "D:\AI\SillyTavern-extras\server.py", line 749, in api_image
else type(default_value)
^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

I ran SillyTavern-extras with this parameters:

python server.py --enable-modules=caption,summarize,classify,talkinghead,sd,coqui-tts,chromadb --cuda --coqui-gpu --talkinghead-gpu --sd-remote-port 7861 --classification-model=joeddav/distilbert-base-uncased-go-emotions-student

I ended up using main branch again to not loose the SD feature, but it has been fun playing around with coqui-tts and talking head. 🙂

Originally created by @FranciscoFornell on GitHub (Aug 13, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/120 Hi! I know neo branch contains work in progress, but I wanted to let you know this, just in case you didn't notice SD feature is broken in that branch. To reproduce the error you just need to use /sd using neo branch, and it instantly fails. This is the error on SillyTavern-extras console: > [2023-08-13 15:28:42,449] ERROR in app: Exception on /api/image [POST] Traceback (most recent call last): File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) ^^^^^^^^^^^^^^^^^^ File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Paco\miniconda3\envs\SillyTavernExtrasNeo\Lib\site-packages\flask\app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\SillyTavern-extras\server.py", line 388, in decorated_view return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "D:\AI\SillyTavern-extras\server.py", line 749, in api_image else type(default_value) ^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not callable I ran SillyTavern-extras with this parameters: > python server.py --enable-modules=caption,summarize,classify,talkinghead,sd,coqui-tts,chromadb --cuda --coqui-gpu --talkinghead-gpu --sd-remote-port 7861 --classification-model=joeddav/distilbert-base-uncased-go-emotions-student I ended up using main branch again to not loose the SD feature, but it has been fun playing around with coqui-tts and talking head. 🙂
Author
Owner

@Ph0rk0z commented on GitHub (Aug 13, 2023):

Do you have coqui enabled? That's what breaks it for me. Otherwise I have been using it all week.

<!-- gh-comment-id:1676394605 --> @Ph0rk0z commented on GitHub (Aug 13, 2023): Do you have coqui enabled? That's what breaks it for me. Otherwise I have been using it all week.
Author
Owner

@Cohee1207 commented on GitHub (Aug 13, 2023):

Thanks for giving me the lead @Ph0rk0z
I love Python for being able to overwrite a built-in function with a random global variable from another module. This is hopefully been fixed without breaking neither SD nor coqui.

<!-- gh-comment-id:1676398170 --> @Cohee1207 commented on GitHub (Aug 13, 2023): Thanks for giving me the lead @Ph0rk0z I love Python for being able to overwrite a built-in function with a random global variable from another module. This is hopefully been fixed without breaking neither SD nor coqui.
Author
Owner

@Ph0rk0z commented on GitHub (Aug 13, 2023):

Nice. RVC + Silero already sounds like the character but the TTS is flat. Maybe one of these will be better. I tried edge-tts but it was about equivalent.

<!-- gh-comment-id:1676403360 --> @Ph0rk0z commented on GitHub (Aug 13, 2023): Nice. RVC + Silero already sounds like the character but the TTS is flat. Maybe one of these will be better. I tried edge-tts but it was about equivalent.
Author
Owner

@FranciscoFornell commented on GitHub (Aug 14, 2023):

@Ph0rk0z you'r right! I didn't notice, but it works when I disable coqui.
@Cohee1207 I pulled your latest changes and now it works like a charm using both coqui and sd. Thanks!

<!-- gh-comment-id:1676999032 --> @FranciscoFornell commented on GitHub (Aug 14, 2023): @Ph0rk0z you'r right! I didn't notice, but it works when I disable coqui. @Cohee1207 I pulled your latest changes and now it works like a charm using both coqui and sd. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Extras#74
No description provided.