chrisrude / oobabot

A Discord bot which talks to Large Language Model AIs running on oobabooga's text-generation-webui
MIT License
101 stars 34 forks source link

New Issue: aiohttp.client_exceptions.ServerTimeoutError: Timeout on reading data from socket #18

Closed TruthSearchers closed 1 year ago

TruthSearchers commented 1 year ago

Task exception was never retrieved future: <Task finished name='Task-35' coro=<ImageGenerator._generate_image() done, defined at /usr/local/lib/python3.10/dist-packages/oobabot/image_generator.py:194> exception=ServerTimeoutError('Timeout on reading data from socket')> Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/oobabot/image_generator.py", line 204, in _generate_image file = await image_task_to_file(image_task, image_prompt) File "/usr/local/lib/python3.10/dist-packages/oobabot/image_generator.py", line 16, in image_task_to_file await image_task File "/usr/local/lib/python3.10/dist-packages/oobabot/sd_client.py", line 234, in do_post_with_retry return await do_post() File "/usr/local/lib/python3.10/dist-packages/oobabot/sd_client.py", line 212, in do_post async with self.get_session().post( File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 1141, in aenter self._resp = await self._coro File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 560, in _request await resp.start(conn) File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 899, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/usr/local/lib/python3.10/dist-packages/aiohttp/streams.py", line 616, in read await self._waiter aiohttp.client_exceptions.ServerTimeoutError: Timeout on reading data from socket

this new issue from bot side checked A111 console there image is generated already but bot not taking the image

yesterday not facing this issue (i think some problem in new version )

also --dont-split-responses not working (giving error -:argument unidentified)

chrisrude commented 1 year ago

Thanks for the info. I'll fix the --dont-split-responses asap.

As for the other issue, when do you see it? Is it during image generation, or when you hit the "try again" button?

chrisrude commented 1 year ago

I'm not seeing the same error when passing --dont-split-responses. Could you please send me the command line you're running?

Also, to confirm you're running against the latest 'main' from github?

Thanks!

chrisrude commented 1 year ago

Assuming you're running the latest top-of-tree, I just pushed https://github.com/chrisrude/oobabot/commit/8b815362065f6370d7468783ea056cff0aaca440 which I hope will fix your image generation issue. Please let me know if it works or not.

chrisrude commented 1 year ago

I've made a few other fixes to the --dont-split-responses experience, which also involved decreasing the default estimated token budget. I think there's a chance this might also help the performance issue you were seeing.

TruthSearchers commented 1 year ago

@chrisrude usage: oobabot [-h] [--history-lines HISTORY_LINES] [--ignore-dms] [--wakewords [WAKEWORDS ...]] [--ai-name AI_NAME] [--base-url BASE_URL] [--log-all-the-things] [--persona PERSONA] [--diffusion-steps DIFFUSION_STEPS] [--image-height IMAGE_HEIGHT] [--image-width IMAGE_WIDTH] [--image-words [IMAGE_WORDS ...]] [--stable-diffusion-sampler STABLE_DIFFUSION_SAMPLER] [--stable-diffusion-url STABLE_DIFFUSION_URL] [--sd-negative-prompt SD_NEGATIVE_PROMPT] [--sd-negative-prompt-nsfw SD_NEGATIVE_PROMPT_NSFW] oobabot: error: unrecognized arguments: --dont-split-responses

this issue still exists look like it dont hhave that argument

TruthSearchers commented 1 year ago

and still facing the same error it just not generating image yesterday it was working fine

chrisrude commented 1 year ago

Yup, I think you're running 0.1.5, which doesn't have that feature. Apologies for the confusion, I meant to suggest that 0.1.6 would fix your issue, which won't be out until next week.

In the meantime, you can roll back to the previous version with this command:

pip uninstall oobabot && pip install oobabot==0.1.4

I believe I've managed to fix the issue in the main branch if you're up for trying that out. But if not no worries, staying on 0.1.4 should work until 0.1.6 comes out.

Thanks again for all the testing!

TruthSearchers commented 1 year ago

i will try the branch lets see

jmoney7823956789378 commented 1 year ago

I'm still getting this issue, looks like await isn't awaiting long enough to receive the generated image. I could get it pop out an image if I set the steps to 10 on my 3080... but 10 steps is pretty weak. I had to set it even LOWER on my test machine with a GTX 1080 for SD.

(I lied, latest build works. you're a genius.)

chrisrude commented 1 year ago

Glad the latest build works! I'll try and push out 0.1.6 soon. Leaving this open until then.

chrisrude commented 1 year ago

v0.1.6 is out!