---
# System prepended metadata

title: SD-03 modles & ControlNet models
tags: [vae, Checkpoint, ControlNet, embedding, lora]

---

**SD-03 modles & ControlNet models**
![SD-model](https://hackmd.io/_uploads/SJwjBRmwa.png)


**Checkpoint&lora model 下載網址及放置位置(可在資料夾中分類放置不同的model)**
Stable Diffusion WebUI在初次啟動時，若放模型的資料夾(models/Stable-diffusion)為空，則會自動下載原始版的Stable Diffusion v1.5模型。

建議在D槽下建立資料夾(SDlocal):
![file-1](https://hackmd.io/_uploads/Sy-HmAmPp.png)
![file-2](https://hackmd.io/_uploads/HJbH7CXwT.png)

目前找Stable Diffusion與其衍生模型的網站主要就有二個。
第一個是 HuggingFace，中文俗稱抱臉笑，可以說是人工智慧界的Github。Stable Diffusion背後用到的很多AI工具，如Transformer、Tokenizers、Datasets都他們開發的，網站上也有豐富的教學文檔。

另一個是 Civitai，專門用來分享Stable Diffusion相關的資源，特色是模型都有示範縮圖，用戶也可以分享彼此使用的提示詞，以及分享作品。
civitai https://civitai.com/ (civitai模型下載網站)
https://civitai.com/?tag=buildings  (building模型)

safetensors 文件是什麼？
safetensors 文件是模型文件，是 Hugging Face 公司推出的一種用于保存模型的新文件格式，它旨在解决模型加载和使用中的安全問題。

**如何下載模型**
HuggingFace為儲存庫 → Files and versions，選擇下載副檔名為.ckpt或.safetensors的模型。後者因不具備執行程式碼的能力因此較前者安全。至於-pruned代表模型有刪減過大小。

**建議下載的checkpoint大模型下載網址**
https://civitai.com/models/85691/ (InteriorDesignSuperMix)
https://civitai.com/models/84958/ (architecturerealmix v1.1)
https://civitai.com/models/135770/   (architecture_Exterior)
https://civitai.com/models/29594 (landscape-rendering)
https://civitai.com/models/86963/ (landscapesupermix)
https://civitai.com/models/131935 (realistic_v10BAKEDVAE)
https://civitai.com/models/4201/realistic-vision-v60-b1 (realistic)
https://civitai.com/models/86/openjourney?modelVersionId=27392 (mdjrny-v4)
https://civitai.com/models/4384?modelVersionId=128713 (DreamShaper-8)
https://civitai.com/models/105935/twing-shadow (TWing shadow光影摄影)

**XL model **
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/main (SDXL model)
https://huggingface.co/ckpt/sd_xl_refiner_1.0/tree/main (SDXL refiner)
https://huggingface.co/wangqyqq/sd_xl_base_1.0_inpainting_0.1.safetensors/tree/main (sd_xl_base_1.0_inpainting_0.1)
https://huggingface.co/stabilityai/sdxl-turbo/tree/main (SDXL Turbo)
https://civitai.com/models/215418
(TurboVisionXL - Super Fast XL based on new SDXL Turbo)

checkpoint model資料夾位置D:\SD-files\SDlocal\stable-diffusion-webui\models\Stable-diffusion

**Lora(風格)模型下載網址**
https://civitai.com/models/100287/xsarchi127neo-sci-fi  (新科幻)
https://civitai.com/models/79072/gdm-style-textual-inversion-luxury-modern-interior-design  (Interior)
https://civitai.com/models/117761/tiny-home-concept (tinyhouse)
https://civitai.com/models/106598/y5realistic-style-room (realistic style room)
https://civitai.com/models/109532/brutalism-style-interior-design  (Brutalism)
https://civitai.com/models/115932/housearchitectureexteriorsdlifechiasedamme (house)
https://civitai.com/models/87893/public-building-aerial-view  (aerial view)
https://civitai.com/models/96386/aargmasterplan-render(AARG_Masterplan) 
https://civitai.com/models/108203/minustyperealisticurbanmix (RealisticUrbanMix)
https://civitai.com/models/236220/stacked-volumesv10(high rise)
https://civitai.com/models/24066/minustypeurbanscene (Minustype_UrbanScene)
https://civitai.com/models/229533?modelVersionId=259052 (Office Building facade)
(https://civitai.com/models/185454?modelVersionId=350179 (Office interior)
https://civitai.com/models/117212/modern-simple-and-bright-office-lobby-morden (Office lobby)
https://civitai.com/models/68286?modelVersionId=72978 (CWG_archi_sketch_v1)
https://civitai.com/models/66421/cwgarchisketchv2 (CWG_archi_sketch_v2)
https://civitai.com/models/195519/lcm-lora-weights-stable-diffusion-acceleration-module (lcm Rola)
https://civitai.com/models/98129 (总平面LORA-master plan)
https://civitai.com/models/86963?modelVersionId=116095(LandscapeSuperMix v2.1)
https://civitai.com/models/121622 (荒野景观调/landscape/Architecture)
https://civitai.com/models/52997 (XSArchi_110ColorPlane彩总)
https://civitai.com/models/485146/building-cut (building cut)
https://civitai.com/models/84240 (ESarch_handmodel_v3)

https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/tree/main (LCM v1.5模型)
https://huggingface.co/latent-consistency/lcm-lora-sdxl/tree/main (LCM sdxl模型)
下載後 sdv1-5先更名為lcm_sd15 & sdxl的則更名為lcm_sdxl
因為sdv1-5 與sdxl的lcm lora 名字都一樣 所以記得先更名 以區別

Lora model資料夾位置D:\SD-files\SDlocal\stable-diffusion-webui\models\Lora

**embedding model (詞彙 數據 降維 升維)**
https://civitai.com/models/36070/negative-embedding-for-realistic-vision-v20 
https://civitai.com/models/7808?modelVersionId=9208 
https://civitai.com/models/4629/deep-negative-v1x 
https://civitai.com/models/30224/negative-embedding-for-deliberate
embedding model資料夾位置D:\SD-files\SDlocal\stable-diffusion-webui\embeddings

**vae model** 
https://civitai.com/models/115217/vae-ft-ema-560000-ema 
https://civitai.com/models/276082/vae-ft-mse-840000-ema-pruned-or-840000-or-840k-sd15-vae
https://civitai.com/models/155663/vae-final-prune-vae
https://huggingface.co/stabilityai/sdxl-vae/blob/main/sdxl_vae.safetensors
vae model資料夾位置D:\SD-files\SDlocal\stable-diffusion-webui\models\VAE

**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
![image](https://hackmd.io/_uploads/r1slahICA.png)

XL model下載網址
XL ControlNet Union載點: 
下載後請更名為:controlnet++_union_promax_sdxl.safetensors
https://huggingface.co/xinsir/controlnet-union-sdxl-1.0/tree/main

**更多的controlnet model 可以選擇**
lllyasviel/sd_control_collection 
https://huggingface.co/lllyasviel/sd_control_collection/tree/main

IP-Adapter 及模型下載
https://huggingface.co/h94/IP-Adapter 
https://huggingface.co/h94/IP-Adapter/blob/main/models/ip-adapter-plus_sd15.bin 
![螢幕擷取畫面 2024-03-18 094427](https://hackmd.io/_uploads/Hk1ZpGHAp.png)

InstantID model 換臉 
https://github.com/Mikubill/sd-webui-controlnet/discussions/2589 
分別是ip-adapter_instant_id_sdxl.bin和control_instant_id_sdxl.safetensors。

ControlNet model資料夾位置D:\SD-files\SDlocal\stable-diffusion-webui\extensions\sd-webui-controlnet\models

放大演算法model:4x-UltraSharp.pth
https://huggingface.co/lokCX/4x-Ultrasharp/tree/main
下載後放至以下目錄D:\SDlocal\stable-diffusion-webui\models\ESRGAN

InstantID面部識別模型:共計5個 https://huggingface.co/Aitrepreneur/models/tree/main/antelopev2 
下載後放至以下目錄D:\SDlocal\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads\insightface\models\antelopev2

**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 

