LucidNFT_SM_Diffbir
The 'super-resolution' that happens before the diffusion model
- image
- cond
- image
The name over-promises a little. This isn't the full DiffBIR restoration model - it's the SwinIR front half of it, and its job is to build the reference image that anchors the entire LucidNFT pipeline. Think of it as the prep cook: it doesn't create anything, it makes sure the diffusion model is cooking from a good starting point.
Here's the trick the whole pack is built on. LucidNFT conditions the Flux denoiser on two versions of your low-res input at once: the plain upscaled image (called LQ - low quality) and a SwinIR-cleaned version (LDR - low dynamic range / pre-restored). DiffBir is the node that produces that pair. It takes your image, upscales it to your target width × height, runs the SwinIR restoration net over it to knock out compression and noise, and packages both versions into a condition dict. The diffusion pass then gets to restore toward a clean reference instead of inventing everything from scratch - which is exactly why this lineage of upscalers rewrites fewer faces than the pure hallucinators.
Inputs and outputs
- swinir - pick
general_swinir_v1.ckptfrommodels/LucidFlux/. This is the DiffBIR v1 weight, and version matters: grab the v1 file fromlxq007/DiffBIR, not the v2.1 or turbo checkpoints that live in the same repo. The predecessor pack's threads are full of people who grabbed the wrong one. - image - your low-res source from any LoadImage.
- width / height - target size, default 1024, step 64. The bigger the target, the more VRAM everything downstream eats, so start at 1024 before you dream about 4K.
Two outputs, and both get used:
- cond (
CONDITIONING) - the condition dict carrying the image, the LQ anchor and the LDR anchor. Wire this intoLucidNFT_SM_Encode. This is the one that matters; the node refuses to run the chain without it. - image (
IMAGE) - the upscaled-but-not-yet-restored source. Useful for a preview (what you'd get from a plain lanczos-ish resize), and a copy of it is stashed inside the condition dict where the decoder later uses it as the color reference.
Wiring and gotchas
Install is the pack-level one: git clone https://github.com/smthemex/ComfyUI_LucidNFT into custom_nodes, pip install -r requirements.txt, restart. The swinir file plus the rest of the model layout is covered on the LucidNFT_SM_Model page - this node only touches general_swinir_v1.ckpt.
Two things trip people up. First, this node runs SwinIR on the CPU/GPU boundary and clears the ComfyUI model cache aggressively (the code literally unpins loaded models before it runs), so the first execution in a fresh queue can feel slow and other nodes' models get evicted. That's the design, not a crash. Second, because it needs the swinir path, the combo will be empty until you've actually downloaded the ckpt into models/LucidFlux/ - you'll get a "need swinir" assert otherwise. If you see that, you haven't dropped the file in the folder the node is looking at, no matter how sure you are that you did.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| swinir | COMBO | 1 options: none | |
| image | IMAGE | — | |
| width | INT | 1024256–16384 | — |
| height | INT | 1024256–16384 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| cond | CONDITIONING | — |
| image | IMAGE | — |