Nodes/Seasonal Fashion Prompt Generator/Gemma TIPO (Prompt / Image → Tags)
ComfyUI Node

Gemma TIPO (Prompt / Image → Tags)

TIPO-style tags without the TIPO install dance — text in, full Danbooru tag list out

By raspie10032·Created 2 years ago·Updated 4 months ago· 1
Gemma TIPO (Prompt / Image → Tags)
  • image
  • STRING
prompt
model(auto: download default)
tag_lengthlong
sortdanbooru
temperature0.50
ban_tags
seed0
mmproj_path
gpu_layers0

Type a girl in a white sailor uniform with a scarf, and this node hands you back white sailor collar, white skirt, red scarf, school uniform, serafuku, sitting, solo focus, looking at viewer, long sleeves, striped clothes. Korean, English, or raw tags in - a categorized, de-duplicated Danbooru tag list out, generated locally on your own machine with no API key and no cloud. That's the whole pitch, and it's a good one if you live in the tag-prompting world of Illustrious, Pony, or NoobAI, where a proper tag list beats prose every time (danbooru-tags.json, prompt-engineering.md).

This is a TIPO-style "upsampler": instead of an accurate tagger, it's a small Gemma model fine-tuned to expand a short description into a long, plausible tag set. It inherits the concept from KohakuBlueleaf's KGen/TIPO lineage, and honestly the most impressive part is how it side-steps the install pain that community is famous for - people regularly burn an afternoon getting KGen and z-tipo-extension to coexist (there are whole Reddit threads on it). This pack bundles the pure-Python kgen.formatter for post-processing and skips the torch-heavy parts entirely.

How it works

Two modes in one node. Text mode (no image connected): your prompt is fed through a GGUF model in-process via llama-cpp-python, then through the same kgen.formatter post-processing. Vision mode (connect an IMAGE): it switches to a captioning pipeline using a llama.cpp mtmd binary plus a gemma-4-E2B mmproj - both auto-downloaded on first use, nothing to configure.

Here's the catch you have to respect: vision mode is not an accurate image tagger. The README is blunt about this - it deliberately exploits LLM hallucination, treating the image as a loose seed and inventing a plausible tag set that will include tags not actually in the picture. It's a prompt-idea generator, not a WD14 replacement. Use it to brainstorm variations; don't feed it to a LoRA training pipeline expecting faithful captions.

Inputs worth touching

The defaults are sane, so a beginner can run with almost everything untouched. The ones that matter:

  • prompt - your text. Korean or English natural language works; more detail yields more and better tags. The input text itself is never mixed into the output.
  • model - lists .gguf files in ComfyUI/models/gguf/. The default (auto: download default) fetches gemma4-tipo-ko-v2-Q4_K_M.gguf on first run, with a progress bar on the node, and reuses it forever after.
  • tag_length - very_short to very_long, default long.
  • sort - how the formatter orders tags. danbooru (default) puts artist/rating/special first and general/quality last; quality_first, artist_first, general_only, and the newer simple (rating/special/general only) are one click away.
  • ban_tags - comma-separated tags stripped from the result. Handy if the model keeps inventing blush stickers.
  • seed - change it for a different expansion; temperature (0.1–1.5) does the same.

The output is a single STRING, chainable into any prompt input - including the pack's other node, the Seasonal Fashion Prompt Generator. The optional image, mmproj_path (leave empty unless you have your own mmproj), and gpu_layers (0 = CPU) only matter in vision mode.

Install

There's no manual install for the node itself. First run auto-installs tipo-kgen and llama-cpp-python >= 0.3.23 from a prebuilt CPU wheel index, then pulls the model. The catch: if it upgrades an existing too-old llama-cpp-python, ComfyUI will ask you to restart once - a C extension can't be hot-reloaded. That's normal, not a bug. To pre-install by hand instead:

cd ComfyUI/custom_nodes/RS-Seasonal-Prompt-Generator
pip install -r requirements.txt

If no wheel exists for your platform/Python, install it yourself once:

pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

The realistic caveats

CPU-only works, but it's slow - the README says a single prompt can take minutes, so a GPU-accelerated llama-cpp-python is worth it if you'll run this a lot. Budget ~4 GB disk for the 3.2 GB model plus deps, and ~8 GB RAM minimum (about 5 GB goes to the 4-bit model). And the nicest safety net: on any failure - missing deps, missing model, inference error - the node falls back to returning your input unchanged instead of hard-erroring your workflow. It never crashes a queue, which is more than most LLM nodes can claim.

Categoryprompt

Inputs (10)

NameTypeDefaultDescription
promptSTRING
modelCOMBO(auto: download default)1 options: (auto: download default)
tag_lengthCOMBOlong4 options: very_short, short, long, very_long
sortCOMBOdanbooru5 options: danbooru, quality_first, artist_first, general_only, simple
temperatureFLOAT0.500.1–1.5
ban_tagsSTRING
seedINT00–18446744073709550000
imageoptIMAGE
mmproj_pathoptSTRING
gpu_layersoptINT00–100

Outputs (1)

NameTypeDescription
STRINGSTRING