AnyFlow LoRA Loader
Not a LoRA loader, and that's the whole trick
- model
- MODEL
There's a whole genre of ComfyUI node whose job is to stop you doing the obvious thing. DMD-style distilled LoRAs for Anima and friends are the current poster child: load one through a normal LoraLoader and you get a model that was trained to be told something no stock sampler ever tells it. AnyFlow LoRA Loader is the fix, and it's the half of the comfyui-anyflow pack that does the interesting work. It comes from the SimpleTuner-io org - the same people whose training kit produces these "AnyFlow" adapters in the first place - and it's essentially the inference half of a training feature that's brand new.
What an AnyFlow adapter actually is
Ordinary LoRAs teach a model what to draw. An AnyFlow adapter is a low-step distillation adapter, the kind of thing that gets an Anima (a model that normally wants 30-50 steps) down to four. Distillation is a well-worn idea - DMD2, Lightning, LCM - but AnyFlow's specific mechanism is the new bit. During training the denoiser wasn't just told the current timestep t; it was told both ends of the current sampling interval, t and the endpoint r, and learned a "flow map" across that interval. So at inference the model needs that same t/r pair on every denoiser call, or it doesn't know where it is.
When you run the loader on a MODEL, it does two things:
- Applies the adapter's regular LoRA weights the normal way, and
- Rebuilds the model's time-embedding path with a parallel delta branch - a copy of the time embedder that receives the interval's
rand has the adapter's "endpoint" weights installed as low-rank residuals inside it. A training-timegatevalue read from the file's metadata then blends base and delta embeddings.
That's why the loader has to know the architecture. The pack currently supports ComfyUI's Anima, Ideogram 4, and Wan 2.1 (T2V and I2V) bases, and it deliberately raises an error on anything else rather than quietly pretending your adapter is a normal LoRA. It also refuses a second AnyFlow adapter on the same model branch - one per branch, period. Regular LoRAs applied after the loader are fine.
The three inputs that matter
The node is small. Feed it a MODEL and an adapter, out comes a MODEL, with only three required inputs:
- model - from your UNETLoader or checkpoint loader. Must be one of the three supported bases above; anything else errors out before it can do harm.
- lora_name - a dropdown of whatever's sitting in
ComfyUI/models/loras, exactly like a normal LoRA loader. - strength_model - default
1.0, range −20 to +20. Treat it like a LoRA weight. Set it to0and the node passes the model straight through.
Output: MODEL, which you then feed into the sampler side of your graph.
One thing people will fumble: the gate is training configuration, not an inference-strength dial - it's read from flowmap_gate_value and flowmap_deltatime_type metadata stored in the adapter file. Older adapters without that metadata (the README names the anima-anyflow-e621-dmd-v5 files specifically) fall back to gate=0.25 / deltatime_type="r" and log a warning - which is expected, not a problem. If you want more or less effect, use strength_model, not some gate you can't see anyway.
Full setup, from scratch
cd ComfyUI/custom_nodes
git clone https://github.com/SimpleTuner-io/ComfyUI-AnyFlow
Restart ComfyUI (or use ComfyUI Manager and search "comfyui-anyflow"). No extra Python packages. For the Anima example workflow you'll need the base assets on disk:
models/diffusion_models/anima-base-v1.0.safetensorsmodels/text_encoders/qwen_3_06b_base.safetensorsmodels/vae/qwen_image_vae.safetensorsmodels/loras/pytorch_lora_weights.safetensors(frombghira/anima-anyflow-e621-dmd-v5)
The graph order matters: load the base diffusion model, pass its MODEL through AnyFlow LoRA Loader, then use AnyFlow Euler Sampler as the sampler for SamplerCustom/SamplerCustomAdvanced. Build SIGMAS with the normal scheduler nodes - the pack's example uses simple at 4 steps with near-zero CFG. Wire it that way and the r errors stop.
Gotchas worth knowing
If you get the runtime error about the sampler not providing r, you have the loader in the graph but a stock sampler downstream - pair it with the pack's Euler sampler and the error goes away. An "unsupported model family" error means the adapter format isn't a drop-in for SDXL or Flux; the pack would rather fail loudly than generate garbage. And since this is a distillation adapter, don't crank CFG or steps back up hoping for quality - these things are trained for a specific low step count, and the quality knob that used to live in "more steps" now lives in the strength slider.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lora_name | COMBO | 0 options: | |
| strength_model | FLOAT | 1.00-20–20 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |