Repository: huggingface/diffusers

Issue:
Docstring is missing for the strength parameter in `Controlnet` pipeline
The  `strength` parameter is currently not described in the   docstring of the  `__call__` method of the Controlnet Img2Img / inpainting pipeline and hence also not included in the docs. 

https://github.com/huggingface/diffusers/blob/f4d3f913f40713cb41485a7f8aab3a31b59e86e6/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L885

Would suggest to copy the docs from the stable diffusion pipeline to avoid any confusion about the actual number of denoising steps taken and the input to the model.

This is a very small fix, I would be willing to open a PR for this. 


Discussion:
please do! 
@yiyixuxu 

Upon closer inspection, I noticed an implementation difference between the `Inpainting` pipelines and `Img2Img` pipelines, both for `stable diffusion` and for `stable_diffusion_controlnet`. So I wanted to make  sure that the docs of the `stable_difusion_img2img` pipeline are suitable before creating the PR.

The `stable_diffusion_img2img',  docstring states: 
```
            strength (`float`, *optional*, defaults to 0.8):
                Indicates extent to transform the reference `image`. Must be between 0 and 1. `image` is used as a
                starting point and more noise is added the higher the `strength`. The number of denoising steps depends
                on the amount of noise initially added. When `strength` is 1, added noise is maximum and the denoising
                process runs for the full number of iterations specified in `num_inference_steps`. A value of 1
                essentially ignores `image`.
``` 

I wanted to especially check on  the part about `a value of 1 esssentially ignores image`. In the `inpainting` pipelines, the image is replaced with noise when `strenght=1` (cf [here](https://github.com/huggingface/diffusers/blob/371f7659086ecedcc3331b62bf11b671c1502927/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L823)) . However, this is not the case for the `img2img` pipeline, where the scheduler is used to add noise to the latents/image, even in the case where `strenght=1`. Do you want the exact some docs for both?  If so, I'll go ahead and create the PR.






Resolving patch:
diff --git a/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py b/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
--- a/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
+++ b/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
@@ -972,6 +972,12 @@ def __call__(
                 The height in pixels of the generated image.
             width (`int`, *optional*, defaults to `self.unet.config.sample_size * self.vae_scale_factor`):
                 The width in pixels of the generated image.
+            strength (`float`, *optional*, defaults to 0.8):
+                Indicates extent to transform the reference `image`. Must be between 0 and 1. `image` is used as a
+                starting point and more noise is added the higher the `strength`. The number of denoising steps depends
+                on the amount of noise initially added. When `strength` is 1, added noise is maximum and the denoising
+                process runs for the full number of iterations specified in `num_inference_steps`. A value of 1
+                essentially ignores `image`.
             num_inference_steps (`int`, *optional*, defaults to 50):
                 The number of denoising steps. More denoising steps usually lead to a higher quality image at the
                 expense of slower inference.
diff --git a/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py b/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
--- a/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
+++ b/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
@@ -1156,15 +1156,15 @@ def __call__(
                 The width in pixels of the generated image. Anything below 512 pixels won't work well for
                 [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)
                 and checkpoints that are not specifically fine-tuned on low resolutions.
+            strength (`float`, *optional*, defaults to 0.8):
+                Indicates extent to transform the reference `image`. Must be between 0 and 1. `image` is used as a
+                starting point and more noise is added the higher the `strength`. The number of denoising steps depends
+                on the amount of noise initially added. When `strength` is 1, added noise is maximum and the denoising
+                process runs for the full number of iterations specified in `num_inference_steps`. A value of 1
+                essentially ignores `image`.
             num_inference_steps (`int`, *optional*, defaults to 50):
                 The number of denoising steps. More denoising steps usually lead to a higher quality image at the
                 expense of slower inference.
-            strength (`float`, *optional*, defaults to 0.3):
-                Conceptually, indicates how much to transform the reference `image`. Must be between 0 and 1. `image`
-                will be used as a starting point, adding more noise to it the larger the `strength`. The number of
-                denoising steps depends on the amount of noise initially added. When `strength` is 1, added noise will
-                be maximum and the denoising process will run for the full number of iterations specified in
-                `num_inference_steps`.
             guidance_scale (`float`, *optional*, defaults to 7.5):
                 Guidance scale as defined in [Classifier-Free Diffusion Guidance](https://arxiv.org/abs/2207.12598).
                 `guidance_scale` is defined as `w` of equation 2. of [Imagen


Test patch: