Nodes/ComfyUI_LucidNFT/LucidNFT_SM_Model
ComfyUI Node

LucidNFT_SM_Model

The loader that glues LucidFlux onto your Flux DIT — and the hardest part of this pack

By smthemex·Created 6 months ago·Updated 6 months ago· 20
LucidNFT_SM_Model
  • cf_model
  • model
LucidFlux
diffusion_models
block_offloadtrue
model_type

LucidNFT is a 2026 academic super-resolution model from W2GenAI-Lab (arXiv 2603.05947) - "LR-Anchored Multi-Reward Preference Optimization for Generative Real-World Super-Resolution" - and it belongs to the generative-restoration school that SUPIR popularized: it doesn't just add pixels, it invents the detail that was never in the source. What sets it apart is the backbone. Instead of an SDXL like SUPIR, it rides Flux, and LucidNFT_SM_Model is its ComfyUI front door.

This is the node with the most setup attached, because "the model" isn't one file. LucidNFT_SM_Model does two things at once: it loads a standard Flux DIT from your diffusion_models folder (the backbone), and it loads lucidflux.pth (the actual LucidFlux checkpoint), which carries the weights for a second, lighter dual condition branch. That second network watches two versions of your input - the raw low-res image (LQ) and a SwinIR-cleaned version (LDR) - and injects modulation into the Flux blocks while the denoiser runs. That dual conditioning is the "LR-anchored" part of the name: the model is anchored to the real low-res pixels the whole way through, instead of free-floating in hallucination space. Every workflow in this pack starts here; there's no way around it.

The inputs that matter

  • LucidFlux - pick lucidflux.pth from the models/LucidFlux/ folder (the node creates that folder for you). This is required; the node refuses to run without it.
  • diffusion_models - any standard Flux DIT in your diffusion_models folder. The example uses flux1-kj-dev-fp8.safetensors. The filename matters more than you'd expect: if it doesn't contain "dev", the node assumes flux-schnell and schedules the denoise differently. A plain Flux dev DIT is what you want.
  • block_offload (default true) - keeps VRAM sane by shuttling modules to CPU between pipeline stages. Leave it on unless you're debugging.
  • model_type - bf16 (default) or f32. bf16 is what you'll use; switch to f32 only if you hit precision weirdness.
  • cf_model (optional) - a regular ComfyUI MODEL. If you wire one in, the node inspects its weights for guidance_in.in_layer.weight to decide dev vs schnell for you, which is a nice fallback if your DIT filename is ambiguous.

The single output, model, is a pipe dict that carries both the Flux backbone and the dual condition branch. It feeds LucidNFT_SM_Cond next. Don't try to send it to a stock KSampler - it's this pack's internal object, not a plain ComfyUI model.

Installing the pack (the real way)

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_LucidNFT
pip install -r requirements.txt

Then restart ComfyUI. The requirements are the heavy-hitters: diffusers, transformers, peft, timm, opencv-python. Unpinned versions, so be ready for the occasional version-drift conflict with a bleeding-edge ComfyUI. One more compatibility note: this pack is written against ComfyUI's newer V3 node API (comfy_api.latest / ComfyExtension), so it needs a recent ComfyUI - the old-style registration packs will still load fine, but this one won't on an ancient install.

Then the model shopping list, all going into ComfyUI/models/:

├── diffusion_models/          any Flux dev DIT (e.g. flux1-kj-dev-fp8.safetensors)
├── vae/                       ae.safetensors (Flux AE, from Comfy-Org/models)
├── clip_vision/               siglip2-so400m-patch16-512.safetensors (rename model.safetensors)
├── LucidFlux/
│   ├── lucidflux.pth          from W2GenAI/LucidFlux
│   ├── prompt_embeddings.pt   from W2GenAI/LucidFlux
│   ├── lucid_connector.pth    from smthem/LucidFLUX-connector
│   ├── general_swinir_v1.ckpt from lxq007/DiffBIR
│   ├── lora_dit/              LucidNFT LoRA (adapter_config.json + adapter_model.safetensors)
│   └── lora_condition/        LucidNFT LoRA (adapter_config.json + adapter_model.safetensors)

Where people get burned

At the time of writing this pack is a single git commit and essentially brand new - I found zero community discussion of this repo specifically, which means you are the beta tester. The sibling pack from the same author (ComfyUI_LucidFlux) had real reports of OOM and confusing setup, so treat the weight downloads as the critical path and double-check every file landed in the folder the node is looking at. A "need LucidFlux" assert means the combo is empty or the folder path is wrong. Budget VRAM like it's a Flux model that happens to do restoration - fp8 DIT plus offload is the friendly path, not the full bf16 dev.

CategoryLucidNFT

Inputs (5)

NameTypeDefaultDescription
LucidFluxCOMBO1 options: none
diffusion_modelsCOMBO1 options: none
block_offloadBOOLEANtrue
model_typeCOMBO2 options: bf16, f32
cf_modeloptMODEL

Outputs (1)

NameTypeDescription
modelMODEL