Nodes/ComfyUI-SUPIR/SUPIR Model Loader (v2) (Clip)
ComfyUI Node Runs on cloud

SUPIR Model Loader (v2) (Clip)

For when your CLIP is already split

By kijai·Created 2 years ago·Updated 3 months ago· 2,303
SUPIR Model Loader (v2) (Clip)
  • model
  • clip_l
  • clip_g
  • vae
  • SUPIR_model
  • SUPIR_VAE
supir_model
fp8_unetfalse
diffusion_dtypeauto
high_vramfalse

This is SUPIR_model_loader_v2 with one difference: instead of a single combined clip input, it takes clip_l and clip_g separately - the two text encoders SDXL actually uses under the hood. Most people never need this node, because a normal CheckpointLoaderSimple already hands you a merged CLIP object and the regular v2 loader is happy with that. This one exists for setups where your CLIP encoders aren't coming from one bundled checkpoint - say, a DualCLIPLoader or any workflow where you're loading or swapping the two encoders independently.

If you don't already know why you'd want separate CLIP-L and CLIP-G, you almost certainly want the plain SUPIR_model_loader_v2 instead.

What it does

Functionally identical to the v2 loader: merges your SUPIR checkpoint with an SDXL model to produce the SUPIR_model and SUPIR_VAE used by every downstream SUPIR node. The only structural difference is accepting two CLIP inputs instead of one at the point of merging.

Inputs and outputs that matter

Required: model and vae as usual, plus clip_l and clip_g in place of a single clip - feed each the matching CLIP output from wherever you're loading them. supir_model is the enum picker for your SUPIR checkpoint file. fp8_unet casts unet weights to float8 for a VRAM saving at a small quality cost. diffusion_dtype should stay auto unless you're chasing a load error.

Optional: high_vram, which uses Accelerate to load weights straight to GPU for a modest speed-up during loading - only worth it if VRAM headroom during load isn't a concern.

Outputs: SUPIR_model (SUPIRMODEL) and SUPIR_VAE (SUPIRVAE), same as every other SUPIR loader - they feed the conditioner, sampler, and VAE-side nodes (first_stage, encode, decode).

How to install it

ComfyUI Manager: search "SUPIR", install, restart. Or:

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

Portable: python_embeded\python.exe -m pip install -r .... A recent PyTorch is expected; xformers is optional. You'll need a SUPIR checkpoint (pruned safetensors on Kijai/SUPIR_pruned) and an SDXL checkpoint in ComfyUI/models/checkpoints - plus whatever you're using to source separate CLIP-L/CLIP-G, which this node assumes you've already got working elsewhere in your graph.

Common issues

The failure mode that lands people here by accident: plugging a single merged CLIP into clip_l or clip_g and getting a type mismatch, or plugging this node's two inputs backwards. CLIP-L is the smaller, older-style encoder; CLIP-G is SDXL's larger one - check your loader's output labels rather than guessing, since swapping them silently produces worse conditioning rather than an obvious error.

If you don't have a specific reason to load CLIP-L and CLIP-G separately - most people building a straightforward SUPIR workflow from a single SDXL checkpoint don't - this node is adding a wiring step for no benefit. Drop back to SUPIR_model_loader_v2 and its single clip input; it does the same merge with less to get wrong.

CategorySUPIR

Inputs (8)

NameTypeDefaultDescription
modelMODEL
clip_lCLIP
clip_gCLIP
vaeVAE
supir_modelCOMBO0 options:
fp8_unetBOOLEANfalse
diffusion_dtypeCOMBOauto4 options: fp16, bf16, fp32, auto
high_vramoptBOOLEANfalse

Outputs (2)

NameTypeDescription
SUPIR_modelSUPIRMODEL
SUPIR_VAESUPIRVAE