Welcome to the ComfyUI-Serving-Toolkit! This extension is designed to make it easier for you to serve image generation workflows on platforms like Discord and other platforms (coming soon). Whether you're an AI artist looking to create image generation bots or simply want to streamline your workflow, this toolkit simplifies the process, making it more accessible and user-friendly.
With ComfyUI-Serving-Toolkit, you can serve your ComfyUI workflows directly from your computer, ensuring that your secrets remain safe and secure. The toolkit supports both image and video generation, allowing you to create dynamic content effortlessly.
The ComfyUI-Serving-Toolkit operates by integrating with your existing ComfyUI workflows and enabling them to be served on platforms like Discord or through WebSockets. Here's a simple analogy to help you understand:
Imagine you have a talented artist (ComfyUI) who can create beautiful images based on your descriptions (prompts). The ComfyUI-Serving-Toolkit acts as a messenger that takes your requests (prompts) and delivers them to the artist. Once the artist finishes the artwork, the messenger brings it back to you. This way, you can interact with the artist through platforms like Discord without needing to be in the same room.
Basic Principles:
- Input Handling: The toolkit receives prompts and arguments from users.
- Processing: It processes these inputs using your ComfyUI workflows.
- Output Delivery: The generated images or videos are sent back to the user.
Image and Video Generation
- Images or Videos: Generate images or videos (when in batch mode, such as with animatediff). If more than one image is returned, it will create a video.
- Customizable Arguments: Add arguments with default values, allowing users to customize their requests.
Secure and Local Serving
- Serve from Your Computer: Your workflows are served directly from your computer, ensuring that your secrets remain safe and are not embedded in the images.
Discord Integration
- DiscordServing Node: This node queues prompts and processes them, returning the generated images. It requires a Discord token and a command name to function.
WebSocket Integration
- WebSocketServing Node: Connects to a WebSocket and waits for JSON requests, returning the generated images in base64 format.
Currently, the toolkit does not include different models but focuses on serving your existing ComfyUI workflows. You can use any models supported by ComfyUI within your workflows.
Updates and Changes
- Initial Release: The toolkit now supports serving image generation workflows on Discord and through WebSockets.
- Video Generation: Added support for video generation when multiple images are returned in batch mode.
Common Issues and Solutions
- Discord Token Issues:
- Problem: Unable to generate images on Discord.
- Solution: Ensure you have a valid Discord token and that message viewing intent is enabled. How to get a Discord token (https://www.writebots.com/discord-bot-token/).
- WebSocket Connection Issues:
- Problem: Unable to connect to the WebSocket server.
- Solution: Verify the WebSocket URL and ensure the server is running. Example WebSocket server setup:
npm install
node websocket.js
- Auto Queue Not Working:
- Problem: The toolkit is not processing all messages.
- Solution: Ensure that the
Auto Queue
option is enabled in the DiscordServing node settings.
Frequently Asked Questions
- Q: Can I use this toolkit on platforms other than Discord?
- A: Currently, the toolkit supports Discord and WebSockets. Other platforms will be supported soon.
- Q: How do I customize the arguments for image generation?
- A: You can add arguments with default values in your workflow. Users can then specify these arguments in their prompts.
For additional resources, tutorials, and community support, check out the following:
- : Join the community to ask questions and get support.
- : Learn more about ComfyUI and how to create workflows.
By leveraging these resources, you can enhance your understanding and make the most out of the ComfyUI-Serving-Toolkit. Happy creating!