Replies: 1 comment
-
Implemented in Chatbot ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TinyLLM Chatbot Image Generation
This is to document the steps to add image generation to the TinyLLM Chatbot.
SwarmUI
The SwarmUI package has a very robust API set and using ComfyUI on the backend, supports multiple image generation models including Stable Diffusion, Flux, and others. I have created a simple container that runs SwarmUI and makes it easy to set up as a service that the Chatbot can call.
Setup
The following will install a instance of SwarmUI container I have built and uploaded. This assumes an Nvidia GPU rig and will run as a daemon.
Go to http://localhost:7801 and continue the service setup which will auto-download the Stable Diffusion XL model:
SwarmUI Installer
You can use "Just Install":
Install Now:
This will take a while for it to download the model and additional tools (e.g. ComfyUI). Once the UI loads, you can select the model (SDXL) and type a prompt for it to generate:
API Test
We need to be able to make API calls to get an image. We don't need the server to save the file. We just need it to send us the base64 encoded version that we can have python manipulate and display in the browser. Here is a simple test:
Beta Was this translation helpful? Give feedback.
All reactions