Nodes/ComfyUI-ToriiGate-Reforged/ToriiGate Text Generate Reforged
ComfyUI Node

ToriiGate Text Generate Reforged

ToriiGate Text Generate Reforged does text only

By CocyNoric·Created 10 days ago·Updated 9 days ago· 2
ToriiGate Text Generate Reforged
  • clip
  • text
prompt
max_new_tokens512
temperature0.50
top_p1.00
top_k0
decodinggreedy_fast
seed42
system_prompt
template_modetoriigate

Every other node in this pack stares at a picture. This one doesn't. ToriiGate Text Generate Reforged is the same Qwen3.5-4B model, but you hand it a text prompt and it returns text - no image input anywhere. It's the pack's answer to "what if I want the LLM part of this vision model without the vision?" and it exists because ToriiGate is, under the hood, a chat model that was fine-tuned to describe anime art.

Let's be straight about when you'd use it. If you want a generic in-graph text generator, there are fancier options - GGUF LLM nodes, Ollama bridges, the whole prompt-enhancer ecosystem. But this one is genuinely local, offline, uncensored, and it needs nothing beyond the model you already downloaded for the Caption node. That's a real combination. Dialogue lines for a video clip, a rough idea expanded into a structured prompt, a rewrite pass on a caption that came out flat - it does those fine, and at a 4B int8 it runs on cards that are already busy generating images. It's not the smartest model you could bolt in; it is the one already sitting in your models/clip folder.

How it works

Same sampler and template machinery as the Caption node, minus the image. Feed it clip from a native Load CLIP and a prompt string. In the default toriigate template mode it applies the model's own chat template with a system prompt; set template_mode to raw and it tokenizes your text exactly as given - useful when you've already formatted something yourself and don't want the template mangling it.

The knobs you'll actually touch:

  • prompt - the text to generate from. Yes, it's required, and yes, you can wire it from another text node.
  • system_prompt (optional) - an instruction layered on top of ToriiGate's default system prompt. This is how you steer the model without editing the prompt itself.
  • template_mode - toriigate (chat template, default) or raw (tokenize directly).
  • decoding - greedy_fast is deterministic and the default; switch to sample and temperature, top_p, top_k start meaning something. Seed is fixed at 42, randomized by ComfyUI's generation control.
  • max_new_tokens - 512 by default, up to 8192 for longer output.

Output: a text STRING you can preview, save, or feed into whatever's downstream.

Install

Same story as the rest of the pack - that's the point of a Reforged rebuild, one install, no pip extras:

cd ComfyUI/custom_nodes
git clone https://github.com/CocyNoric/ComfyUI-ToriiGate-Reforged.git

Restart ComfyUI, or use ComfyUI Manager and search "ToriiGate". You still need the model loaded via Load CLIP (type: stable_diffusion), same ToriiGate-0.5_int8_convrot.safetensors weight the Caption node uses - the pack has no bundled loader and no automatic download, by design.

Common issues

The failure modes mirror the Caption node's. Connect a non-ToriiGate CLIP model and you'll get a tokenizer error, because the node needs the native tokenize/generate interface the ToriiGate weight exposes - the pack's whole architecture assumes you loaded that specific model. And set expectations on quality: it's a 4B model optimized for captioning, so it's a willing writer, not a frontier chatbot. Use it for short structured rewriting - which, honestly, is all an LLM in an image pipeline usually needs to do. If you want that job done without an API, this is a clean, dependency-free way to get it.

CategoryToriiGate

Inputs (10)

NameTypeDefaultDescription
clipCLIPToriiGate-compatible model from a native ComfyUI loader.
promptSTRINGText prompt to generate from.
max_new_tokensINT5121–8192Maximum number of generated tokens.
temperatureFLOAT0.500–2Sampling temperature; used when decoding is sample.
top_pFLOAT1.000–1Nucleus sampling threshold.
top_kINT00–200Top-k sampling; 0 disables the limit.
decodingCOMBOgreedy_fastgreedy_fast is deterministic; sample uses temperature/top-p/top-k.
seedINT420–18446744073709550000Fixed seed for repeatable sampling.
system_promptoptSTRINGOptional system instruction.
template_modeoptCOMBOtoriigatetoriigate applies the model's chat template; raw tokenizes the supplied text directly.

Outputs (1)

NameTypeDescription
textSTRING