LaVi-Bridge LLaMA Encoder
The experimental sibling even the author gave up on
- lavi_embeds
Straight to it: this is the LaVi-Bridge encoder you probably shouldn't use, and the pack's own README tells you why. Kijai's exact words: "I couldn't get anything useful out of the llama2 version, it's included as separate node. Maybe I made mistake, maybe it just isn't that good, I don't know currently." That's the author writing the review for you. The T5 Encoder in the same pack is the one that works; this node exists because the research code shipped both text encoders and someone had to wire the second one in.
What it is
Conceptually it's identical to the T5 encoder: an LLM reads your prompt, a LoRA tunes it for image-conditioning duty, and a small TextAdapter projects its hidden states into something an SD1.5 UNet can condition on. Only here the LLM is Llama-2-7b instead of T5-large. You get the same two inputs - prompt (multiline) and max_length (default 77, up to 512) - and the same single output, lavi_embeds (type LAVIEMBEDS), which feeds the LaVi-Bridge Sampler.
The mechanism is worth understanding only so you know what you're signing up for. The node downloads NousResearch/Llama-2-7b-hf into ComfyUI/models/llama2/ on first run - that's roughly 13 GB - loads the whole thing as a LlamaForCausalLM, monkeypatches a rank-32 LoRA onto every LlamaAttention block, grabs the last hidden state, and shoves it through the bridge's text adapter along with an empty-string unconditional encoding.
The honest cost-benefit
- VRAM is the killer. You're running a full 7B model in fp16 and the diffusion model. Community folks doing the math back in 2024 figured you'd want 24 GB just to breathe, and that was before anyone even chased quality.
- The payoff didn't show up. The T5 path demonstrated the idea; the Llama path mostly demonstrated that a bigger LLM doesn't automatically mean better images. Between the author's admission and the silence from everyone else who tried, there's no body of "yes, and here's the prompt that makes it shine."
- You need the matching loader setting. If you do run it, set
lora_typetollama2_unetin the LaVi-Bridge Model Loader or the embeddings and the visual LoRA won't line up.
When should you use it?
Honestly? Only if you're curious about the mechanism itself, or you've got VRAM to spare and you want to see a 2024-era "LLM actually conditions a diffusion model" in the flesh. The research lineage matters - this whole pack is a fossil of the early-2024 wave where everyone was betting that swapping CLIP for a language model (the ELLA idea, and later the direction SD3 and everything after took) would fix prompt adherence. This node is the version of that bet that lost.
One practical warning: the 13 GB download happens silently on first encode, straight from Hugging Face, and the model isn't in ComfyUI Manager's model list - it just appears in ComfyUI/models/llama2/. If your disk is tight, that's a surprise bill. Everything else about install is shared with the pack: Manager search "ComfyUI-LaVi-Bridge-Wrapper" or git clone https://github.com/kijai/ComfyUI-LaVi-Bridge-Wrapper, then pip install -r requirements.txt (diffusers>=0.26.0, sentencepiece, peft>=0.8.2; add transformers and omegaconf if they're missing).
Use the T5 encoder. Keep this node installed in case a better set of Llama adapters ever lands - but don't let its 13 GB of autodownload talk you into thinking it's the good half of this pack.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Oppenheimer sits on the beach on a chair, watching a nuclear exposition with a huge mushroom cloud, 120mm | — |
| max_length | INT | 771–512 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lavi_embeds | LAVIEMBEDS | — |