How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="cooperdk/TagForge-0.5B-GGUF",
	filename="TagForge-0.5B-Q8_0.gguf",
)
output = llm(
	"Once upon a time,",
	max_tokens=512,
	echo=True
)
print(output)

TagForge-0.4B

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

Downloads last month
26
GGUF
Model size
0.5B params
Architecture
tagforge
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support