🎨 Image & Media Generation
With OnMyChat, you can generate images and videos directly from the chat interface using your local hardware. This feature is powered by ComfyUI integrated behind the scenes.
1. Setup and Integration (ComfyUI)
To enable image generation, the node administrator must install and configure ComfyUI:
1. Install ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI /opt/ComfyUI
cd /opt/ComfyUI
pip install -r requirements.txt
2. Start ComfyUI
Run ComfyUI listening on port 8188:
python3 main.py --listen 0.0.0.0 --port 8188
3. Configure OnMyChat
In your OnMyChat /opt/onmychat/config.ini, enable the integration:
COMFY_API_URL = http://localhost:8188
WORKFLOW_PATH = flow.json
COMFY_OUTPUT_DIR = /opt/ComfyUI/output
COMFY_INPUT_DIR = /opt/ComfyUI/input
Restart the onmychat service:
sudo systemctl restart onmychat
2. Using Image Generation in Chats
Once configured, any user can generate images in two ways:
1. Creations Mode
Switch the chat UI to Creations mode. In this mode, any text description you send is automatically treated as an image generation prompt.
2. Using the /generate Command
In standard chat mode, you can manually trigger image generation using:
/generate A majestic castle on top of a mountain, mist, hyperrealistic
All generated files are saved directly to your local storage in the folder configured under Settings → Assistant.
3. Style and Character Customization
Enhance your prompts using special tags:
Style Tags
Add pre-defined style tags at the end of your prompt to apply specific aesthetics:
<Realistic>— photorealistic output.<Fantasy>— mystical, painterly art style.<Perfect>— clean, sharp digital art.<Tooned>— cartoon / anime styling.
Character Tags (LoRAs)
You can train or download character models (LoRAs) and invoke them using tags (e.g. <CharacterName>).
Extending Styles and LoRAs: You can download additional styles, checkpoints, and LoRA models from open community hubs like civitai.com and drop them into the respective directories in
/opt/ComfyUI/models/to expand your generator’s capabilities.