Nodes/comfyui-nucleus/Load CLIP (Nucleus Image)
ComfyUI Node

Load CLIP (Nucleus Image)

The Qwen3-8B encoder Nucleus Image actually wants (stock ComfyUI gets it wrong)

By marduk191·Created 4 months ago·Updated 4 months ago· 1
Load CLIP (Nucleus Image)
    • CLIP
    clip_name
    device

    Nucleus Image is the sparse MoE diffusion model that dropped in April 2026 with 17B total parameters but only ~2B active per forward pass - and for a week the top comment on the release thread was just "ComfyUI, please, you know what we need." This node is part of that answer. It's the text half of the setup: a CLIP loader that reads a Qwen3-8B text encoder the way Nucleus expects, because the stock ComfyUI loader, at the time, didn't.

    Here's the subtle bit that makes this node exist at all. Nucleus Image conditions on a Qwen3-8B LLM encoder that emits a single hidden state - 4096 dims. But stock ComfyUI routes any Qwen3-8B state dict through Klein's text encoder, which stacks the last three LLaMA hidden layers into 3×4096 = 12288 dims. Wrong shape, wrong model. NucleusCLIPLoader (labeled "Load CLIP (Nucleus Image)" in the node menu) skips that routing entirely and builds the CLIP object directly with Nucleus's own tokenizer and encoder class, so your prompt gets encoded at the dimensionality the diffusion model actually cross-attends to. If your Nucleus runs produce garbage or a dimension mismatch, this is usually why.

    The pack (marduk191/comfyui-nucleus, by the community quantizer behind those -marduk191 GGUF files) is a backport of ComfyUI's PR #13471, which is the official Nucleus Image support. It patches core ComfyUI in memory at startup - model detection, supported models, the whole works - so the checkpoint loader handles Nucleus-Image-* files too, not just this node. If you're already on a ComfyUI build with that PR merged, this is mostly redundant, but harmless.

    The inputs that matter

    It's a gloriously small node, because the encoder choice is the whole job:

    • clip_name - a dropdown of everything in ComfyUI/models/text_encoders. Point it at the Qwen3-8B file that ships with your Nucleus download - the pack's own workflow uses Nucleus-Qwen3VL-Text-FP8-e4m3fn-scaled.safetensors, the FP8 scaled version from the e-n-v-y/Nucleus-Image-FP8-scaled HF repo. That's the one to grab; an fp16 Qwen3-8B is ~16GB of VRAM before you even load the model.
    • device - default or cpu, tucked under "advanced." cpu forces the encoder off your card. Slow, but it's how you squeeze a full-res diffusion model onto a 12GB card.
    • Output: one CLIP socket. Wire it into the same CLIPTextEncode nodes you'd use with any modern model, then on to conditioning and the sampler.

    One thing worth knowing: this node reads the encoder with a raw torch load, so it's safetensors only - no GGUF. If you've been quantizing your encoders to fit, you can't feed a .gguf here; grab the FP8 scaled safetensors instead. And don't grab the Qwen3-4B from your Z-Image folder while you're at it - this is hard-wired to the 8B.

    How the prompt gets treated

    The bundled tokenizer wraps your text in a Qwen chat template - "You are an image generation assistant. Follow the user's prompt literally. Pay careful attention to spatial layout…" - the same instruction-following style the KB tracks across Qwen-based models (Z-Image, Klein). That means full sentences with explicit placement beat comma-separated tags, and prompt weighting syntax is disabled on this path. Don't write (red:1.2); write "a red umbrella on the left."

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/marduk191/comfyui-nucleus
    # restart ComfyUI
    

    ComfyUI Manager users can just search "comfyui-nucleus." There are no Python dependencies - no requirements.txt, nothing to pip install. The tokenizer reuses the Qwen files ComfyUI already bundles. You only need the model files in the right folders:

    ComfyUI/models/text_encoders/   Nucleus-Qwen3VL-Text-FP8-e4m3fn-scaled.safetensors
    ComfyUI/models/diffusion_models/ Nucleus-Image-FP8-e4m3fn-scaled-packed.safetensors
    ComfyUI/models/vae/              wan_2.1_vae.safetensors
    

    Nucleus reuses the Wan 2.1 VAE, and its latent format is Wan21 - which is why you might see EmptyHunyuanLatentVideo in the reference workflow, despite this being a text-to-image model. Weird, but expected.

    Gotchas

    The pack patches live ComfyUI internals, so it needs a current ComfyUI - if a fresh install throws "failed to register nucleus_image text encoder," you're on a build too old (or too broken) for the backport. Keep ComfyUI updated. Beyond that: safetensors only, 8B only, and the author's own workflow note is worth heeding - "I have no idea what settings are best yet lol." It's a base model with no RL/post-training tuning, so expect to fiddle with CFG and samplers; the shipped workflow starts at 30 steps, CFG 4.6, exp_heun_2_x0.

    Categorynucleus

    Inputs (2)

    NameTypeDefaultDescription
    clip_nameCOMBO0 options:
    deviceoptCOMBO2 options: default, cpu

    Outputs (1)

    NameTypeDescription
    CLIPCLIP