Install ComfyUI
ComfyUI is a node-based local image front-end with fast new-model support.
MiniTavern submits a built-in default workflow via ComfyUI’s HTTP API (/prompt, etc.); you do not need to draw a node graph in the App to generate images.
Official docs: docs.comfy.org · repo: Comfy-Org/ComfyUI
Hardware tips
| VRAM | Suggestion |
|---|---|
| 6GB | SD 1.5 and smaller workflows |
| 8–12GB | SDXL and some fast Flux variants more realistic |
| Apple Silicon | Native run; usually slower than similar NVIDIA |
Option A: Windows portable (recommended)
- Open ComfyUI downloads (or a community
ComfyUI_windows_portablepack). - Extract to a non-system path (short path; avoid Chinese spaces if possible).
- With NVIDIA run
run_nvidia_gpu.bat; CPU-only use the matching CPU script. - Open the address shown in the browser, often:
http://127.0.0.1:8188Option B: Desktop app
- Install ComfyUI Desktop.
- Settings → Server Configuration (or similar “server / network”):
- Set Listen Address to
0.0.0.0(default127.0.0.1blocks the phone) - Note Port (Desktop often 8000, unlike portable 8188)
- Set Listen Address to
- Restart, then access via LAN IP.
Option C: Manual Git (macOS / Linux / advanced)
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python -m venv venv
# Windows: venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
# Install matching PyTorch for your GPU (see PyTorch site)
python main.py --listenEnable LAN (required for phone)
Portable / CLI
Edit the launch script (e.g. run_nvidia_gpu.bat) and add after main.py:
--listenFull example:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --listen| Flag | Role |
|---|---|
--listen | With no args, listen on all interfaces for LAN |
--port 8188 | Optional port change |
--enable-cors-header | For browser CORS; phone App → API usually does not need it |
Desktop
As above: Listen 0.0.0.0, port per UI.
Place models
Put checkpoints (.safetensors) in:
ComfyUI/models/checkpoints/Press R in the UI to refresh, or restart. Confirm a default text-to-image run in the ComfyUI web UI before connecting the App.
Sources: Civitai · Hugging Face.
Verify
On PC:
http://127.0.0.1:8188LAN (PC IP; watch Desktop port):
http://192.168.x.x:8188If the phone browser opens the same address, network and listen are OK.
Differences vs MiniTavern (read first)
- The App uses a built-in default workflow and generally picks an available checkpoint on your machine.
- Sleep / lid close stops the service; IP changes require updating Base URL in the App.
Multiple reference images
Character, user, and chat attachments are sent as multiple reference images. A stock ComfyUI install is enough; IPAdapter is optional.
The App does two things:
- Uploads every reference image to ComfyUI (
/upload/image). - If you did not replace the workflow, it turns the built-in text-to-image graph into image-to-image: one LoadImage per file, scaled to the request size, stitched side by side, then encoded into the sampler. Denoise is about 0.55.
If default text-to-image works, multiple references use that path.
Your own LoadImage or IPAdapter
For a tighter face lock, or a graph you already have, set each LoadImage image input to a quoted placeholder, starting at 0, one image each:
"{{reference_image_0}}"
"{{reference_image_1}}""" and "" both mean the first image.
After you paste that API-format workflow JSON into the image-gen link, the App only replaces the placeholders with uploaded filenames. It does not rewrite your nodes.
Suggested steps:
- Build the graph in the ComfyUI web UI (for example LoadImage → IPAdapter → KSampler → SaveImage) and confirm a manual run works.
- Use Save (API Format). In the JSON, set each LoadImage
imagefield to a placeholder above. - In MiniTavern go to Settings → Image gen → Image gen link, paste the JSON, and save.
- Test, or generate once in chat with reference images, and confirm the Comfy queue shows the uploads.
If the custom JSON has neither a sampler (KSampler) nor those placeholders, references cannot be applied and the App asks you to follow this section.