Skip to content

xie-lab-ml/flow-inference-enhancement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inference Enhancement for Flow-based Diffusion Models

opening

In this repo, we propose a novel training-free inference enhancement method for flow-based diffusion model, like FLUX and SD3.5. The brief paradigm of our method is illustrated below:

method

The performance of our method is shown below:

scatter_plot

Besides, our method can easily integrate with Lora:

lora

More experiments and more details, please wait for the coming report!

How to use 😄

You just need to install the latest version of diffusers !!!

Usage👀️

To use our method, you just need to take care of several parameters:

  • --inv_steps: Should be consistent with the inference step.
  • --merge-ratio: Default is 0.5.
  • --offset: FLUX Lite is 2, Dev is 1, and SD3.5 is 1.
  • [--cfg-left, --cfg-right]: FLUX Lite and SD3.5 should be [9, -1], and FLUX Dev should be [3.5, 0].

Output🎉️

The script will save three images:

  • A standard image generated by the diffusion model.
  • A optim image generated by the diffusion model with our method.
  • A image consists of standard one and optimal one.

All images will be saved in the current directory with names based on the model and prompt.

Citation:

If you find our code useful for your research, please cite our paper.

@misc{zhou2025freelunchflux,
      title={Free Lunch for Flow-based Diffusion Models}, 
      author={Zikai Zhou and Shitong Shao and Dian Xie and Lichen Bai and Zeke Xie},
      year={2025},
      url={https://github.com/xie-lab-ml/FreeLunchInference#}, 
}

About

We propose a novel training-free inference enhancement method for flow-based diffusion models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages