Nodes/ComfyUI_LucidNFT/LucidNFT_SM_Encode
ComfyUI Node

LucidNFT_SM_Encode

Conditioning without a CLIP encode — on purpose

By smthemex·Created 6 months ago·Updated 6 months ago· 20
LucidNFT_SM_Encode
  • CLIP_VISION
  • cond
  • positive
  • condition
seed0
emb
connector
model_type

If you've poked at the sibling pack (ComfyUI_LucidFlux), you already know the two complaints that came up over and over: "positive conditioning is unconnected" errors, and instant OOM the moment people connected a real CLIP encode - one guy on a 5090 with 32GB still hit it. LucidNFT_SM_Encode is the redesign that fixes both. The text prompt is precomputed and shipped as a file, the image is encoded by SigLIP through a small connector, and text conditioning is genuinely optional. You don't need a text encoder at inference time at all.

How it works

This is the node that builds the condition dict for the sampler. It reads the image out of the condition object LucidNFT_SM_Diffbir gave you (the LR anchor), pads it to multiples of 16 if needed, and encodes it with the SigLIP vision model you load via a CLIPVisionLoader. Those vision features go through a small ReduxImageEncoder-style connector (lucid_connector.pth, which the README describes as split out of the main checkpoint) and come out as image embeddings. Those get concatenated onto the text embeddings, which come from prompt_embeddings.pt - the precomputed "restore this image into a high-quality, clean, high-resolution result"-type prompt the authors baked in.

Want your own prompt instead? Pass a CONDITIONING into the optional positive input - the node will use that text instead of the precomputed file. That's the whole escape hatch; for a restoration tool, the fixed prompt is usually the right call anyway.

Inputs and output

  • CLIP_VISION - required. Load siglip2-so400m-patch16-512.safetensors (in models/clip_vision/) with a CLIPVisionLoader. Rename it from model.safetensors when you download it, or it collides with every other SigLIP in your folder.
  • cond - the CONDITIONING output of LucidNFT_SM_Diffbir. This is required and it must be Diffbir's, not an arbitrary conditioning: the node pulls the LR anchor images out of it. Feed a plain CLIPTextEncode here and it'll blow up.
  • emb - prompt_embeddings.pt from models/LucidFlux/.
  • connector - lucid_connector.pth. Hard-required; the node asserts on it ("need connector").
  • seed - reproduced with torch.manual_seed, so it matters for exact reproducibility.
  • model_type - bf16 (default) / f32, matching what you used in LucidNFT_SM_Model.
  • positive (optional) - custom text conditioning.

Output is a single condition that wires into LucidNFT_SM_KSampler.

Setup

Pack install as usual (git clone, pip install -r requirements.txt, restart). SigLIP loads through the transformers dependency, and the connector through diffusers - those are the two big installs the requirements drag in, and the reason this pack isn't lightweight. The one workflow gotcha: wire Diffbir's cond into this node's cond - the anchors travel inside that dict, so don't try to substitute the raw image (Diffbir's image output is just for preview). And don't leave emb or connector at none. The predecessor pack's threads showed exactly what happens when you guess your way through this - spend the two minutes on the wiring and the whole chain runs quietly.

CategoryLucidNFT

Inputs (7)

NameTypeDefaultDescription
CLIP_VISIONCLIP_VISION
condCONDITIONING
seedINT00–2147483647
embCOMBO1 options: none
connectorCOMBO1 options: none
model_typeCOMBO2 options: bf16, f32
positiveoptCONDITIONING

Outputs (1)

NameTypeDescription
conditionCONDITIONING