0%
Loading ...

[AI 繪圖初級教學] 用 X/Y/Z Plot 比較 Stable Diffusion 的 prompt 與 LoRA 效果

xyzplot demo 1

前言

Alt

如果想要像做實驗般的同時比較多種 prompt 或是不同 LoRA 對圖的影響時,Prompt S/R 就可以給予你極大的幫助。

實作

我以 Flux 的 LoRA 測試為例
file

  1. 輸入提示詞

    masterpiece, best quality, 1girl, solo,
    purple hair, multicolored hair, short hair, green eyes, air bangs, purple nail polish, (detailed full-body, high-angle shot, looking at viewer),
    hand up, smile, dancing,
    hat, huge witch hat, hat flower, white headwear, bow, bowtie, purple bowtie, purple ribbon,
    long sleeves, white dress, puffy long sleeves, dress, frilled dress, center frills, puffy sleeves,
    jewelry, gem, crystal butterfly earrings, crystal, flower, butterfly,
    glint, frills, sparkle, star (symbol),
    dpys, <lora:dpys-flux_reverie_best-3620steps:1>,
  2. 往下拉看到指令碼 (Scripts),點擊框框並選擇 "X/Y/Z Plot"
    file

P.S. 如果你的界面跟我有點不一樣也不用擔心,我現在使用的是 Forge,這是 Stable Diffusion WebUI 的另一個衍生版本,只要往下拉看到指令碼 (Scripts) 就好。

  1. 在 X 軸類型選擇 提示詞搜索/替換 (Prompt S/R)
    file

Template 長得像這樣,我一口氣把不同 steps 的 LoRA 給丟下去比。

<lora:dpys-flux_reverie_best-3620steps:1>,
<lora:dpys-flux_reverie_best-7240steps:1>,
<lora:dpys-flux_reverie_best-10860steps:1>,
<lora:dpys-flux_reverie_best-14480steps:1>,
<lora:dpys-flux_reverie_best-18100steps:1>,

這個動作會把原始 prompt 裡面的 <lora:dpys-flux_reverie_best-3620steps:1> 給依序替換成 <lora:dpys-flux_reverie_best-3620steps:1>, <lora:dpys-flux_reverie_best-7240steps:1>, ...,
一路到 <lora:dpys-flux_reverie_best-18100steps:1>, 才會停止。

接下來就可以獲得很長的一條圖盡情比較,
我這邊節錄兩個模型的結果,上面會顯示有套用的 LoRA 名稱以及沒套用的效果
(所以其實很長的圖有一半都是沒套用 LoRA 的效果…😂)
xyzplot demo 1

結論

除了比較 LoRA 之外,這也是在測試 prompt 效果時蠻常用到的技巧,學會了會方便很多。

數據女巫 𝔻.𝕡𝕪𝕤 🔮

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.