Stable Diffusion web UI x Waifu Diffusion v1.4:本機 AI 生成高品質二次元動漫角色

2023/01/03 6,678 1 軟體應用 , 人工智慧 , AI繪圖

Stable Diffusion web UI 是基於 Gradio 的瀏覽器界面,用於 Stable Diffusion 模型的各種應用,如:文生圖、圖生圖等,適用所有以 Stable Diffusion 延伸的擴充模型。關於這個工具軟體的安裝方式請參考我之前寫過的另一篇圖文,請先安裝並學習使用後再接續看本文教學。這次主軸是「hakurei」釋出的「Waifu Diffusion v1.4」,其實最剛開始我已經寫過「Waifu Diffusion」的模型使用教學,該篇圖文步驟相當完整,那時候為 v1.3,但 v1.4 很不一樣,所以再寫一次新的圖文。

Stable Diffusion web UI 官方網站:https://github.com/AUTOMATIC1111/stable-diffusion-webui
Waifu Diffusion v1.4 模型載點:https://huggingface.co/hakurei/waifu-diffusion-v1-4

Waifu Diffusion v1.4 跟 Stable Diffusion 2.0 一樣都是改用 768 x 768 px 的訓練集來訓練模型,比起 512 x 512 px 的傳統訓練集更能讓 AI 學到細節,依照概述文件,該模型分為兩階段進行訓練,兩個訓練階段的模型將作為單獨的模型發佈(waifu-diffusion-1-4-base.ckpt 及 waifu-diffusion-1-4-aesthetic.ckpt)。而本文截稿前網上能取得的是第一階段測試模型,先來算圖看看吧!


▲ 到 Hugging Face Waifu Diffusion v1.4 的主頁,可以看到介紹文字,模型載點在「Files」中。

▲ 我們要下載「wd-1-4-anime_e1.ckpt」跟「wd-1-4-anime_e1.yaml」共兩個檔案,大小約 5 GB(我猜正式版應該也會在這邊提供下載)。

▲ 將兩個檔案一起放入軟體根目錄下「stable-diffusion-webui\models\Stable-diffusion」,接著來到 Stable Diffusion web UI 介面選擇模型權重存檔點「wd-1-4-anime_e1.ckpt」,讀取過程終端機會跑以下內容:

Loading config from: D:\stable-diffusion-webui\models\Stable-diffusion\wd-1-4-anime_e1.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 865.91 M params.
Loading weights [8cbce067] from D:\stable-diffusion-webui\models\Stable-diffusion\wd-1-4-anime_e1.ckpt
Applying xformers cross attention optimization.
Model loaded.
Textual inversion embeddings loaded(0):

成功載入模型後就可以開始算圖了!以下就用一些提詞簡單算了一些作品供大家參考:


▲ 左右兩張小圖提詞分別是:

masterpiece, (best quality:1.2), Amazing, beautiful detailed eyes, 1girl, solo, finely detail,depth_of_field, extremely detailed CG unity 8k wallpaper, standing, (upper_body), arms_behind_back, looking_at_viewer, angry, space, trees, stars, sky, sunset.

masterpiece, (best quality:1.2), Amazing, beautiful detailed eyes, 1girl, solo, finely detail,depth_of_field, extremely detailed CG unity 8k wallpaper, standing, (upper_body), arms_behind_back, looking_at_viewer, angry, space, trees, stars, sky, sunset.


▲ 提詞如下:

 masterpiece, (best quality:1.2), Amazing, beautiful detailed eyes, 1girl, solo, finely detail,depth_of_field, extremely detailed CG unity 8k wallpaper, (contrapposto:1.2), (upper_body), arms_behind_back, looking_at_viewer, smile, space, trees, stars, sky, sunset.


▲ 提詞如下:

masterpiece, (best quality:1.2), Amazing, beautiful detailed eyes, 1girl, solo, finely detail,depth_of_field, extremely detailed CG unity 8k wallpaper, (sitting:1.2), (upper_body), arms_behind_back, looking_back, smile, space, trees, stars, sky, sunset.


▲ 提詞如下:

masterpiece, (best quality:1.2), Amazing, beautiful detailed eyes, 1girl, solo, finely detail,depth_of_field, extremely detailed CG unity 8k wallpaper, standing, (upper_body), arms_behind_back, looking_at_viewer, smile, space, trees, stars, sky, sunset.


▲ 提詞如下:

masterpiece, best quality, best quality,Amazing,beautiful detailed eyes,1girl,finely detail,Depth of field,extremely detailed CG unity 8k wallpaper, full body,Touhou Project,(Kirisame Marisa),yellow hair, a yellow braid on the right side tied with a white bow, yellow pupil color, smiling, witch hat tied with a white bow.

可以看出新版的模型光測試版本就相較上一版本有相當大的改進!非常期待正式版的釋出。

贊助廣告 ‧ Sponsor advertisements

留言區 / Comments

萌芽論壇