File size: 2,176 Bytes
d3596c5
 
 
 
 
 
 
 
 
 
bee1294
 
 
d3596c5
 
 
 
a8d0e04
d3596c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0a420a0
d3596c5
 
 
 
 
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
55
---

language: en
tags:
  - tagforge
  - danbooru
  - image-tagging
  - comfyui
license: gpl-3.0
---


# TagForge-0.5B

## Version 0.7

Decoder-only transformer that generates structured Danbooru tag sets for
single-character images. It adheres mostly to Danbooru styling tags, so it generates
outfits based on actual, working outfit mixes — describe a style (if known) or just part
of an outfit, and it completes a coherent character/clothing set across every body zone. Supports NSFW tags fully, but only designed to handle a solo character - interaction tags will be handled by an intelligent module in the node pack.

Part of the **TagForgeSuite** ComfyUI node pack, but usable in any LLM inferencing tool.

## Architecture

| Parameter          | Value      |
|--------------------|------------|
| Vocab size         | 153,728 |
| Embedding dim      | 1024 |
| Transformer layers | 16 |
| Attention heads    | 16  |
| FFN dim            | 4,096    |
| Parameters         | ~361M |
| Dtype              | bfloat16    |

The embedding and output head are tied (one token per tag).

## Usage

Load via the **TagForge Loader** node in TagForgeSuite. The node uses the original-format
`tagforge_tokenizer.json` (included). For raw `transformers` use, `tokenizer.json` is the
HuggingFace WordLevel tokenizer.

Commands: `GEN`, `FILL`, `EDIT` to generate; `CLASSIFY` to sort tags into their body/scene zones.

Example — `[GEN] 1girl, tomboy, petite, overalls, small_breasts, red_hair, pixie_cut, blue_eyes, t-shirt`
might output:

`RATING : s | SUBJECT : 1girl , petite , tomboy | BODY : breasts , small_breasts | META : simple_background , white_background | HAIR : pixie_cut , red_hair | FACE : blue_eyes | UPPER_BODY : ATTIRE : overalls , shirt , t-shirt | LOWER_BODY : ATTIRE : shorts | EXPRESSION : blush , looking_at_viewer , smile | ACTION : STATE : standing`

Add a RATING in your input (g, s, q, e — as on Danbooru) - like this: "..., RATING : q, ..." and the model adheres to it without dropping the
tags you gave it. g = general/SFW, s = sensitive, q = questionable, e = explicit (very).

## License

GPL-3.0