SeaArtLongClip
The honest way to bust SD 1.5's 77-token wall
- CLIP
Your prompt isn't too long - your CLIP is too short
Every SD 1.5 checkpoint ships with OpenAI's CLIP ViT-L/14 text encoder, and that encoder hard-stops at 77 tokens. Tokens aren't words - commas, word splits, and embeddings each eat the budget - so anything past token 77 gets silently thrown away. That's why your elaborate scene description keeps losing the third character. The 77-token ceiling is the single most-cited limit on SD 1.5 for exactly this reason.
SeaArtLongClip is the SD 1.5 node from the SeaArtLab ComfyUI-Long-CLIP pack. It swaps that short-context CLIP for Long-CLIP, a fine-tune of the same encoder that reads up to 248 tokens, and it does it without modifying your checkpoint file.
How it works
The node loads the LongCLIP-L weights and builds a brand-new CLIP object out of them. It doesn't patch anything - it constructs a fresh text encoder from the file. Long-CLIP (beichenzbc's project) took standard CLIP ViT-L/14, stretched its positional embeddings, and fine-tuned it so the model actually uses the extra context instead of ignoring it. The tokenizer here runs at max_length=248, a bit over three times the old 77.
Because the long CLIP is a drop-in replacement for the CLIP-L role in SD 1.5, everything downstream just works. Your checkpoint's MODEL and VAE stay wired exactly as before; only the CLIP feed into CLIPTextEncode changes.
The README also claims clip-skip works, and the code backs it up - the loaded model implements the same layer-selection hooks ComfyUI's "CLIP Set Last Layer" node drives, so anime checkpoints that want skip 2 keep working.
Inputs and outputs
The whole node is one dropdown:
- clip_name - a file picker for your
models/clip(ormodels/text_encoders) folder. Point it at the LongCLIP-L weights.
That's it. There's no clip input, because this node doesn't patch an existing CLIP - it builds one from scratch. The output is a single CLIP, which you wire into CLIPTextEncode in place of the checkpoint's CLIP.
Installing it (the gotcha lives here)
Via ComfyUI Manager (search "ComfyUI-Long-CLIP"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/SeaArtLab/ComfyUI-Long-CLIP
Restart ComfyUI. No extra pip packages - the pack ships no requirements.txt and leans on things ComfyUI already has (torch, safetensors, tqdm).
Then the part that trips everyone: download longclip-L.pt from BeichenZhang/LongCLIP-L on Hugging Face and drop it in models/clip (older ComfyUI) or models/text_encoders (newer). The README says models/checkpoints - ignore that, it's wrong. The node reads the "clip" folder via folder_paths.get_filename_list("clip"), so a file sitting in checkpoints will never appear in the dropdown.
Common issues
- Empty dropdown → file in the wrong folder. Move it to
models/clipormodels/text_encoders. - Output looks unchanged → you wired the checkpoint's CLIP into CLIPTextEncode instead of this node's. Trace the wire.
- Embeddings - the tokenizer still honors
embedding:syntax and reads your embeddings folder, so textual inversions keep working. The code will warn "shape mismatch... embedding will be ignored" if an embedding's vector doesn't match this encoder's dims.
Honest take: Long-CLIP won't turn SD 1.5 into Flux, but if you're on 1.5 with real multi-element prompts, tripling the token budget is a bigger change than any prompt-weight trick. It's the most clearly worth-it node in this pack.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_name | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |