From e3a2c7f02cd9e47a9093efe3e9659c8e99e28aac Mon Sep 17 00:00:00 2001 From: Sayak Paul Date: Tue, 28 Feb 2023 19:51:35 +0530 Subject: [PATCH] [Docs] Include more information in the "controlling generation" doc (#2434) * edit controlling generation doc. * add: demo link to pix2pix zero docs. * refactor oanorama a bit. * Apply suggestions from code review Co-authored-by: Pedro Cuenca * pix: typo. --------- Co-authored-by: Pedro Cuenca --- .../stable_diffusion/pix2pix_zero.mdx | 6 +- .../controlling_generation.mdx | 106 ++++++++++-------- 2 files changed, 64 insertions(+), 48 deletions(-) diff --git a/docs/source/en/api/pipelines/stable_diffusion/pix2pix_zero.mdx b/docs/source/en/api/pipelines/stable_diffusion/pix2pix_zero.mdx index 9f4f58af..f04a54f2 100644 --- a/docs/source/en/api/pipelines/stable_diffusion/pix2pix_zero.mdx +++ b/docs/source/en/api/pipelines/stable_diffusion/pix2pix_zero.mdx @@ -25,6 +25,7 @@ Resources: * [Project Page](https://pix2pixzero.github.io/). * [Paper](https://arxiv.org/abs/2302.03027). * [Original Code](https://github.com/pix2pixzero/pix2pix-zero). +* [Demo](https://huggingface.co/spaces/pix2pix-zero-library/pix2pix-zero-demo). ## Tips @@ -41,12 +42,13 @@ the above example, a valid input prompt would be: "a high resolution painting of * Change the input prompt to include "dog". * To learn more about how the source and target embeddings are generated, refer to the [original paper](https://arxiv.org/abs/2302.03027). Below, we also provide some directions on how to generate the embeddings. +* Note that the quality of the outputs generated with this pipeline is dependent on how good the `source_embeds` and `target_embeds` are. Please, refer to [this discussion](#generating-source-and-target-embeddings) for some suggestions on the topic. ## Available Pipelines: | Pipeline | Tasks | Demo |---|---|:---:| -| [StableDiffusionPix2PixZeroPipeline](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_pix2pix_zero.py) | *Text-Based Image Editing* | [🤗 Space] (soon) | +| [StableDiffusionPix2PixZeroPipeline](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_pix2pix_zero.py) | *Text-Based Image Editing* | [🤗 Space](https://huggingface.co/spaces/pix2pix-zero-library/pix2pix-zero-demo) | @@ -74,7 +76,7 @@ pipeline = StableDiffusionPix2PixZeroPipeline.from_pretrained( pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config) pipeline.to("cuda") -prompt = "a high resolution painting of a cat in the style of van gough" +prompt = "a high resolution painting of a cat in the style of van gogh" src_embs_url = "https://github.com/pix2pixzero/pix2pix-zero/raw/main/assets/embeddings_sd_1.4/cat.pt" target_embs_url = "https://github.com/pix2pixzero/pix2pix-zero/raw/main/assets/embeddings_sd_1.4/dog.pt" diff --git a/docs/source/en/using-diffusers/controlling_generation.mdx b/docs/source/en/using-diffusers/controlling_generation.mdx index 173f51c7..bce101a7 100644 --- a/docs/source/en/using-diffusers/controlling_generation.mdx +++ b/docs/source/en/using-diffusers/controlling_generation.mdx @@ -1,4 +1,4 @@ -