AndBobsYourUncle / stable-diffusion-discord-bot

A Discord bot, written in Go, that interfaces with the Automatic 1111's API interface.
MIT License
131 stars 35 forks source link

Imagine interations through Discord leads to "Error processing image: unexpected end of JSON input" #1

Closed PeterPHardus closed 1 year ago

PeterPHardus commented 1 year ago

Apologies as this is my first time in Github.

I've built both the Stable Diffusion instance and the discord bot and the bot is able to detect the host.

Unfortunately when it comes to actually generating through the bot using /imagine, the console outputs

2022/12/25 02:29:30 Processing imagine #1056277455129825370: apple
2022/12/25 02:29:31 Error processing image: unexpected end of JSON input

I assume that the bot is able to detect the host but cannot seem to communicate with it.

Would appreciate help in troubleshooting

AndBobsYourUncle commented 1 year ago

I think this might be due to the -host command line parameter having a trailing "/" at the end.

Instead of -host http://127.0.0.1:7860/

Try doing -host http://127.0.0.1:7860

PeterPHardus commented 1 year ago

I think this might be due to the -host command line parameter having a trailing "/" at the end.

Instead of -host http://127.0.0.1:7860/

Try doing -host http://127.0.0.1:7860

This fixed the issue, Thanks!

AndBobsYourUncle commented 1 year ago

Awesome, no problem, glad that it worked out. And thanks for the Github issue, since it might help others that encounter this issue.