ReDiffusion
July 25, 2023 ยท View on GitHub
The code for the ICML 2023 paper ReDi: Efficient Learning-Free Diffusion Inference via Trajectory Retrieval.
Installation
- Install diffusers from source.
git clone https://github.com/huggingface/diffusers.git
cd diffusers
git checkout 25f1142
pip install -e .
- Put the pipeline_re_sd.py in
./src/diffusers/pipelinesand import it in./src/diffusers/__init__.py.
Knowledge Base Creation
-
Follow this (instruction)[https://github.com/facebookresearch/faiss/blob/main/INSTALL.md] to install
faiss-cpu. -
Run
traj.pyto construct the knowledge base.
Image generation
-
retrieve_val10.pygives an example of generating images with ReDi one by one. -
retrieve_redi.pygives an example of generating images with ReDi in batches.