Run this model with HF Jobs

Run guyuchao/AnyFlow2-LoRA-Collections on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/guyuchao/AnyFlow2-LoRA-Collections. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/guyuchao/AnyFlow2-LoRA-Collections on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("guyuchao/AnyFlow2-LoRA-Collections")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

AnyFlow 2.0 LoRA Collections

πŸ–₯️ Code  ο½œ  πŸ“‘ Paper  ο½œ  🌐 Website  ο½œ  🎬 Video  ο½œ  πŸ€— Models


AnyFlow 2.0: Large-Scale Video Diffusion Distillation with Distributional Trajectory Regression

AnyFlow 2.0 distills large diffusion models through distributional trajectory regression (DTR). A continuous curvature head represents velocities inside each sampling transition, allowing trajectory regression and distribution matching to train the same intermediate student trajectory. A parameterized fake-score model supplies distribution feedback that distinguishes the source intervals.

This collection provides five BF16 EMA LoRA adapters for image, video, and audio-video generation. The supplied inference configurations use 4 sampling steps.

AnyFlow 2.0 performance across six tasks

Performance overview from the AnyFlow 2.0 project page. The figure covers the paper's six tasks; this collection contains the five bidirectional adapters listed below.

Video Demos

Released Models

Model Task Base model Download
FLUX.1 Dev Text to image black-forest-labs/FLUX.1-dev LoRA Β· Config
FLUX.3 Klein Base Text to image black-forest-labs/flux-3-image-klein-base LoRA Β· Config
Wan2.1 T2V 14B Text to video Wan-AI/Wan2.1-T2V-14B-Diffusers LoRA Β· Config
H3 T2VA 33B Text to video and audio MiniMaxAI/MiniMax-H3 LoRA Β· Config
H3 Ref2VA 33B Reference to video and audio MiniMaxAI/MiniMax-H3 LoRA Β· Config

H3 generates video with a stereo audio track. FLUX.3 also uses the official prompt upsampler.

The adapters use the AnyFlow 2.0 model classes and schedulers. Load them with the corresponding base model and the provided configuration in the AnyFlow codebase.

Quickstart

1. Set Up the Environment

From the AnyFlow 2.0 code repository root:

conda create -n anyflow2 python=3.11 -y
conda activate anyflow2
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt --no-build-isolation

2. Download the Models

Download this collection into the directory used by the demo and configs:

hf download guyuchao/AnyFlow2-LoRA-Collections --local-dir experiments/pretrained_models/AnyFlow2-LoRA-Collections

To download just one adapter and its config, select its folder:

hf download guyuchao/AnyFlow2-LoRA-Collections --include "Wan2.1-T2V-14B/*" --local-dir experiments/pretrained_models/AnyFlow2-LoRA-Collections

Download the base model for the task you want to run. FLUX.3 needs both its base model and prompt upsampler:

# FLUX.1
hf download black-forest-labs/FLUX.1-dev --local-dir experiments/pretrained_models/FLUX.1-dev

# FLUX.3
hf download black-forest-labs/flux-3-image-klein-base --local-dir experiments/pretrained_models/flux-3-image-klein-base
hf download black-forest-labs/flux-3-image-klein-pup --local-dir experiments/pretrained_models/flux-3-image-klein-pup

# Wan2.1
hf download Wan-AI/Wan2.1-T2V-14B-Diffusers --local-dir experiments/pretrained_models/Wan2.1-T2V-14B-Diffusers

# H3: shared base model for T2VA and Ref2VA
hf download MiniMaxAI/MiniMax-H3 --local-dir experiments/pretrained_models/MiniMax-H3

For gated repositories, sign in with hf auth login and obtain access from the corresponding model page.

3. Generate One Example

Each demo uses an example from the code repository's assets/validation/ directory and seed 1:

python demo.py task=flux1_t2i
python demo.py task=flux3_t2i
python demo.py task=wan_t2v
python demo.py task=h3_t2va
python demo.py task=h3_ref2va

The examples include a Hanfu tea illustration for FLUX, a Jeep scene for Wan and H3 T2VA, and two reference images for H3 Ref2VA. Outputs are saved under results/demo/. Set save_dir=/path/to/outputs to change the destination.

4. Run the Full Sample Set

Each inference.yml matches its corresponding config under options/test/ in the code repository. Run it from the code repository root:

torchrun --standalone --nproc_per_node=4 -m far.main config_path=experiments/pretrained_models/AnyFlow2-LoRA-Collections/FLUX.1-Dev/inference.yml
torchrun --standalone --nproc_per_node=4 -m far.main config_path=experiments/pretrained_models/AnyFlow2-LoRA-Collections/FLUX.3-Klevin-Base/inference.yml
torchrun --standalone --nproc_per_node=4 -m far.main config_path=experiments/pretrained_models/AnyFlow2-LoRA-Collections/Wan2.1-T2V-14B/inference.yml
torchrun --standalone --nproc_per_node=4 -m far.main config_path=experiments/pretrained_models/AnyFlow2-LoRA-Collections/H3-T2VA-33B/inference.yml
torchrun --standalone --nproc_per_node=4 -m far.main config_path=experiments/pretrained_models/AnyFlow2-LoRA-Collections/H3-Ref2VA-33B/inference.yml

Set --nproc_per_node to the number of GPUs available for inference; model weights are sharded across those GPUs. The configs process the complete sample set from assets/validation/ with seeds 0 and 1. Ref2VA loads each sample's metadata and reference media from the same assets directory. Keep these assets when running the configs.

Generated samples and test logs are written under results/<name>/, where name comes from the YAML. Change models.transformer_cfg.model_name for a different local base-model location or models.transformer_cfg.pretrained_path for a different local adapter location. The configs load the adapter's ema weights with pretrained_type: lora.

License

The LoRA adapter weights in this collection are released under the Apache License 2.0.

The base models are distributed separately under their respective licenses. Refer to the base-model cards linked above for their terms.

Citation

If you use AnyFlow 2.0 in your research, please cite:

@article{gu2026anyflow2,
  title={AnyFlow 2.0: Large-Scale Video Diffusion Distillation with Distributional Trajectory Regression},
  author={Gu, Yuchao and Fang, Guian and Song, Yiren and Wu, Junyi and Chen, Lan and Xin, Jingyu and Jiang, Yuxin and Zhan, Guanqi and Lu, Liming and Chen, Junyu and Ge, Wenhang and Mao, Qi and Ye, Yixuan and Lu, Dongyue and Huang, Junchao and Shou, Mike Zheng and Han, Song and Cai, Han},
  journal={arXiv preprint arXiv:2612.05524},
  year={2026}
}

Acknowledgements

We thank the authors of Diffusers, PEFT, FLUX, Wan, and MiniMax H3 for their models and tools.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for guyuchao/AnyFlow2-LoRA-Collections

Adapter
(234)
this model

Space using guyuchao/AnyFlow2-LoRA-Collections 1

Paper for guyuchao/AnyFlow2-LoRA-Collections