Unload LoRA (SimpleTuner Flux 2)
Unloading a Flux 2 LoRA without reloading the base model
- pipeline
- pipeline
SimpleTunerFlux2LoRAUnloader ("Unload LoRA (SimpleTuner Flux 2)") is the pack's cleanup node, and it exists for a practical reason: reloading a Flux 2 base model is expensive, so you don't want to tear down the pipeline just to swap or drop a LoRA. This node removes the adapter in place and hands you back a clean ST_FLUX2_PIPELINE.
How it works
The loader attaches LoRAs as PEFT adapters via load_lora_weights + set_adapters. The unloader is the mirror image: if you pass an adapter_name, it calls delete_adapters([name]) to remove just that one; if the field is empty (the default), it calls unload_lora_weights() to strip every adapter at once. Either way the base pipeline stays loaded, which is the whole value proposition - A/B testing a LoRA on or off becomes a few widget edits instead of a multi-gigabyte reload.
Inputs are minimal: the pipeline (required), and optional adapter_name (default "" = unload all). Output is the same pipeline.
The one thing to get right
The adapter_name here must match the name the LoRA was loaded under - which is "default" unless you changed it in the Load LoRA node. If you loaded a LoRA with a custom adapter name and then unload "all," you're fine; if you try to delete one specific adapter and type the wrong name, nothing visibly happens (the node logs a warning and moves on). The pattern that works for LoRA-switching workflows: Load LoRA (adapter name A) → Sample → Unload (adapter name A) → Load LoRA (adapter name B) → Sample, all on the same live pipeline.
Installing the pack
Same one-time install as the rest of the pack:
cd ComfyUI/custom_nodes
git clone --recursive https://github.com/flowers6421/ComfyUI-SimpleTunerFlux2.git
cd ComfyUI-SimpleTunerFlux2
./install.sh # Linux/macOS
# python install.py # Windows
or via ComfyUI Manager by searching "ComfyUI-SimpleTunerFlux2", then restart.
Honest take
Is this node necessary? Not always. ComfyUI re-executes the graph's changed branches, so a second Load LoRA with a different file effectively replaces the adapter anyway, and the loader's IS_CHANGED logic forces a reload when the LoRA path changes. The unloader earns its keep in the cases where you genuinely want the adapter gone - memory pressure from stacked adapters, or a workflow where a no-LoRA pass must be provably clean. For a single-LoRA workflow you can skip it entirely and lose nothing. It's a thin utility, but a free one, and when you need it you need it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | ST_FLUX2_PIPELINE | — | |
| adapter_nameopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipeline | ST_FLUX2_PIPELINE | — |