---
# System prepended metadata

title: 'SD-23 Lobby with IP-Adapter, Inpaint'
tags: [mlsd, ControlNet, Soft inpainting, inpaint, IP-Adapter, depth]

---

**SD-23 Lobby with IP-Adapter, Inpaint**
![SD-23 Lobby with IP-Adapter, Inpaint](https://hackmd.io/_uploads/Bk9AUNmWR.png)

V1.8版後在文生圖中 直接按此標籤 就有直接放大2倍的功能 解析度及小細節直接加大
![image](https://hackmd.io/_uploads/r1PeT3dgC.png)


**IP-Adapter官網**
https://huggingface.co/h94/IP-Adapter
ControlNet中的IP-Adapter是一個微調的模型 作法類似用一張參考圖來影響AI運算 
![image](https://hackmd.io/_uploads/BkKaC3uxA.png)

![image](https://hackmd.io/_uploads/By_RC2_l0.png)
IP-adapter有分SD 1.5 的 IP 轉接器 SDXL 1.0 的 IP 轉接器 都各有的4個模型 有點區別
如果設備可以 就都下載 若不行就擇一 下載後模型放在: 
D:\SD-files\SDlocal\stable-diffusion-webui\extensions\sd-webui-controlnet\models

**ip-adapter-plus_sd15.bin 模型下載網址**
https://huggingface.co/h94/IP-Adapter/blob/main/models/ip-adapter-plus_sd15.bin

**Model:twingShadow_v20 下載網址**
https://civitai.com/models/105935/twing-shadow

範例-Lobby空間
**底圖1**(1024x360)
![J03s](https://hackmd.io/_uploads/ryTBQingA.jpg)

Prompt:line art drawing masterpiece,best quality,modern interior,lobby,indoor,lobby counter,architecture photo,[white|black] color,(Cinematic Lighting:0.5),. professional,sleek,modern,minimalist,graphic,line art,vector graphics,

**在文生圖中 使用一個 ControlNet**
Depth Control Weight:0.9 
ControlNet is more important
![螢幕擷取畫面 2024-04-17 092549](https://hackmd.io/_uploads/SkMEri3g0.png)

運算生成
![00008-833523050](https://hackmd.io/_uploads/H1avrj3gA.jpg)

![00011-2640339641](https://hackmd.io/_uploads/S14zDo3e0.jpg)

![00013-2640339643](https://hackmd.io/_uploads/rJ7QPs3xC.jpg)

![00021-861593329](https://hackmd.io/_uploads/Hy9A9ihxR.jpg)

![00023-2629763888](https://hackmd.io/_uploads/H1pxjongC.jpg)

![00029-3310307713](https://hackmd.io/_uploads/rJsNnj3e0.jpg)

![00033-4093905181](https://hackmd.io/_uploads/HJVmRo3xC.jpg)

![00043-4212709111](https://hackmd.io/_uploads/B1Cw12hx0.jpg)

![00049-49545748](https://hackmd.io/_uploads/BJRa122xR.jpg)

**底圖2**(1024x576)
![J02ss](https://hackmd.io/_uploads/Sk_lG3ng0.jpg)
Prompt:masterpiece,best quality,Ultra High Resolution,(Realisticity:1.4),Original Photo,Chanel style,modern interior,Softbox Lighting,indoor,lobby counter,architecture photo,[wooden|golden] color,<lora:Modern simple and bright office lobby morden:0.7>,office lobby,


**在文生圖中 使用二個 ControlNet**
Model: mdjrny-v4
第一個使用Depth Control Weight:0.9 
第二個使用IP-adapter 通常控制權重0.1~0.3即可 start and end 的參數也可以改變效果 

Prompt:HDR photo of masterpiece,best quality,Ultra High Resolution,(Realisticity:1.4),Original Photo,Minimalist style,modern interior,Softbox Lighting,indoor,lobby counter,architecture photo,[wooden|black] color,<lora:Modern simple and bright office lobby morden:0.8>,office lobby, . High dynamic range, vivid, rich details, clear shadows and highlights, realistic, intense, enhanced contrast, highly detailed

方法一:二個 ControlNet的底圖一樣 只是Type選擇不同
![螢幕擷取畫面 2024-04-17 105714](https://hackmd.io/_uploads/ryn95n2gA.png)
方法二:二個 ControlNet的底圖不同 
![螢幕擷取畫面 2024-04-17 105452](https://hackmd.io/_uploads/rycG92nxA.png)
方法三:二個 ControlNet 一個是底圖用canny控制空間線型 另一個用IP-Adapter 但底圖換成任意的圖片(如蒙德里安 或梵谷的星空畫作 當然也可以是空間圖片)
![螢幕擷取畫面 2024-04-21 203608](https://hackmd.io/_uploads/HJPw_YzZA.png)

![螢幕擷取畫面 2024-04-21 204013](https://hackmd.io/_uploads/Hy_BKFzWC.png)

![螢幕擷取畫面 2024-04-21 210934](https://hackmd.io/_uploads/SJ5Vl5Gb0.png)

![lobby1](https://hackmd.io/_uploads/Syhme9M-R.jpg)

**運算生成**
![00066-311107342](https://hackmd.io/_uploads/SyPCM2hgC.jpg)

![00106-3324641085](https://hackmd.io/_uploads/S1f2t22e0.jpg)

![00017-3466620348](https://hackmd.io/_uploads/Bk1KdYf-C.jpg)

![00018-446670800](https://hackmd.io/_uploads/ByDR_tfWC.jpg)

![00020-416002981](https://hackmd.io/_uploads/SJ6fttG-R.jpg)

![00040-1041774361](https://hackmd.io/_uploads/By-ixczZC.jpg)

**局部重繪 Inpaint**
除了可使用Model: realisticVisionV60B1_v60B1InpaintingVAE在圖生圖中將圖放至Inpaint中 將要重繪的區域塗滿
![螢幕擷取畫面 2024-04-21 215231](https://hackmd.io/_uploads/HJ90j9zZR.png)
勾選Soft inpainting
![螢幕擷取畫面 2024-04-21 215757](https://hackmd.io/_uploads/rkbk2qG-R.png)
正向提示詞只要針對要替換的元素 也可加Lora增強效果
Prompt:dark black marble floor,<lora:Modern simple and bright office lobby morden:1>,office lobby,

![00058-1473599517](https://hackmd.io/_uploads/B1fn3cf-0.jpg)

![00069-2772286812](https://hackmd.io/_uploads/ByagAqfW0.jpg)
在牆上先塗一個區域(想掛一幅畫作)
Prompt:master paintings,
![00096-1404382128](https://hackmd.io/_uploads/HyKV-ifZ0.jpg)

![00090-2688437278](https://hackmd.io/_uploads/S10qlifZR.jpg)

![00100-462642595](https://hackmd.io/_uploads/HJSiZozZA.jpg)
針對天花板做局部重繪
Prompt:modern ceiling design,
![00018-3552652378](https://hackmd.io/_uploads/rkDfb_m-C.jpg)



**在圖生圖中 使用一個 ControlNet**
先將底圖3放入
![image (15)](https://hackmd.io/_uploads/HyK6z4m-A.png)
記得尺寸要上傳(按三角板符號)
![螢幕擷取畫面 2024-04-22 084010](https://hackmd.io/_uploads/BJS-MVX-0.png)
控制Denoising strength重繪幅度的參數
![螢幕擷取畫面 2024-04-22 084135](https://hackmd.io/_uploads/HkiDfEm-C.png)
使用一個ControlNet 
![螢幕擷取畫面 2024-04-22 084159](https://hackmd.io/_uploads/rJwtfE7-0.png)

![00002-1133595327](https://hackmd.io/_uploads/B1DXXVQZC.jpg)

![00004-709215378](https://hackmd.io/_uploads/HJncmN7WC.jpg)

![00005-2936313016](https://hackmd.io/_uploads/ByMaXVmZ0.jpg)

**勾選Refiner** 
選取另一個Checkpoint model 利用Switch at 的參數控制切換的時間 以進行融合

![00009-3536647933](https://hackmd.io/_uploads/HyrYEVQbC.jpg)

![00010-1458038112](https://hackmd.io/_uploads/HyyQB4QW0.jpg)

![00011-2961968650](https://hackmd.io/_uploads/r1eQYrEmWC.jpg)
