Nodes/ComfyUI Flux Trainer/SDXL Model Select
ComfyUI Node

SDXL Model Select

Pick the checkpoint your SDXL LoRA trains on

By kijai·Created 2 years ago·Updated about a year ago· 1,156
SDXL Model Select
    • sdxl_models
    checkpoint
    lora_path

    The SDXL side of Flux Trainer is refreshingly simple, and SDXLModelSelect is the reason why. Where the Flux path makes you gather a transformer, a VAE, and two text encoders separately, SDXL packs everything into one checkpoint file - so this node is a single dropdown. Pick your SDXL checkpoint, and you're done.

    Its output feeds InitSDXLLoRATraining, which is the node that runs the actual SDXL (or Illustrious, or Pony) LoRA train.

    How it works

    One required input, checkpoint - a dropdown of the SDXL checkpoints in your ComfyUI models folder. Because an SDXL checkpoint already bundles the UNet, VAE, and both CLIP encoders, that's all the trainer needs. There's an optional lora_path string too, for loading an existing LoRA on top (handy if you want to keep training from a previous adapter). The single output is sdxl_models (type TRAIN_SDXL_MODELS), which plugs into the Init SDXL node.

    Which checkpoint to train on

    This choice matters more than the node's simplicity suggests. Train on a base close to the aesthetic you want out. For a realistic character, start from a realistic SDXL checkpoint; for anime, start from Illustrious or Pony or NoobAI. A LoRA is a nudge on top of the base, so a base that already leans your direction needs far less nudging - and remember that anime bases expect Danbooru-tag captions in your dataset, while realistic ones take natural language. The architecture lock is absolute either way: an SDXL LoRA only runs on SDXL-lineage models, never on Flux.

    One subtlety worth knowing: the checkpoint you train on and the one you run the LoRA on don't have to be identical. People often train on a clean, general base and then use the resulting LoRA on their favorite merge. It usually transfers fine within the SDXL family, but if likeness feels off when you switch checkpoints, training on something closer to your target model is the fix.

    Why the SDXL path is the easy one here

    If you've wrestled with the Flux side of this pack - hunting down the right ae.safetensors, matching fp8 versus fp16, wiring four separate model inputs - the SDXL path is a relief. Everything the trainer needs is inside the one checkpoint file, so there's exactly one thing to get right. That's a genuine reason to cut your teeth on an SDXL LoRA first if you're new to training in ComfyUI, then graduate to the fiddlier Flux workflow once the overall Init → Loop → Validate → End rhythm makes sense.

    Installing the pack

    ComfyUI Manager: search ComfyUI Flux Trainer, install, restart. Manually:

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

    Torch 2.4.0+ recommended, plus kijai's ComfyUI-KJNodes for the example workflows.

    Common issues

    Your checkpoint isn't in the dropdown. The node lists checkpoints from your ComfyUI checkpoints folder. If it's missing, drop the file there and refresh the node list.

    You picked an SD 1.5 checkpoint by mistake. This node is for SDXL-lineage models. A 1.5 checkpoint won't train correctly through the SDXL path - check that what you selected is actually SDXL (or Illustrious/Pony, which are SDXL under the hood).

    Base model fights your dataset. If your outputs look wrong no matter the settings, the base and the captioning style may be mismatched - anime base with sentence captions, or a realistic base fed Danbooru tags. Match the caption style to how the base was trained.

    CategoryFluxTrainer/SDXL

    Inputs (2)

    NameTypeDefaultDescription
    checkpointCOMBO0 options:
    lora_pathoptSTRINGpre-trained LoRA path to load (network_weights)

    Outputs (1)

    NameTypeDescription
    sdxl_modelsTRAIN_SDXL_MODELS