Nodes/ComfyUI-T-LoRA/Load T-LoRA (LyCORIS, Bypass)
ComfyUI Node

Load T-LoRA (LyCORIS, Bypass)

Loading LyCORIS T-LoRA in ComfyUI

By bghira·Created 7 months ago·Updated 7 months ago· 1
Load T-LoRA (LyCORIS, Bypass)
  • model
  • clip
  • MODEL
  • CLIP
lora_name
strength_model1.00
strength_clip0.00
max_rank0
min_rank1
alpha1.00
max_timestep0
mask_group_id0
debugfalse
debug_every1

You've loaded a thousand LoRAs, and they all work the same way: one fixed strength, one fixed rank, every step of the denoise. This node is the exception. T-LoRA stands for timestep-aware LoRA - the adapter's effective rank changes as the image is denoised, starting small on the noisy early steps and growing toward full rank as fine detail gets decided. If you trained (or downloaded) a T-LoRA, a plain Load LoRA node silently throws away the entire trick. This is the loader that plays it back.

This one - Load T-LoRA (LyCORIS, Bypass) - is the LyCORIS-flavored half of bghira's ComfyUI-T-LoRA pack, from the same person who writes SimpleTuner (the training stack that had Flux LoRA support up within weeks of the model's release). It's inference-only: you bring a LyCORIS-format T-LoRA checkpoint and it handles the per-step rank masking for you.

How it works

At every denoise step the node computes an active rank:

r = int(((max_timestep - t) / max_timestep)^alpha * (max_rank - min_rank)) + min_rank

Where t is the current timestep. Early in sampling t is large, so r sits near min_rank; as denoising proceeds t falls and r climbs toward max_rank. That rank then becomes a binary mask over the adapter's rank dimensions, applied before the UNet forward. Here the mask is handed to LyCORIS itself via set_timestep_mask(...), and the checkpoint's q_layer / p_layer / lambda_layer modules are parsed and converted into ComfyUI bypass adapters. Non-T-LoRA LyCORIS modules in a mixed checkpoint are skipped.

The inputs that matter

The full list is short enough to eyeball:

  • lora_name - your T-LoRA file, picked from models/loras.
  • strength_model - start at 1.0.
  • max_rank - 0 means "infer from the checkpoint," which you want. Set it manually only if inference fails.
  • min_rank - 1 by default; the floor the mask never goes below.
  • alpha - 1.0 is the linear ramp; higher values bias the schedule toward low rank for longer.
  • max_timestep - 0 infers from the model's sampling. Leave it.
  • mask_group_id - lets multiple T-LoRAs share the runtime without stepping on each other. Leave at 0 unless you're stacking.
  • debug + debug_every - turn on and you get [ComfyUI-T-LoRA][step] lines in the console showing the active rank per step. Genuinely handy when something looks wrong.

The outputs are MODEL and CLIP, and both go down the normal sampler path - the node slots in exactly where a regular LoRA loader sits.

One honest warning: strength_clip is in the schema but currently ignored here, and the pack flags that itself. Don't set it expecting CLIP conditioning changes; this whole family is model-side only.

Installing it

This pack has no requirements.txt - the heavy lifting is done by whatever LyCORIS you have installed. Install the pack via ComfyUI Manager (search ComfyUI-T-LoRA) or:

cd ComfyUI/custom_nodes
git clone https://github.com/bghira/ComfyUI-T-LoRA

Then - and this is the step people skip - the LyCORIS loader needs T-LoRA support, which the released LyCORIS build may not have. Install from upstream main:

pip install -U git+https://github.com/KohakuBlueleaf/LyCORIS.git

Restart ComfyUI after both. No model downloads; you supply the base model and the T-LoRA checkpoint yourself.

Common issues

The most common failure is an import error telling you the installed lycoris package is missing T-LoRA APIs (set_timestep_mask, compute_timestep_mask, TLoraModule, ...). That's the PyPI-release-versus-git-main gap above - reinstall from main. If you get "Could not infer LyCORIS T-LoRA rank from checkpoint," set max_rank explicitly. And if nothing loads, check the console for [ComfyUI-T-LoRA] warnings listing unmapped keys - your checkpoint may be a standard LyCORIS LoRA rather than a T-LoRA.

Also worth knowing: this is a niche, research-adjacent format. Reddit barely talks about T-LoRA at all, so if your checkpoint isn't explicitly a T-LoRA (trained with a timestep-masked recipe), you probably want a regular LyCORIS loader instead. When it is a T-LoRA, this node is the one you'd reach for.

Categoryloaders

Inputs (12)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBO0 options:
strength_modelFLOAT1.00-100–100
strength_clipFLOAT0.00-100–100
max_rankINT00–40960 = infer from checkpoint
min_rankINT10–4096
alphaFLOAT1.000.05–8
max_timestepINT00–2000000 = infer from model sampling
mask_group_idINT00–32
debugBOOLEANfalse
debug_everyINT11–1000

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP