From fd26624f3bce2503dd81861b5255957a8e8fc5cf Mon Sep 17 00:00:00 2001 From: apolinario Date: Mon, 17 Oct 2022 17:16:50 +0200 Subject: [PATCH] Add generic inference example to community pipeline readme (#874) Update README.md --- examples/community/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/community/README.md b/examples/community/README.md index 7c14023455..9edbad7d8b 100644 --- a/examples/community/README.md +++ b/examples/community/README.md @@ -13,6 +13,11 @@ If a community doesn't work as expected, please open an issue and ping the autho | Stable Diffusion Interpolation | Interpolate the latent space of Stable Diffusion between different prompts/seeds | [Stable Diffusion Interpolation](#stable-diffusion-interpolation) | - | [Nate Raw](https://github.com/nateraw/) | | Stable Diffusion Mega | **One** Stable Diffusion Pipeline with all functionalities of [Text2Image](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py), [Image2Image](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py) and [Inpainting](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py) | [Stable Diffusion Mega](#stable-diffusion-mega) | - | [Patrick von Platen](https://github.com/patrickvonplaten/) | +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. +```py +pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", custom_pipeline="filename_in_the_community_folder") +``` + ## Example usages ### CLIP Guided Stable Diffusion