# dominikdoom/a1111-sd-webui-tagcomplete architecture

> Architecture diagram of the GitHub repository dominikdoom/a1111-sd-webui-tagcomplete, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dominikdoom/a1111-sd-webui-tagcomplete
- Repository: https://github.com/dominikdoom/a1111-sd-webui-tagcomplete

## Overview

SD WebUI Tag Autocomplete is a browser-side extension for completing and inserting prompt tags in AUTOMATIC1111 and supported third-party text fields. The main workflow discovers prompt fields, dispatches typed input to completion parsers, presents navigable results, and formats a selected result for insertion. Its branches cover booru tags, wildcards, model files and other documented completion types; a Python helper exposes local files and model metadata to JavaScript. README capabilities inform unsampled branches, so their internal wiring is not inferred.

Main entry points: [`javascript/tagAutocomplete.js`](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/tagAutocomplete.js) (Autocomplete UI), [`scripts/tag_autocomplete_helper.py`](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/scripts/tag_autocomplete_helper.py) (File helper and API), [`javascript/_textAreas.js`](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_textAreas.js) (Prompt fields), [`javascript/_result.js`](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_result.js) (Completion results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Prompt interaction"]
  node_fields["Prompt fields<br/>[_textAreas.js]"]
  node_autocomplete["Autocomplete UI<br/>[tagAutocomplete.js]"]
  node_result["Completion results<br/>[_result.js]"]
end

subgraph group_completion["Completion sources"]
  node_parserbase["Parser base<br/>[_baseParser.js]"]
  node_booru["Booru tags<br/>[tagAutocomplete.js]"]
  node_wildcards["Wildcards<br/>[ext_wildcards.js]"]
  node_umi["UMI wildcards<br/>[ext_umi.js]"]
  node_embeddings["Embeddings<br/>[ext_embeddings.js]"]
  node_loras["LoRA models<br/>[ext_loras.js]"]
  node_lycos["LyCORIS models<br/>[ext_lycos.js]"]
  node_hypernets["Hypernetworks<br/>[ext_hypernets.js]"]
  node_artists["Artist tags<br/>[ext_artist_tags.js]"]
  node_chants["Chants<br/>[ext_chants.js]"]
  node_styles["Styles<br/>[ext_styles.js]"]
  node_extra["Extra tags"]
end

subgraph group_backend["Local data services"]
  node_tagdata["Tag lists<br/>[danbooru.csv]"]
  node_helper["File helper and API"]
end

subgraph group_integrations["External integrations"]
  node_webui["AUTOMATIC1111 WebUI"]
  node_modelkeyword["Model-keyword files"]
  node_webui_models["WebUI model files"]
end

node_user(("Prompt author"))

node_user -->|"types into"| node_fields
node_webui -->|"provides fields"| node_fields
node_fields -->|"observes input"| node_autocomplete
node_autocomplete -->|"dispatches parsing"| node_parserbase
node_autocomplete -->|"searches tags"| node_booru
node_autocomplete -->|"dispatches wildcard"| node_wildcards
node_autocomplete -->|"dispatches UMI"| node_umi
node_autocomplete -->|"dispatches embedding"| node_embeddings
node_autocomplete -->|"dispatches LoRA"| node_loras
node_autocomplete -->|"dispatches LyCORIS"| node_lycos
node_autocomplete -->|"dispatches hypernet"| node_hypernets
node_autocomplete -->|"dispatches artist"| node_artists
node_autocomplete -->|"dispatches chant"| node_chants
node_autocomplete -->|"dispatches style"| node_styles
node_autocomplete -->|"dispatches extra tags"| node_extra
node_tagdata -->|"supplies tags"| node_booru
node_helper -->|"serves file APIs"| node_autocomplete
node_helper -->|"scans models"| node_webui_models
node_helper -.->|"locates keyword files"| node_modelkeyword
node_autocomplete -->|"renders results"| node_result
node_result -->|"inserts selection"| node_fields
node_autocomplete -->|"requests model metadata"| node_helper

click node_fields "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_textAreas.js"
click node_autocomplete "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/tagAutocomplete.js"
click node_parserbase "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_baseParser.js"
click node_booru "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/tagAutocomplete.js"
click node_wildcards "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_wildcards.js"
click node_umi "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_umi.js"
click node_embeddings "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_embeddings.js"
click node_loras "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_loras.js"
click node_lycos "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_lycos.js"
click node_hypernets "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_hypernets.js"
click node_artists "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_artist_tags.js"
click node_chants "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_chants.js"
click node_styles "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_styles.js"
click node_extra "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_modelKeyword.js"
click node_tagdata "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/tags/danbooru.csv"
click node_helper "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/scripts/tag_autocomplete_helper.py"
click node_result "https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_result.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fields,node_autocomplete,node_result toneBlue
class node_parserbase,node_booru,node_wildcards,node_umi,node_embeddings,node_loras,node_lycos,node_hypernets,node_artists,node_chants,node_styles,node_extra toneAmber
class node_tagdata,node_helper toneMint
class node_webui,node_modelkeyword,node_webui_models toneRose
class node_user toneIndigo
```

## Components

### Prompt interaction

- [Prompt fields](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_textAreas.js): `javascript/_textAreas.js`
- [Autocomplete UI](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/tagAutocomplete.js): `javascript/tagAutocomplete.js`
- [Completion results](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_result.js): `javascript/_result.js`

### Completion sources

- [Parser base](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/_baseParser.js): `javascript/_baseParser.js`
- [Booru tags](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/tagAutocomplete.js): `javascript/tagAutocomplete.js`
- [Wildcards](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_wildcards.js): `javascript/ext_wildcards.js`
- [UMI wildcards](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_umi.js): `javascript/ext_umi.js`
- [Embeddings](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_embeddings.js): `javascript/ext_embeddings.js`
- [LoRA models](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_loras.js): `javascript/ext_loras.js`
- [LyCORIS models](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_lycos.js): `javascript/ext_lycos.js`
- [Hypernetworks](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_hypernets.js): `javascript/ext_hypernets.js`
- [Artist tags](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_artist_tags.js): `javascript/ext_artist_tags.js`
- [Chants](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_chants.js): `javascript/ext_chants.js`
- [Styles](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_styles.js): `javascript/ext_styles.js`
- [Extra tags](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/javascript/ext_modelKeyword.js): `javascript/ext_modelKeyword.js`

### Local data services

- [Tag lists](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/tags/danbooru.csv): `tags/danbooru.csv`
- [File helper and API](https://github.com/dominikdoom/a1111-sd-webui-tagcomplete/blob/main/scripts/tag_autocomplete_helper.py): `scripts/tag_autocomplete_helper.py`

### External integrations

- **AUTOMATIC1111 WebUI**
- **Model-keyword files**
- **WebUI model files**

### Other components

- **Prompt author**

## Connections

- Prompt author → Prompt fields: types into
- AUTOMATIC1111 WebUI → Prompt fields: provides fields
- Prompt fields → Autocomplete UI: observes input
- Autocomplete UI → Parser base: dispatches parsing
- Autocomplete UI → Booru tags: searches tags
- Autocomplete UI → Wildcards: dispatches wildcard
- Autocomplete UI → UMI wildcards: dispatches UMI
- Autocomplete UI → Embeddings: dispatches embedding
- Autocomplete UI → LoRA models: dispatches LoRA
- Autocomplete UI → LyCORIS models: dispatches LyCORIS
- Autocomplete UI → Hypernetworks: dispatches hypernet
- Autocomplete UI → Artist tags: dispatches artist
- Autocomplete UI → Chants: dispatches chant
- Autocomplete UI → Styles: dispatches style
- Autocomplete UI → Extra tags: dispatches extra tags
- Tag lists → Booru tags: supplies tags
- File helper and API → Autocomplete UI: serves file APIs
- File helper and API → WebUI model files: scans models
- File helper and API → Model-keyword files: locates keyword files
- Autocomplete UI → Completion results: renders results
- Completion results → Prompt fields: inserts selection
- Autocomplete UI → File helper and API: requests model metadata
