LUNA Text Conditioner
CLIP skip is dead — say hi to the chat-format text encoder
- llm_model
- conditioning
The node this whole pack exists for
Z-Image encodes its prompts with a Qwen3-4B LLM, and the full bf16 weights hog ~8GB of VRAM - more than the 6B diffusion model they feed. LUNA Text Conditioner is the drop-in replacement for that encoder: it takes the GGUF-quantized Qwen3-VL your LUNA VLM Loader already loaded, runs your prompt through it, and outputs the exact CONDITIONING format Z-Image's sampler expects. Same job, roughly a quarter of the VRAM.
If you've been sitting out Z-Image because the encoder wouldn't fit next to the model, this is the node that lets you in.
How it works (the part that's not obvious)
You'd think "quantized LLM encoder" just means loading the GGUF and calling the embed function. It doesn't work that way here, and that's the whole story of the pack. Z-Image conditions on the penultimate hidden states of its encoder - not the final layer - and stock llama-cpp-python can't expose those. So the pack runs on a forked llama-cpp-python that can, the conditioner wraps your prompt in the Qwen3 chat template (<|im_start|>user\n…<|im_end|>), tokenizes it, does one forward pass, and grabs hidden_states[-2] for every token. Then it applies the matched adapter the loader loaded, which realigns the Qwen3-VL hidden states to the base distribution Z-Image's denoiser was trained on, and emits standard Z-Image/Lumina2 conditioning: a [1, seq_len, 2560] bfloat16 tensor plus an attention mask. The 2560 dimension matches the official Qwen3-4B encoder, so the sampler can't tell the difference.
The two inputs and the output
- llm_model - from the LUNA VLM Loader. Nothing else feeds it.
- text - your prompt, multiline, with dynamic prompts supported.
- output:
conditioning- straight into a KSampler (or a conditioning combine, if you want to blend).
That's it. Two inputs, one output, and the entire job is "text goes in, conditioning comes out."
Prompting like it's 2026
Because this is an LLM encoder, your prompt is read like a chat turn, not a bag of tags. Full sentences with explicit ownership beat comma-separated keyword lists - "a woman in a red coat sitting on a bench" lands harder than "woman, red coat, bench, sitting." And the CLIP-era tricks are dead on this path: no ((word:1.4)) weighting, no prompt weighting syntax, no negative embeddings. They fail silently rather than erroring, so if you're porting an SDXL workflow and wondering why the emphasis stopped working, that's why.
One more thing worth internalizing: attention drifts past roughly 75–100 effective tokens. The old 77-token CLIP limit is gone, but "more words" is still not "better prompt." Three to five strong concepts, subject first.
Installing it
Same pack, same steps as the loader - install once, use all three nodes. ComfyUI Manager (search LUNA Z-Image Qwen3-VL) or:
cd ComfyUI/custom_nodes
git clone https://github.com/LSDJesus/LUNA-Z-Image-Qwen3-VL.git
cd LUNA-Z-Image-Qwen3-VL
pip install -r requirements.txt
Then restart ComfyUI. The requirements.txt installs the LUNA fork of llama-cpp-python, which is mandatory - the official build lacks the penultimate-layer API and this node will error out on it. There's no macOS wheel in the list, so Mac users build the fork from source.
Gotchas
- Adapter mismatch is silent-ish. If you drop a GGUF file that isn't one of the named LUNA quantizations, the loader logs a warning that conditioning will work but quality may differ. Keep to the listed model files and the auto-matched adapter handles the rest.
- Long prompts eat tokens and n_ctx is 2048 by default. You're not going to hit it with a sane prompt, but a wall of text plus a big n_ctx slows the encode pass.
- Watch the console for "loaded adapter" on first encode - if you don't see it, check that the model filename's quant tag matched an adapter file.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_model | LLM_MODEL | From LUNA VLM Loader | |
| text | STRING | Text prompt to encode |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |