Nodes/Diffusion_pipe_in_ComfyUI/SDXL模型配置器
ComfyUI Node

SDXL模型配置器

The one model node with actual learning-rate knobs

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
SDXL模型配置器
    • model_path
    checkpoint_path
    v_predfalse
    min_snr_gamma0.0
    debiased_estimation_lossfalse
    unet_lr0.0000
    text_encoder_1_lr0.0000
    text_encoder_2_lr0.0000

    If you've trained SDXL LoRAs before, this node will feel like coming home - it's the most old-school model picker in the pack. SDXLModelNode doesn't just name a model and a path; it hands you the knobs that used to matter for SDXL-era training: separate learning rates for the UNet and the two text encoders, plus v-prediction and min-SNR options. No other model node in this pack does that, because no other model in this pack trains its text encoders anymore.

    It's worth saying plainly: if you're starting fresh in 2026, the modern transformers (Flux, Qwen-Image, Wan) don't want text-encoder training, and the pack reflects that - only SDXL gets encoder LR fields. This node is for the people who have SDXL datasets and SDXL workflows already.

    How it works

    Standard model-picker mechanics: checkpoint_path is required, and the node builds a {"type": "sdxl", "checkpoint_path": ...} config with the training settings folded in as you set them. Output goes to ModelConfig, then GeneralConfig, then the TOML that Train runs.

    The interesting fields are the training-specific ones, and they're worth understanding because they map to classic SDXL training concepts:

    • v_pred - enables v-prediction for models trained in that space, like the NoobAI vpred line. Wrong setting = bad training, so match it to your checkpoint.
    • min_snr_gamma - min-SNR weighting, a loss-weighting trick that stabilizes training. 0 disables it; values up to 20 give stronger weighting. It's the kind of thing you add when a run struggles with noise-level imbalance.
    • debiased_estimation_loss - flips to a debiased loss estimator. An experiment, off by default.
    • unet_lr / text_encoder_1_lr / text_encoder_2_lr - the three learning rates, defaults 4e-5 for UNet and 2e-5 for both encoders. The classic SDXL recipe trains the UNet hotter than the encoders.

    The inputs that matter

    • checkpoint_path - required, the SDXL checkpoint file path.
    • v_pred - set it if your checkpoint is a vpred model. This is the one that silently ruins runs if wrong.
    • unet_lr / text_encoder_1_lr / text_encoder_2_lr - the three LR knobs.

    Output: model_pathModelConfig.

    Install

    Pack-wide: ComfyUI Manager, search "Diffusion_pipe_in_ComfyUI", or:

    cd ComfyUI/custom_nodes
    git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
    cd Diffusion_pipe_in_ComfyUI
    git submodule init && git submodule update
    pip install -r requirements.txt
    

    Linux/WSL2 only.

    Where people get burned

    The LR tables you remember from old SDXL guides still mostly apply here - but only here. The KB's training notes hammer on this: the modern architectures want different (often higher, batch-dependent) LRs, and the old "small batch, healthy LR" instinct doesn't port. So the trap is the opposite direction: people coming from the new models try SDXL with those settings and get a mess. For SDXL specifically, start near the node's defaults - UNet at 4e-5, encoders at 2e-5 - and only touch min_snr_gamma if you're chasing instability. And never guess on v_pred: check the checkpoint's metadata. Guessing wrong burns an entire run.

    CategoryDiffusion-Pipe/Model

    Inputs (7)

    NameTypeDefaultDescription
    checkpoint_pathSTRINGSDXL checkpoint文件的完整路径
    v_predoptBOOLEANfalse启用v-prediction模式(如NoobAI vpred模型)
    min_snr_gammaoptFLOAT0.00–20最小信噪比gamma值(0为禁用)
    debiased_estimation_lossoptBOOLEANfalse启用去偏估计损失
    unet_lroptFLOAT0.00001e-8–0.01UNet学习率
    text_encoder_1_lroptFLOAT0.00001e-8–0.01Text Encoder 1学习率
    text_encoder_2_lroptFLOAT0.00001e-8–0.01Text Encoder 2学习率

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path