Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepInv

This is official implementation of our paper "DeepInv: A Novel Self-supervised Learning Approach for Fast and Accurate Diffusion Inversion".

Model link

Download DeepInv Solver and Datase we used here. They are too big for github thus we upload it on HuggingFace.

Simple use case

  1. load model by "model = torch.load(model_path)"
  2. predict inversion noise for one timestep "noise_pred,_ = model( hidden_states=DDIM_INV_noise, timestep=timestep, encoder_hidden_states=prompt_embeds, pooled_projections=pooled_prompt_embeds, en_hds_img=latent_zt, pool_hds_img=latent_z0, if_traning = if_train, num_itr = 1 )" Here, latent_z0 is the original input image edcoded by model's VAE, while latent_zt is the latent of current timestep.

Use Our Codes

  1. Replace scheduling_flow_match_euler_discrete.py to .../site-packages/diffusers/schedulers/
  2. Run "python3 main_tst_real.py"
  3. We train our solver by chosen and pre-processed images from MS-COCO 2017 dataset, you could use your own dataset, or you could creat the same dataset as we did following the instruction from our previous project EasyInv.

Citation

If you feel this project to be useful, please cite this paper and star it! The bibtex citation of our paper us as following.

@article{zhang2026deepinv,
  title={DeepInv: A Novel Self-supervised Learning Approach for Fast and Accurate Diffusion Inversion},
  author={Zhang, Ziyue and Lin, Luxi and Hu, Xiaolin and Chang, Chao and Wang, HuaiXi and Zhou, Yiyi and Ji, Rongrong},
  journal={arXiv preprint arXiv:2601.01487},
  year={2026}
}

About

This is official implementation of our paper "DeepInv: A Novel Self-supervised Learning Approach for Fast and Accurate Diffusion Inversion"

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages