Nodes/Eric Qwen-Edit & Qwen-Image Nodes/Eric Qwen-Image Unload LoRA
ComfyUI Node

Eric Qwen-Image Unload LoRA

The reset button for Qwen-Image LoRAs

By EricRollei·Created 6 months ago·Updated 4 months ago· 20
Eric Qwen-Image Unload LoRA
  • pipeline
  • pipeline

Some nodes are about creating things. This one is about getting back to a clean state. Eric Qwen-Image Unload LoRA strips every LoRA adapter off the Qwen-Image generation pipeline and hands you back the base model - same pipeline object, factory weights.

It exists because this pack's LoRA handling is chainable and stateful. You can stack several "Eric Qwen-Image Apply LoRA" nodes in a row, each with its own weight (the pack even lets you go negative, −2.0 to 2.0). That's powerful, but it means the pipeline accumulates adapters as it flows through your graph. Run one generation with a style LoRA and the next one inherits it unless something cleans up. That's what this node is for.

Why you'd wire one in

Two scenarios, both common:

  1. Swapping styles between runs. You test image A with the "watercolor" LoRA, then want to generate image B clean. Slip an Unload LoRA into the chain before re-applying a different adapter, and you never have to restart ComfyUI or wonder why the previous style is bleeding through.
  2. Freeing memory before a big job. LoRAs on a 20B transformer add real VRAM. If your next step is an UltraGen run at high resolution, dropping the adapters first is cheap insurance against an OOM.

Mechanically it's about as simple as a node gets: it calls unload_lora_weights() on the diffusers pipeline and clears the pack's internal LoRA tracking. Output is the same QWEN_IMAGE_PIPELINE, ready to feed the next generation node.

Inputs & output

Just one input: pipeline (required, QWEN_IMAGE_PIPELINE). It pops out the other side of the node as pipeline, un-LoRA'd. If you apply a LoRA after this node in the graph, the base model gets the new adapter; apply one before, and it gets stripped.

Install & gotchas

Install the pack via ComfyUI Manager (search "Eric Qwen-Edit") or clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments.git into custom_nodes/ and restart. LoRAs live in ComfyUI/models/loras/, same as always - note that Qwen-Image LoRAs are specific to the Qwen architecture, so don't expect an SDXL LoRA to load.

One subtlety: this is the unloader for the generation pipeline. The edit pipeline has its own "Eric Qwen-Edit Unload LoRA" sibling. If you're editing and generating in one workflow you'll want both in the right places - a generation LoRA unloaded from the wrong pipeline silently does nothing, which is a fun few minutes of debugging. And remember the unload only happens when the node actually executes, so connect it into the path that runs after you're done with the adapter, not off in an unused branch.

CategoryEric Qwen-Image

Inputs (1)

NameTypeDefaultDescription
pipelineQWEN_IMAGE_PIPELINE

Outputs (1)

NameTypeDescription
pipelineQWEN_IMAGE_PIPELINE