Remote image generation with ComfyUI and SD 3.5 via Discord bot: Help needed

Hey folks! I’m trying to set up a way for my sister to create images remotely using my local ComfyUI and Stable Diffusion 3.5 setup. I’ve got it running on my PC with an RTX 4070 SUPER.

I’ve installed the ComfyUI-Serving-Toolkit and set up the necessary nodes (DiscordServing, ServingInputText, ServingOutput). The bot shows up in Discord, but when I try using commands like !prompt test --neg test, nothing happens. No prompt received, no image generation.

I’ve launched ComfyUI with API enabled and the workflow looks right - prompts go to CLIP Text Encoders and image output is connected.

What am I missing? Do I need to tweak something in the nodes or Discord app? Would a Telegram bot be easier?

I’ve been at this for hours and could really use some advice. Thanks!

Hey davidw, have u checked the bot’s logs? might b worth lookin there for clues. Also, double-check ur Discord app settings - sometimes permissions can b tricky. If nothin else works, yeah Telegram could b easier to setup. Keep at it!

I’ve gone through a similar setup process, and it can definitely be tricky. From my experience, the issue might be with how the Discord bot is configured to interact with ComfyUI.

First, double-check that your Discord bot has the necessary permissions in the server. It needs to be able to read messages and send messages/attachments.

Also, make sure the command prefix in your bot’s code matches what you’re using in Discord. If it’s set to ‘/’ instead of ‘!’, that could explain why it’s not responding.

One thing that helped me was adding some basic logging to the bot code. This way, you can see if it’s receiving commands at all. If it is, the problem is likely in how it’s communicating with ComfyUI.

Lastly, I found that running ComfyUI with the ‘–listen’ flag helped ensure it was properly accessible to external services. Maybe give that a shot if you haven’t already.

Hope this helps point you in the right direction!

Having worked with ComfyUI and Discord bots, I can suggest a few things to troubleshoot your setup. First, ensure your Discord bot token is correctly set in the DiscordServing node. Sometimes, token issues can cause silent failures.

Next, verify that your bot has the ‘Message Content Intent’ enabled in the Discord Developer Portal. Without this, it won’t be able to read message content, which is crucial for processing commands.

Also, check if you’re running ComfyUI with the correct Python environment. Mismatched dependencies can cause issues with the Serving Toolkit.

If all else fails, you might want to try a simpler setup first, like a basic ‘hello world’ command, to ensure the bot is responding at all. This can help isolate whether the issue is with the bot itself or its interaction with ComfyUI.

Regarding Telegram, while it can be easier in some aspects, Discord’s rich embed support makes it great for image generation bots once you get it working.