# Multi\_controlnet + inpaint

**URL:** <https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560>\
**Category:** 🧨 Diffusers\
**Created:** [May 22, 2023, 1:43am UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560 "2023-05-22T01:43:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Novruz97](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Novruz97](https://discuss.huggingface.co/u/Novruz97)\
**Post date:** [May 22, 2023, 1:43am UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560/1 "2023-05-22T01:43:29Z")

</div>

Hello dear devs. I am using the `stable_diffusion_controlnet_inpaint.py` (from community examples, main version) to generate a defective product with using initial image, masked image of the defect area, and two controlnet conditioning images. When I generated an image with same parameters as in SD Webui (enable\_controlnetmodel\_1, enable\_controlnetmodel\_2), the generated area of defect was totally different. My question is:

1. Are these assignments (as per examples from website and github)  
`controlnet = [ControlNetModel_1, ControlNetModel_2]`  
`pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(INPT_MODEL, controlnet=controlnet, ...)`  
…  
`pipe(... , controlnet_conditioning_image=[image_for_model1, image_for_model2]).images[0] `  
are correct?

2. I could not find more parameter setting when creating the pipeline such as, mask blur or inpaint area (whole picture or only masked), are these possible to bet set or they have not been implemented?

How could I make the script generated image similar to SD Webui’s? If you have any idea what might be the issue, would really appreciate your help!  
P.S. I have read many implementation’s of controlnet + inpaint pipelines in github, I came here as a last resort.

---

<div class="post-metadata">

**Author:** ![MeherShashwat](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mehershashwat/32/17181_2.png) [@MeherShashwat](https://discuss.huggingface.co/u/MeherShashwat)\
**Post date:** [July 17, 2023, 7:08pm UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560/2 "2023-07-17T19:08:43Z")

</div>

Hello @Novruz97, were you able to train/finetune this custom pipeline for your use-case?

---

<div class="post-metadata">

**Author:** ![Novruz97](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Novruz97](https://discuss.huggingface.co/u/Novruz97)\
**Post date:** [July 20, 2023, 6:27am UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560/3 "2023-07-20T06:27:42Z")

</div>

@MeherShashwat In the new version of diffusers, this problem was solved. They included new pipeline in controlnet, you can have a check!

---

<div class="post-metadata">

**Author:** ![MeherShashwat](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mehershashwat/32/17181_2.png) [@MeherShashwat](https://discuss.huggingface.co/u/MeherShashwat)\
**Post date:** [July 20, 2023, 10:47pm UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560/4 "2023-07-20T22:47:47Z")

</div>

Thanks @Novruz97, I saw the mentioned pipelines. I was asking about a training script that helps you finetune an inpainting stable diffusion model. The training scripts in the example folder of diffusers library doesn’t have any script that does the same (correct me if I am wrong!)  
If you were able to finetune a inpainting stable diffusion model kindly share the script 🙂

---

<div class="post-metadata">

**Author:** ![Novruz97](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Novruz97](https://discuss.huggingface.co/u/Novruz97)\
**Post date:** [July 21, 2023, 7:19am UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560/5 "2023-07-21T07:19:42Z")

</div>

@MeherShashwat Unfortunately, I was given other project. I haven’t implemented that.

---

<div class="post-metadata">

**Author:** ![johnMinelli](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@johnMinelli](https://discuss.huggingface.co/u/johnMinelli)\
**Post date:** [November 12, 2023, 11:06am UTC](https://discuss.huggingface.co/t/multi-controlnet-inpaint/40560/6 "2023-11-12T11:06:56Z")

</div>

Hi, do you have any update/suggestion to share on that? I’m trying to do something alike what you described
