Nodes/qq-nodes-comfyui/Axis To CLIP
ComfyUI Node

Axis To CLIP

Swap text encoders per grid cell, when you're weird enough to want to

By kenjiqq·Created 3 years ago·Updated about a year ago· 76
Axis To CLIP
  • axis
  • CLIP

Axis To CLIP is the pack's converter that turns an AXIS_VALUE into a CLIP - the text-encoder object that turns your prompt into conditioning. It's how you'd sweep which text encoder a grid uses, or pass an encoder that arrives from elsewhere in the workflow instead of the one the sampler normally sees.

Reality check before the details: this is the niche member of the Axis To X family. In normal use you'll never sweep CLIPs, because the CLIP usually stays fixed while you sweep the prompt (a string) or the model. You reach for Axis To CLIP in one of two situations:

  1. You're building an axis that supplies a pre-loaded CLIP. Say your workflow has two different encoders (an SD1.5 encoder and an SDXL encoder) loaded up front, and you want a grid that tries each. The CLIP axis carries the encoder object itself, not a name.
  2. Axis packing. The README's "Axis Packing Grid" example packs a unet, clip, and vae into one axis value - on the output side, Axis Unpack splits them back, and the clip part needs a converter like this to become a usable CLIP again.

How it works

  • axis (required) - the AXIS_VALUE from XY Grid Helper (or a slot of a packed axis after Axis Unpack).
  • CLIP (output) - the same value, re-declared as CLIP so the graph will let you wire it into a CLIP Text Encode.

It's a straight pass-through; the value was already a CLIP object, the converter just tells ComfyUI's type system that. That's the entire pattern of every Axis To X node - declare the concrete type, let the wire connect.

The trap

The value coming through must actually be a CLIP object. If your list holds model names (strings like "sd_xl_base.safetensors") and you pipe them through Axis To CLIP expecting it to load anything, you'll get a string where an encoder belongs and a cryptic error at the text encoder. To sweep models by name you want a loader on the output side, not this converter. The axis machinery carries objects, not load instructions.

The family note

The pack generates its converters from axis-config.json - currently STRING, MODEL, INT, NUMBER, FLOAT, BOOLEAN, VAE, CLIP - so Axis To CLIP is one of the stock set. You can add your own types by editing custom-axis-config.json and restarting. If a listing shows "Axis To CLIP" with different casing, it's the same generated node.

Installing it

Part of qq-nodes-comfyui:

cd ComfyUI/custom_nodes
git clone https://github.com/kenjiqq/qq-nodes-comfyui

Restart, or install qq-nodes-comfyui via ComfyUI Manager. Found under QQNodes/XYGrid Axis. No pip requirements.

CategoryQQNodes/XYGrid Axis

Inputs (1)

NameTypeDefaultDescription
axisAXIS_VALUE

Outputs (1)

NameTypeDescription
CLIPCLIP