Nodes/ComfyUI-Allegro/Allegro Text Encoder
ComfyUI Node

Allegro Text Encoder

Your prompt goes in a template whether you like it or not

By bombax-xiaoice·Created 2 years ago·Updated about a year ago· 5
Allegro Text Encoder
  • pipe
  • positive
  • negative
positive_prompt
negative_prompt

This is the node where your words become conditionings - and where Allegro quietly rewrites them. AllegroTextEncoder takes your prompt, lowercases it, stuffs it into a fixed quality template, runs it through Allegro's T5 text encoder, and hands the result to AllegroSampler as positive and negative CONDITIONING. It's the only place the pack touches text, so it's also the only place to fight with prompt quality.

How it works

Allegro's text pipeline is T5-based, not CLIP-based - a very different beast from the SD checkpoints you're used to. The node calls into the pipe's encode_prompt with a 512-token sequence length and clean-caption processing, then packages the embeddings plus an attention mask into the two conditioning outputs the sampler consumes.

The part most people miss is the template. Your prompt is not used verbatim. The node applies:

(masterpiece), (best quality), (ultra-detailed), (unwatermarked), {} emotional,
harmonious, vignette, 4k epic detailed, shot on kodak, 35mm photo, sharp focus,
high budget, cinemascope, moody, epic, gorgeous

with {} being your lowercased, stripped input. So "a cat" becomes "(masterpiece), (best quality), ... a cat emotional, harmonious, vignette ..." - yes, really, your prompt is the filler in a boilerplate. That's a legitimate quirk to know about: it explains both why Allegro's outputs all share a moody, cinematic look and why your carefully-punctuated prompt might seem to arrive slightly mangled. It also means writing short, evocative subject lines plays into the template's hands better than a giant run-on sentence.

The negative side is kinder: leave negative_prompt blank and a solid default is used - nsfw, lowres, bad anatomy, bad hands, text, blurry, the usual quality-rot list. You can override it, but the default is genuinely fine for most clips.

The inputs that matter

  • pipe (AllegroPIPE) - from LoadAllegroModel (or LoadAllegroTI2VModel). Required.
  • positive_prompt (STRING, multiline) - your subject. It gets lowercased and templated, so write it plainly. Required.
  • negative_prompt (STRING, multiline) - optional; blank = the built-in default.

It returns positive and negative (CONDITIONING), both of which wire into AllegroSampler or AllegroTI2VSampler.

Install

Part of the ComfyUI-Allegro pack:

cd ComfyUI/custom_nodes
git clone https://github.com/bombax-xiaoice/ComfyUI-Allegro
cd ComfyUI-Allegro && pip install -r requirements.txt

Restart and it shows up under "Allegro".

Common issues

The T5 encoder is the pack's memory hotspot. On 8GB cards it gets shunted to CPU during sampling (that's the low_vram_mode behavior doing its job), which is fine - it just means the first run feels extra slow. The subtle thing to watch is what you type: because your prompt is lowercased and templated, emphasis syntax like (important:1.4) or [reduce] does not work the way it does in A1111/ComfyUI image nodes. Write prose, lean on the template's built-in quality tags, and don't expect weighted-paren control. And if output keeps coming out moody no matter what you say - that's the template, not you.

CategoryAllegro

Inputs (3)

NameTypeDefaultDescription
pipeAllegroPIPE
positive_promptSTRING
negative_promptoptSTRING

Outputs (2)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING