Skip to content

Commit 4e18edf

Browse files
committed
Add docs
1 parent 56ff870 commit 4e18edf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

examples/community/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ prompt-to-prompt | change parts of a prompt and retain image structure (see [pap
5353
| LDM3D-sr (LDM3D upscaler) | Upscale low resolution RGB and depth inputs to high resolution | [StableDiffusionUpscaleLDM3D Pipeline](https://github.com/estelleafl/diffusers/tree/ldm3d_upscaler_community/examples/community#stablediffusionupscaleldm3d-pipeline) | - | [Estelle Aflalo](https://github.com/estelleafl) |
5454
| AnimateDiff ControlNet Pipeline | Combines AnimateDiff with precise motion control using ControlNets | [AnimateDiff ControlNet Pipeline](#animatediff-controlnet-pipeline) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1SKboYeGjEQmQPWoFC0aLYpBlYdHXkvAu?usp=sharing) | [Aryan V S](https://github.com/a-r-r-o-w) and [Edoardo Botta](https://github.com/EdoardoBotta) |
5555
| DemoFusion Pipeline | Implementation of [DemoFusion: Democratising High-Resolution Image Generation With No $$$](https://arxiv.org/abs/2311.16973) | [DemoFusion Pipeline](#DemoFusion) | - | [Ruoyi Du](https://github.com/RuoyiDu) |
56+
| Instaflow Pipeline | Implementation of [InstaFlow! One-Step Stable Diffusion with Rectified Flow](https://arxiv.org/abs/2309.06380) | [Instaflow Pipeline](#Instaflow) | - | [Ayush Mangal](https://github.com/ayushtues) |
5657

5758
To load a custom pipeline you just need to pass the `custom_pipeline` argument to `DiffusionPipeline`, as one of the files in `diffusers/examples/community`. Feel free to send a PR with your own pipelines, we will merge them quickly.
5859
```py
@@ -3054,3 +3055,22 @@ output_image = PIL.Image.fromarray(output)
30543055
output_image.save("./output.png")
30553056

30563057
```
3058+
3059+
### Instaflow Pipeline
3060+
InstaFlow is an ultra-fast, one-step image generator that achieves image quality close to Stable Diffusion, significantly reducing the demand of computational resources. This efficiency is made possible through a recent [Rectified Flow](https://github.com/gnobitab/RectifiedFlow) technique, which trains probability flows with straight trajectories, hence inherently requiring only a single step for fast inference.
3061+
3062+
```python
3063+
from diffusers import DiffusionPipeline
3064+
import torch
3065+
3066+
3067+
pipe = DiffusionPipeline.from_pretrained("XCLIU/instaflow_0_9B_from_sd_1_5", torch_dtype=torch.float32, custom_pipeline="instaflow")
3068+
pipe.do_lora() ### use dreambooth lora for better quality
3069+
pipe.to("cuda") ### if GPU is not available, comment this line
3070+
prompt = "A hyper-realistic photo of a cute cat."
3071+
3072+
images = pipe(prompt=prompt,
3073+
num_inference_steps=1,
3074+
guidance_scale=0.0).images
3075+
images[0].save("./image.png")
3076+
```

0 commit comments

Comments
 (0)