aboutsummaryrefslogtreecommitdiff
path: root/docs/community-description.md
blob: b0314b1a192b411db1f1615be145998fe5762373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Comfier

**Finer-grained ComfyUI image generation for Open WebUI.**

Open WebUI's built-in image generation tool takes a prompt and little else. Comfier lets the model control more of the generation, using the ComfyUI workflow you have already set up in Open WebUI.

Requires **Open WebUI 0.12.0 or newer**.

## What it adds

- **Negative prompts**: the model can say what to avoid, with an admin-configurable default.
- **Image size**: any `WIDTHxHEIGHT`, per image, instead of one global size.
- **Sampling steps**: the model can request fewer steps for quick drafts or more for detail, within an admin-set limit.
- **Reproducible seeds**: every result reports the seed and steps used, so the same image can be regenerated. A separate tool generates seeds up front.
- **Live progress**: status updates in the chat while ComfyUI runs (current node, sampling step and percentage).
- **Stop button support**: stopping a generation also interrupts and dequeues the job on ComfyUI.
- **Connection-loss recovery**: if ComfyUI drops or restarts mid-generation, you get a prompt to retry with the same parameters.

## Tools

| Tool | Purpose |
|---|---|
| `comfier_generate_image` | Generate an image from `positive_prompt`, with optional `negative_prompt`, `size`, `seed` and `steps`. |
| `comfier_generate_seed` | Generate a random seed (8 to 63 bits). Optional, since image generation picks and reports a seed itself. |

The image is stored in Open WebUI and shown in the chat automatically, and the model is told not to embed it a second time.

## Setup

1. In **Admin Panel → Settings → Images**, set the image engine to ComfyUI and configure the base URL, API key (if any), and your workflow JSON.
2. Define the **workflow node mappings** for prompt, seed, width, height and steps, exactly as for the built-in tool. Comfier reuses these.
3. Install Comfier and enable it for your model.
4. For negative prompts, set the tool's `negative_prompt_node_ids` setting to the ID(s) of your workflow's negative-prompt node(s), for example `459:452`. If your node's input is not called `negative_prompt`, set `negative_prompt_key` to its name (for example `text`). Leave the node IDs empty to disable negative prompting.

## Settings (Valves)

| Setting | Default | Description |
|---|---|---|
| `negative_prompt` | `watermarks` | Default negative prompt, used when the model does not provide one. |
| `negative_prompt_key` | `negative_prompt` | Name of the workflow node input that receives the negative prompt. |
| `negative_prompt_node_ids` | *(empty)* | Comma-separated workflow node IDs that receive the negative prompt. Empty disables it. |
| `max_steps` | `100` | Maximum number of sampling steps the model may request per image. |

## Notes

- Comfier uses the global ComfyUI workflow from Open WebUI's settings. It does not bring its own.
- Requested sizes and steps are written into the workflow through your node mappings, so those mappings must exist for the parameters you want the model to control.
- Requests outside the allowed range (for example more than `max_steps`) are rejected with an error the model can read and correct.

## Source and license

Development repository with a standalone test harness and offline test suite: [Source@ARKNet](https://source.arknet.ch/pub/fmorgner/comfier.git/).

Licensed under the 3-clause BSD license.