Stable Diffusion-升级XL模型

Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型
Stable Diffusion-升级XL模型

继『Stable Diffusion 2.1』後推出『Stable Diffusion XL1.0』升级版,分三版『Base』『refiner』『turbo』.適用於『AUTOMATIC1111』

https://huggingface.co/stabilityai?search_models=xl

 

下載 XL 模型

https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors?download=true
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors?download=true
https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors?download=true
https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors?download=true
https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0.safetensors?download=true
https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors?download=true

擺係

C:\stable-diffusion-webui\models\Stable-diffusion

 

下載VAE模型

https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors?download=true

擺係

C:\stable-diffusion-webui\models\VAE

 

下載LORA模型

https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors?download=true

擺係

C:\stable-diffusion-webui\models\Lora

 

SDXL 1.0 模型 簡述
sd_xl_base_1.0.safetensors base模型
sd_xl_base_1.0_0.9vae.safetensors base模型內置 VAE
sd_xl_refiner_1.0.safetensors refiner模型
sd_xl_refiner_1.0_0.9vae.safetensors refiner模型內置 VAE
sd_xl_turbo_1.0.safetensors turbo模型
sd_xl_turbo_1.0_fp16.safetensors turbo模型內置 VAE
sdxl_vae.safetensors 外置VAE模型
sd_xl_offset_example-lora_1.0.safetensors lora模型

 

網埞址 版本
https://huggingface.co/stabilityai?search_models=xl XL
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0 base
https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0 refiner
https://huggingface.co/stabilityai/sdxl-turbo turbo
https://huggingface.co/ByteDance/SDXL-Lightning Lightning
https://huggingface.co/stabilityai/sdxl-vae VAE

Nvidia-2080ti吾支持float16精度,彈出警示.

A tensor with all NaNs was produced in VAE.

Web UI will now convert VAE into 32-bit float and retry.

To disable this behavior, disable the ‘Automatically revert VAE to 32-bit floats’ setting.

To always start with 32-bit VAE, use –no-half-vae commandline flag.

  1. 直接编緝『C:\stable-diffusion-webui\webui-user.bat』.
  2. 係『COMMANDLINE_ARGS』命令行参數加入『–no-half-vae』吾將VAE模型轉換為float-16bit半精度.
webui-user.bat
set COMMANDLINE_ARGS= –no-half-vae

 

–no-half-vae 吾將VAE模型轉換為float-16bit半精度
–no-half 吾將模型轉換為float-16bit半精度
–disable-nan-check 吾檢查生成圖像/潛在空間是否包含nan值,在持續集成中運行時無需檢查點

 

正咒詞  
looking at viewer, 睇著觀眾
making eye contact, 眼神交流
a girl with Tulle skirt, 薄紗裙
a girl with Lace blouse, 蕾絲襯衫
a girl Sequin dress, 亮片裙
Volumetric Lighting, 體積照明
light depth, 光深度
flower
beautiful lighting,  
Double Exposure Style, 雙重曝光風格
Traditional Attire, 傳統服飾
Artistic Calligraphy and Ink, 書法與水墨藝術
dramatic atmospheric lighting, 戲劇氛圍照明
Volumetric Lighting, 體積照明
double image ghost effect, 雙影像重影效果
image combination, 影像組合
double exposure style, 雙重曝光風格
   
   
1girl, 1女孩,
solo, 獨奏,
long hair, 長髮
breasts, 乳房
towel, 毛巾
cleavage, 卵裂
very long hair, 長髮
naked towel, 裸毛巾
brown eyes, 棕眼
large breasts, 大乳房
hair between eyes, 眼睛之間頭髮
upper body, 上身
looking at viewer, 看著觀眾
bangs, 劉海
bare shoulders, 裸露肩膀
collarbone, 鎖骨
brown hair, 棕髮
indoors, 室內
parted lips, 張開嘴唇

 

反咒詞  
ugly, 醜陋
deformed, 變形
noisy, 嘈雜
blurry, 模糊
low contrast, 低對比度

 

Stable Diffusion-放大算法4x-UltraSharp

Stable Diffusion-放大算法4x-UltraSharp
Stable Diffusion-放大算法4x-UltraSharp
Stable Diffusion-放大算法4x-UltraSharp
Stable Diffusion-放大算法4x-UltraSharp
Stable Diffusion-放大算法4x-UltraSharp
Stable Diffusion-放大算法4x-UltraSharp

『4x-UltraSharp』比『R-ESRGAN General 4xV3』放大效果仲清晰.冇損逼真放大.

  1. 下載『4x-UltraSharp』
https://huggingface.co/lokCX/4x-Ultrasharp/resolve/main/4x-UltraSharp.pth?download=true
https://huggingface.co/lokCX/4x-Ultrasharp/tree/main
  1. 擺係
C:\stable-diffusion-webui\models\ESRGAN
  1. 撳『Settings』->『Face restoration』.
  2. 禁『Restore faces面部修复』.
  3. 撳『Settings』->『user interface』.
  4. 係『Quicksettings list』加入『upacler_for_img2img』係頁頂快速設定放大算法.
  5. 撳『Apply settings』應用設定.
  6. 撳『Reload UI』重啟界面.
  7. 係頁頂『Upscaler for img2img』揀『4x-UltraSharp』.
  8. 撳『img2img』->『Generation』->『img2img』
  9. 拖入低解像圖畫
  10. 係『Resize by』->『Scale缩放』設『4』,如果記憶體溢出降低放大值.
  11. 係『Denoising strength』設值『1』
  12. 撳『Generate』放大圖畫.

Stable Diffusion-模型VAE

Stable Diffusion-模型VAE
Stable Diffusion-模型VAE

VAE模型用於修正圖畫色彩,『none冇』VAE模型色彩平淡,指定VAE模型後色彩鮮豔,光影分明.

VAE模型擺係

C:\stable-diffusion-webui\models\VAE

係『Stable Diffusion WEBUI』頁頂添加快速設定清單.

  1. 撳『Settings』->『User interface』
[info] Quicksettings list (setting entries that appear at the top of page rather than in settings tab) (requires Reload UI)
  1. 添加『sd_vae』
sd_model_checkpoint   sd_vae
  1. 撳『Apply settings』應用設定.
  2. 撳『Reload UI』重置圖形界面.

Stable Diffusion真人改動畫

Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫
Stable Diffusion真人改動畫

『Stable Diffusion』真人改動畫, 重點係揀適合模型,同埋設較細重绘幅度.

  1. 撳『Tagger』返推咒語引導生圖.
  2. 『Stable Diffusion checkpoint』模型揀『safetensors』.
  3. 撳『img2img文生圖』.
  4. 撳『Generation』->『img2img』
  5. 係『IMAGE』拖入原圖.
  6. 『Sampling method采樣法』揀『DPM-ADAPTIVE』.
  7. 『Sampling steps采樣步』填『20』.
  8. 『Resize by』->『scale』填『1』,與原圖寬高壹致.
  9. 『Denoising strength重绘幅度』填『3』,越細圖像與原圖越似.
  10. 撳『Generate』生成影像.
正向咒語Prompt 簡述
1girl,
arm support,
black skirt,
breasts,
brown eyes,
cleavage,
jacket,
lips,
long hair,
looking at viewer,
open clothes,
pencil skirt,
shirt,
sitting,
skirt,
smile,
solo

 

反向咒語Negative Prompt 簡述
(worst quality:2), 低質內容
(low quality:2), 低質內容
(normal quality:2), 低質內容
lowres, 低質內容
((monochrome)), 黑白
((grayscale)), 灰階
(monochrome), 單色
skin spots, 皮膚斑點
acnes, 痤瘡
skin blemishes, 皮膚瑕疵
age spot, 老人斑
glans, 龜頭
extra limbs, 多餘肢體
extra arms, 額外武器
extra legs, 多餘腳瓜瓤
extra leg, 多餘腳瓜瓤,
extra foot, 多餘腳掌
extra fingers, 手指太多
fewer fingers, 手指更少
strange fingers, 怪手指
missing arms, 缺手瓜
missing legs, 缺腳瓜瓤
missing fingers, 缺手指
fused fingers, 融合手指
too many fingers, 手指太多
bad hand, 歪手
(bad_prompt:0.8), 不良提示
bad anatomy, 解剖不良
bad hands, 歪手
bad feet,
bad body, 歪身歪勢,
bad proportions, 身體比例差,
gross proportions, 總比例
DeepNegative, 深度負面
(fat:1.2), 脂肪
looking away, 睇向別處
tilted head, 側頭
{Multiple people}, 多人
text, 文字
error, 錯字
extra digit, 額外數字
fewer digits, 細數
cropped, 裁剪
jpeg artifacts, 壓縮痕跡
signature, 簽名
watermark, 水印
username, 身份
blurry, 模糊
cropped, 裁剪
poorly drawn hands, 手畫得吾靚
poorly drawn face, 樣畫得吾靚
mutation, 突變
deformed, 變形
malformed limbs, 肢體畸形
long neck, 長頸
cross-eyed, 鬥雞眼
mutated hands, 手型變異
polar lowres, 極地低氣壓

 

Stable Diffusion替换背景

Stable Diffusion替换背景
Stable Diffusion替换背景

利用遮罩替换背景

  1. segment anything』生成遮罩.
  2. 基礎模型『safetensors [299feccabf] 』
  3. 撳『Img2img圖生圖』
  4. 『Prompt』填『正面咒詞』.
  5. 『Negative Prompt』填『反面咒詞』.
  6. 撳『Generation』->『ipaint upload上傳遮罩』
  7. 『image』拖入原畫.
  8. 『mask』拖入遮罩.
  9. 『Resize mode』勾『Resize and fill填充』.
  10. 『mask blur遮罩边緣模糊度』值填『0』. 此值越大蝕占背景越大.
  11. 『mask mode遮罩模式』勾『Inpaint not masked重繪非遮罩內容』
  12. 『masked content蒙板區域內容處理』勾『original原圖』.
  13. 『Inpaint area』勾『Whole picture』.
  14. 『Sampling method』 揀『DPM++ 2M SDE Heun』.
  15. 『Sampling steps』 值填揀『20』
  16. 『Resize by』重置原畫尺寸. 值填『1:1填充』.
  17. 『Denoising strength重繪幅度』,值填『1』.
  18. 『seed』值填『1251813965』.
  19. 撳『Generate』生成
正面咒詞
Masterpiece, 傑作
Ultra high res, 超高解像
High quality, 高品質
4k, 4k
(Photorealistic:1.2), 真實感
Photo, 相片
No humans, 冇人
Classroom, 課室
Indoors, 室内
   

 

反向咒語Negative Prompt 簡述
sketches, 速寫,素描
( (monochrome) ), ( (greyscale) ), 黑白,灰階
facing away,

looking away,

人面避開,

眸目避開

(Text:4),error,extra digit,fewer digits, 文字,錯字,額外數字,細數
cropped,jpeg artifacts,blurry, 裁剪,壓縮痕跡,模糊,
signature,watermark,username, 簽名,水印,身份,
(worst quality:2),(low quality:2),(normal quality:2), (lowers), (normal quality), 低質內容
bad anatomy,

bad body,

bad hands,

extra limbs,

extra legs,

extra foot,

extra arms,

(too many fingers:2),

malformed limbs,

(fused fingers:2),

long neck,

bad proportions,

missing arms,

missing legs,

missing fingers,

歪身體構造,

歪身歪勢,

歪手,

多餘肢體,

多餘腳瓜瓤,

多餘腳掌,

額外武器,

手指太多,

畸形肢體,

融合手指,

長頸,

身體比例差,

缺手瓜,

缺腳瓜瓤,

缺手指,

Bad-artist, 衰明星
Bad-artist-anime, 衰動漫明星
Bad-prompt_version, 恶意版本2
Badhand, 坏人
Easynegative, 易阴性
Ng_deepnegative, Ng_deepnegative

 

 

Stable Diffusion插件-畫面識認segment anything

Stable Diffusion插件-畫面識認segment anything
Stable Diffusion插件-畫面識認segment anything

Facebook开發『segment anything model』(SAM) 畫面識認,帮『ControlNet/Inpaint』重绘生成遮罩,重畫前後景,此版適合『Automatic1111’s WebUI』.

https://github.com/continue-revolution/sd-webui-segment-anything/archive/refs/heads/master.zip
https://github.com/continue-revolution/sd-webui-segment-anything

 

  1. 撳『Extensions擴展』->『Install from URL係網裝』
https://github.com/continue-revolution/sd-webui-segment-anything.git
  1. 撳『Install』下載.

 

  1. 手動下載『Segment Anything』
  2. 登入CMD命令行模式
  3. 指定當前資料夾
CD C:\stable-diffusion-webui\extensions\
  1. 下載『segment anything』
git clone https://github.com/continue-revolution/sd-webui-segment-anything.git
  1. 如出錯刪下列檔䅁夾,再重新下載
C:\stable-diffusion-webui\extensions\sd-webui-segment-anything
C:\stable-diffusion-webui\tmp\sd-webui-segment-anything

 

手工下載模型『segment anything model』越大越确.

https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth
https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
https://huggingface.co/lkeab/hq-sam/resolve/main/sam_hq_vit_h.pth
https://huggingface.co/lkeab/hq-sam/resolve/main/sam_hq_vit_l.pth
https://huggingface.co/lkeab/hq-sam/resolve/main/sam_hq_vit_b.pth

擺係sam資料夾.

C:\stable-diffusion-webui\extensions\sd-webui-segment-anything\models\sam

 

手工下載GroundingDINO模型

https://huggingface.co/ShilongLiu/GroundingDINO/resolve/main/GroundingDINO_SwinB.cfg.py?download=true
https://huggingface.co/ShilongLiu/GroundingDINO/resolve/main/GroundingDINO_SwinT_OGC.cfg.py?download=true
https://huggingface.co/ShilongLiu/GroundingDINO/resolve/main/groundingdino_swinb_cogcoor.pth?download=true
https://huggingface.co/ShilongLiu/GroundingDINO/resolve/main/groundingdino_swint_ogc.pth?download=true

擺係grounding-dino資料夾.

C:\stable-diffusion-webui\extensions\sd-webui-segment-anything\models\grounding-dino
  1. 使能本地编译『GroundingDINO』
  2. 撳『Settings』->『Segment Anything』
  3. 撳『Use local groundingdino to bypass C++ problem』用本地groundingdino繞過C++編譯問題.
  4. 撳『Apply settings』
  5. 撳『Reload UI』

 

  1. 允許『segment anything』傅递畀『ControlNet』
  2. 撳『Settings』->『ControlNet』
  3. 勾『Allow Other script to control this extension允許其他它脚本對擴展插件進行控制』.
  4. 撳『Apply settings』
  5. 撳『Reload UI』

 

  1. 撳『img2img』->『Segment Anything』
  2. 『SAM Model』擇『pth』
  3. 係『single image』上傅圖畫.
  4. 撳左鍵黑㸃保留區, 撳右鍵紅㸃剔除區.
  5. 撳『Remove all point prompts』剔除冚辦闌注㸃
  6. 勾『Enable GroundingDINO』啟用探測詞識認圖畫物件.
  7. 『GroundingDINO Model』擇『GroundingDNO_SwinB(938MB)』
  8. 『GroundingDINO Detection Prompt』填探測詞以『.』分割. 例如『text』.
  9. 『GroundingDINO Box Threshold』邊界框閾值.
  10. 勾『I want to preview GroundingDINO detection result and select the boxes I want.』預覽GroundingDINO檢測結果並選擇邊界框.
  11. 撳『Generate bounding box』生成邊界框.
  12. 『Select your favorite boxes:』勾『邊界框』『0』『1』『2』, 其中壹個.
  13. 撳『Preview Segmentation』預覽細分
  14. 勾『Copy to Inpaint Upload & img2img ControlNet Inpainting』自動上傳至『ControlNet』.
  15. 『Choose your favorite mask:』揀遮罩 勾『0』『1』『2』之壹.
  16. 勾『Expand Mask』展開遮罩,設『0~30』剔除边缘毛刺.
  17. 撳『Update Mask』更新遮罩.

Stable Diffusion插件除水印Cleaner

Stable Diffusion插件除水印Cleaner
Stable Diffusion插件除水印Cleaner
Stable Diffusion插件除水印Cleaner
Stable Diffusion插件除水印Cleaner
Stable Diffusion插件除水印Cleaner

上次『Inpaint』除水印,適用於颜色單調圖.層次豐富用『sd-webui-cleaner』插件. 此版適合『Automatic1111’s WebUI』.

  1. 撳『Extensions擴展』->『Install from URL係網裝』

『URL for extension’s git repository』填

https://github.com/novitalabs/sd-webui-cleaner.git

https://github.com/novitalabs/sd-webui-cleaner.git
  1. 撳『Install』下載
  2. 登入CMD命令行模式
  3. 網絡連可手動下載,指定當前資料夾
CD C:\stable-diffusion-webui\extensions\
  1. 直接下載插件『sd-webui-cleaner』
https://codeload.github.com/novitalabs/sd-webui-cleaner/zip/refs/heads/main
  1. 『sd-webui-cleaner』
python.exe -s -m pip install -r requirements.txt
  1. 首次𢴇行自動係『HuggingFace』下載模型.
https://huggingface.co/anyisalin/big-lama/resolve/main/big-lama.safetensors
  1. 模型擺係
C:\stable-diffusion-webui\extensions\sd-webui-cleaner\models
  1. 撳『Extensions』->『Installed』->『Apply and restart UI』重啟.
  2. 撳『Cleaner』->『Clean up』.
  3. 上傳圖畫,涂抹除字.
  4. 撳『Clean UP』除水印.

 

 

Stable Diffusion-LoRA模型

Stable Diffusion-LoRA模型
Stable Diffusion-LoRA模型

『LoRA』(Low-Rank Adaptation)模型,擴展名同樣係『.safetensors』.基於基礎模型訓練,作為基礎模型補充,大细係幾拾兆之間.係吾修改基礎模型,用小量數據訓練出獨特畫風模型.

『LoRA』模型擺係『C:\stable-diffusion-webui\models\Lora』後.帮『LoRA』模型添加封面,圖檔名與模型名壹致,同『LoRA』模型擺係壹起,撳『refresh page』刷新.

係『civitai.com』封面圖左上角會標『LoRA』字樣.

https://civitai.com/

撳『LoRA』模型自動添加咒詞.且可叠加,并設權重.初始值1.

<lora:模型名:權重值>
<lora:hina:1>

 

模型 位置
基礎模型 C:\stable-diffusion-webui\models\Stable-diffusion
LoRA模型 C:\stable-diffusion-webui\models\Lora

 

LoRA模型 Lora_model.safetensors
封面圖 Lora_model.png

 

 

Stable Diffusion改背景

Stable Diffusion改背景
Stable Diffusion改背景

用AI改圖背景,用photoshop做『蒙板』,限黑白孖色,背景填充白色,人像填充黑色.

  1. 基礎模型『safetensors [299feccabf] 』
  2. 撳『Img2img圖生圖』
  3. 『Prompt』填『正面咒詞』
  4. 撳『Generation』->『ipaint upload上傳蒙板』
  5. 『image』拖入原畫.
  6. 『mask』托入蒙板,黑白孖色,背景白,人像黑.
  7. 『Resize mode』勾『Resize and fill填充』.
  8. 『mask blur蒙板边緣模糊度』值填 此值越大蝕占背景越大.
  9. 『mask mode蒙板模式』勾『Inpaint masked重繪蒙板內容』
  10. 『masked content蒙板區域內容處理』勾『original原圖』.
  11. 『Resize by』重置原畫尺寸. 值填『1:1填充』.
  12. 『Denoising strength重繪幅度』,值填『4~0.5』.
  13. 撳『Generate』生成
正面咒詞
Masterpiece, 傑作
Ultra high res, 超高解像
High quality, 高品質
4k, 4k
(Photorealistic:1.2), 真實感
Photo, 相片
No humans, 冇人
Japanese stairs, 日本樓梯
flower 日本建筑
japanese architecture, 日本建筑
Japanese Street 日本街道
Indoors, 室内
Outdoors, 戶外
Scenery, 風景
Tree,
Sky,
Cloud,
Day, 日頭
Rock, 岩石
Mountain,
Grass,
Water,
River,
Blue sky, 藍天
Reflection, 水映
Building, 建筑
Architecture, 建筑風格
House, 别墅
Bridge,
Pond, 池塘
Cast Asian architecture, 亚洲建筑
Cloudy sky, 多云天空

 

反向咒語Negative Prompt 簡述
sketches, 速寫,素描
( (monochrome) ), ( (greyscale) ), 黑白,灰階
facing away,

looking away,

人面避開,

眸目避開

(Text:4),error,extra digit,fewer digits, 文字,錯字,額外數字,細數
cropped,jpeg artifacts,blurry, 裁剪,壓縮痕跡,模糊,
signature,watermark,username, 簽名,水印,身份,
(worst quality:2),(low quality:2),(normal quality:2), (lowers), (normal quality), 低質內容
bad anatomy,

bad body,

bad hands,

extra limbs,

extra legs,

extra foot,

extra arms,

(too many fingers:2),

malformed limbs,

(fused fingers:2),

long neck,

bad proportions,

missing arms,

missing legs,

missing fingers,

歪身體構造,

歪身歪勢,

歪手,

多餘肢體,

多餘腳瓜瓤,

多餘腳掌,

額外武器,

手指太多,

畸形肢體,

融合手指,

長頸,

身體比例差,

缺手瓜,

缺腳瓜瓤,

缺手指,

Bad-artist, 衰明星
Bad-artist-anime, 衰動漫明星
Bad-prompt_version, 恶意版本2
Badhand, 坏人
Easynegative, 易阴性
Ng_deepnegative, Ng_deepnegative

 

Stable Diffusion-咒詞反推WD 1.4 Tagger

Stable Diffusion-咒詞反推WD 1.4 Tagger
Stable Diffusion-咒詞反推WD 1.4 Tagger

咒詞反推『Clip』同『DeepBooru』之外,仲有『WD 1.4 Tagger』, 生成咒詞并以權重排序.排前權重高排後權重低.此版適合『Automatic1111’s WebUI』.

  1. 撳『Extensions擴展』->『Install from URL係網裝』
  2. 『URL for extension’s git repository』填『https://github.com/picobyte/stable-diffusion-webui-wd14-tagger.git
https://github.com/picobyte/stable-diffusion-webui-wd14-tagger.git
  1. 撳『Install』下載
  2. 登入CMD命令行模式
  3. 手動下載,指定當前資料夾
CD C:\stable-diffusion-webui\extensions\
  1. 下載『stable-diffusion-webui-wd14-tagger』
git clone https://github.com/picobyte/stable-diffusion-webui-wd14-tagger.git
  1. 如果出錯刪下列檔䅁夾,再重新下載
C:\stable-diffusion-webui\extensions\stable-diffusion-webui-wd14-tagger
C:\stable-diffusion-webui\tmp\stable-diffusion-webui-wd14-tagger
  1. 撳『Apply and restart UI』重啟
  2. 登入CMD命令行模式
  3. 指定當前資料夾
CD C:\stable-diffusion-webui\extensions\stable-diffusion-webui-wd14-tagger
  1. 『WD 1.4 Tagger』
python.exe -s -m pip install -r requirements.txt
  1. 首次𢴇行自動係『HuggingFace』下載.
  2. 撳『Extensions』->『Installed』->『Apply and restart UI』重啟.
  3. Python裝ONNX Runtime
  4. 撳『Tagger』上傳圖畫.
  5. 係『Interrogator』揀『模型』.
  6. 撳『Interrogate image』反推『圖畫』咒詞.
  7. 首次𢴇行係『https://huggingface.co』下載模型.由於位於墙外要
  8. 係『Ratings and included tags』得到咒詞.

 

批量生成咒詞.

  1. 撳『Tagger』->『Batch from directory』
  2. 『Input directory』填圖畫資料夾路徑.
  3. 『Output directory』填生成咒詞資料夾路徑.
  4. 撳『Interrogate』反推『圖畫』咒詞,以圖畫同名『.txt』存儲.

 

Interrogate image 反推圖畫
Ratings and included tags 評級標簽
Excluded tags 排除標簽
  1. 下載模型文檔
https://github.com/KichangKim/DeepDanbooru/releases
https://discord.gg/BDFpq9Yb7K
  1. 将模型和配置移至資料夹『C:\stable-diffusion-webui\models\deepdanbooru』
C:\stable-diffusion-webui\models\deepdanbooru\deepdanbooru-v1-20191108-sgd-e30
C:\stable-diffusion-webui\models\deepdanbooru\deepdanbooru-v3-20200101-sgd-e30
C:\stable-diffusion-webui\models\deepdanbooru\deepdanbooru-v3-20200915-sgd-e30
C:\stable-diffusion-webui\models\deepdanbooru\deepdanbooru-v3-20211112-sgd-e28
C:\stable-diffusion-webui\models\deepdanbooru\deepdanbooru-v4-20200814-sgd-e30
  1. 係『stable-diffusion-webui-wd14-tagger』下新建『models』資料夾.
C:\stable-diffusion-webui\extensions\ stable-diffusion-webui-wd14-tagger \models
  1. 開啟下列網頁,分別下載『onnx』同『selected_tags.csv』
https://huggingface.co/SmilingWolf/wd-vit-tagger-v3
https://huggingface.co/SmilingWolf/wd-swinv2-tagger-v3
https://huggingface.co/SmilingWolf/wd-convnext-tagger-v3
https://huggingface.co/SmilingWolf/wd-v1-4-moat-tagger-v2
https://huggingface.co/SmilingWolf/wd-v1-4-convnextv2-tagger-v2
https://huggingface.co/SmilingWolf/wd-v1-4-convnext-tagger-v2
https://huggingface.co/SmilingWolf/wd-v1-4-convnext-tagger
https://huggingface.co/SmilingWolf/wd-v1-4-vit-tagger-v2
https://huggingface.co/SmilingWolf/wd-v1-4-swinv2-tagger-v2
https://huggingface.co/SmilingWolf/wd-v1-4-vit-tagger
  1. 下載後重命名為,并复制至『C:\stable-diffusion-webui\extensions\stable-diffusion-webui-wd14-tagger\models』資料夾.
wd-vit-tagger-v3.onnx
wd-vit-tagger-v3.csv
wd-swinv2-tagger-v3.onnx
wd-swinv2-tagger-v3.csv
wd-convnext-tagger-v3.onnx
wd-convnext-tagger-v3.csv
wd-v1-4-moat-tagger-v2.onnx
wd-v1-4-moat-tagger-v2.csv
wd-v1-4-convnextv2-tagger-v2.onnx
wd-v1-4-convnextv2-tagger-v2.csv
wd-v1-4-convnext-tagger-v2.onnx
wd-v1-4-convnext-tagger-v2.csv
wd-v1-4-convnext-tagger.onnx
wd-v1-4-convnext-tagger.csv
wd-v1-4-vit-tagger-v2.onnx
wd-v1-4-vit-tagger-v2.csv
wd-v1-4-swinv2-tagger-v2.onnx
wd-v1-4-swinv2-tagger-v2.csv
wd-v1-4-vit-tagger.onnx
wd-v1-4-vit-tagger.csv