Skip to content

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 ​

VRAMSuggestion
6GBSD 1.5 and smaller workflows
8–12GBSDXL and some fast Flux variants more realistic
Apple SiliconNative run; usually slower than similar NVIDIA
  1. Open ComfyUI downloads (or a community ComfyUI_windows_portable pack).
  2. Extract to a non-system path (short path; avoid Chinese spaces if possible).
  3. With NVIDIA run run_nvidia_gpu.bat; CPU-only use the matching CPU script.
  4. Open the address shown in the browser, often:
text
http://127.0.0.1:8188

Option B: Desktop app ​

  1. Install ComfyUI Desktop.
  2. Settings → Server Configuration (or similar “server / network”):
    • Set Listen Address to 0.0.0.0 (default 127.0.0.1 blocks the phone)
    • Note Port (Desktop often 8000, unlike portable 8188)
  3. Restart, then access via LAN IP.

Option C: Manual Git (macOS / Linux / advanced) ​

bash
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 --listen

Enable LAN (required for phone) ​

Portable / CLI ​

Edit the launch script (e.g. run_nvidia_gpu.bat) and add after main.py:

bat
--listen

Full example:

bat
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --listen
FlagRole
--listenWith no args, listen on all interfaces for LAN
--port 8188Optional port change
--enable-cors-headerFor 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:

text
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:

text
http://127.0.0.1:8188

LAN (PC IP; watch Desktop port):

text
http://192.168.x.x:8188

If 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:

  1. Uploads every reference image to ComfyUI (/upload/image).
  2. 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:

text
"{{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:

  1. Build the graph in the ComfyUI web UI (for example LoadImage → IPAdapter → KSampler → SaveImage) and confirm a manual run works.
  2. Use Save (API Format). In the JSON, set each LoadImage image field to a placeholder above.
  3. In MiniTavern go to Settings → Image gen → Image gen link, paste the JSON, and save.
  4. 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.

Next ​