![潛在一致性模型 (LCM)](https://hackmd.io/_uploads/BkMwpfItp.png) **潛在一致性模型 (LCM)** (北京清华大学交叉信息科学研究院研发的一款生成模型) https://www.jiqizhixin.com/articles/2023-11-15-10 中文介紹LCM lora https://huggingface.co/blog/lcm_lora 網站介紹 ![image](https://hackmd.io/_uploads/rypQbfTD6.png) https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/tree/main v1-5模型網址 https://huggingface.co/latent-consistency/lcm-lora-sdxl/tree/main sdxl模型網址 ![image](https://hackmd.io/_uploads/HkwS-f6vp.png) 下載後 先更名為lcm_sd15 (若下載sdxl的則更名為lcm_sdxl) 因為sdv1-5 與sdxl的lcm lora 名字都一樣 所以記得先更名 以區別 然後將檔案放置到 D:\SD-files\SDlocal\stable-diffusion-webui\models\Lora中即可 使用LCM rola進行運算,在參數的設定上有三個設定需要特別注意 ![image](https://hackmd.io/_uploads/Bk0DwF1zC.png) 因為取樣方法的選擇會跟以往習慣用的有些不同,所以可以先用Script中的xyz plot 來找出適合的sampler & CFG & Step ![螢幕擷取畫面 2024-05-01 170239](https://hackmd.io/_uploads/Hy5LBFJfR.png) ![螢幕擷取畫面 2024-05-01 170511](https://hackmd.io/_uploads/rJUJ8FyM0.png) ![螢幕擷取畫面 2024-05-01 171504](https://hackmd.io/_uploads/r1x4dK1zR.png) ![螢幕擷取畫面 2024-05-01 171404](https://hackmd.io/_uploads/B1gb_KkGR.png) **使用LCM lora** 使用比電測試(6GB N卡1660) 可以嘗試SDXL model(尺寸1024 or 768) 運算生成 Model: sd_xl_base_1.0 或 sd_xl_turbo_1.0_fp16 加上lora:lcm_sdxl **湖邊小屋** Model: sd_xl_turbo_1.0_fp16 Prompt:tiny house next to the river,outdoor,nature, Negative Prompt:ugly,low quality,blurry, ![image](https://hackmd.io/_uploads/HJYm8rsbC.png) Time taken:20.7 sec. ![00016-1228753320](https://hackmd.io/_uploads/ByriSYj-R.jpg) ![00017-142581745](https://hackmd.io/_uploads/SyHMLKib0.jpg) Step:3 Time taken:16.1 sec. ![00020-395667520](https://hackmd.io/_uploads/H1kfvYiZR.jpg) **室內空間** Prompt:modern interior,living room,[wooden|white], 加上lora:lcm_sdxl ![螢幕擷取畫面 2024-04-28 145443](https://hackmd.io/_uploads/Hy08ZFj-A.png) ![螢幕擷取畫面 2024-04-28 145515](https://hackmd.io/_uploads/Byh_-Kjb0.png) ![螢幕擷取畫面 2024-04-28 145542](https://hackmd.io/_uploads/HJynWFib0.png) ![00010-4035304365](https://hackmd.io/_uploads/r1INZFiZR.png) ![00011-1819076004](https://hackmd.io/_uploads/rkXpbtjb0.png)