**SD-05 實景照片的AI運算-捷運出風口照片-使用ControlNet**

**以照片為底圖 用文生圖的方式 加上ControlNet的控制 進行設計AI運算 發揮設計想法**
**甚麼是ControlNet**
使用ControlNet:把底圖放入ControlNet,選擇合適的預處理器(preprocessor)和模型(model)。在進行運算之前,調整控制權重參數,以提高生成的結果準確性。
**ControlNet網站介紹**
ControlNet v1.1:官方網址
https://github.com/lllyasviel/ControlNet-v1-1-nightly
https://github.com/Mikubill/sd-webui-controlnet?search=1
ControlNet model v1.5下載網址
https://huggingface.co/lllyasviel/ControlNet-v1-1/tree/main
紅框是建築常用到的model

**在文生圖或圖生圖中 都可以使用ControlNet**
使用ControlNet的方式 在文生圖中開啟ControlNet 選擇不同Control Type來測試各種效果
**建築最常用到的model有:canny,lineart,mlsd,scribble,depth**
**ControlNet的教學文章及影片**
ControlNet v1.1:完整指南 - 穩定的擴散藝術 (stable-diffusion-art.com)
https://stable-diffusion-art.com/controlnet/
ControlNet 是一種穩定擴散模型,可讓您從參考圖像中複製構圖或人體姿勢。
經驗豐富的穩定擴散使用者知道生成您想要的確切成分有多難。圖像有點隨機。您所能做的就是玩數位遊戲:生成大量圖像並選擇您喜歡的圖片。
借助 ControlNet,穩定擴散用戶終於有了一種精確控制拍攝物件位置和外觀的方法!
**EVERYTHING YOU NEED TO KNOW to get started with CONTROLNET**
https://www.youtube.com/watch?v=YgWv4zLZ1rk
**實景照片底圖一**
提示詞可以自由發揮 也可利用AI工具生成

parameter:master piece, best quality, De Stijl Cubism, metro entrance next to Boulevard, triangle and cube, modern architecture, Red and Blue, Piet Mondrian, high definition, highly detailed, technicolor, architecture photography,view from the street,
Negative prompt: EasyNegative,ng_deepnegative_v1_75t,ugly,normal
parameter:A realistic 3D render of a modernist architectural building, metro entrance next to Boulevard, detailed facade, contrate and wooden,landscape,lots of tree,nature background, the scene is bathed in soft, natural light
**使用I2I圖生圖**


AI生成1 Denoising strength重繪幅度:0.42

AI生成2 Denoising strength重繪幅度:0.5

**使用T2I文生圖+ControlNet**
Model: control_v11p_sd15_mlsd [aca30ff0], Weight: 0.9

AI生成3 Model-mlsd:0.75

AI生成4 Model-canny:0.75


AI生成5 Model-depth_leres++:0.75


AI生成6 Model-Lineart:0.75


AI生成7 Model-Lineart:0.75
畫布尺寸等比放大後(936x680) 細節增加

AI生成8 Model-normal_bae


AI生成9 Model-normal_bae

**使用ControlNet的inpaint**
在tex2img中的ControlNet利用局部重繪(inpaint)框出範圍

AI生成10

AI生成11

嘗試不同提示詞
Prompt:masterpiece,best quality,landscape design,high definition,landscape,highly detailed,technicolor,architecture photography,
AI生成12

AI生成13

AI生成14

AI生成15

**使用二個ControlNet inpaint+Scribble/Sketch**

在提示詞中加入curve及加入Lora model<lora:XSArchi_127:0.4>,

AI生成16

AI生成17

AI生成18

畫布拓展 增加背景

**在圖生圖中 使用局部重繪+ControlNet**
**圖生圖中 增加了soft inpainting 主要用在局部重繪時 交界區域的柔和效果**


Prompt:masterpiece,best quality,modern canopy,metro entrance,curve shape,building,<lora:XSArchi_127:0.6>,
Negative Prompt:16-token-negative-deliberate-neg,realisticvision-negative-embedding,

AI生成19

AI生成20

AI生成21

AI生成22

**WebUI_Forge**
**實景照片底圖一**


Model: architecturerealmix_v11,
VAE:vae-ft-mse-840000-ema-pruned
parameter1:master piece, best quality, De Stijl Cubism, metro entrance next to Boulevard, triangle and cube, modern architecture, Red and Blue, Piet Mondrian, high definition, highly detailed, technicolor, architecture photography,view from the street,
parameter2:A realistic 3D render of a modernist architectural building,metro entrance next to Boulevard,detailed facade,contrate,(wood:0.5),landscape,lots of tree,nature background,the scene is bathed in soft,natural light,
Negative prompt: EasyNegative,ng_deepnegative_v1_75t,ugly,normal,low quality
**使用第一個ControlNet:Canny**

1-1

1-2

**換成ControlNet:Inpaint**

1-3

**使用第一個ControlNet:Inpaint+第二個ControlNet:Scribble**

1-4

**使用第一個ControlNet:Inpaint+第二個ControlNet:IP-Adapter(風格移轉)**
找一張參考圖片


1-5

另找一張參考圖片


1-6

1-7
