SDXL模型配置器
The one model node with actual learning-rate knobs
- model_path
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.0disables 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, defaults4e-5for UNet and2e-5for 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_path → ModelConfig.
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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| checkpoint_path | STRING | SDXL checkpoint文件的完整路径 | |
| v_predopt | BOOLEAN | false | 启用v-prediction模式(如NoobAI vpred模型) |
| min_snr_gammaopt | FLOAT | 0.00–20 | 最小信噪比gamma值(0为禁用) |
| debiased_estimation_lossopt | BOOLEAN | false | 启用去偏估计损失 |
| unet_lropt | FLOAT | 0.00001e-8–0.01 | UNet学习率 |
| text_encoder_1_lropt | FLOAT | 0.00001e-8–0.01 | Text Encoder 1学习率 |
| text_encoder_2_lropt | FLOAT | 0.00001e-8–0.01 | Text Encoder 2学习率 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model_path | model_path | — |