欢迎关注我的CSDN:https://spike.blog.csdn.net/
本文地址:https://spike.blog.csdn.net/article/details/131699857
After Detailer 是一个用于 Stable Diffusion Webui 的扩展插件,可以自动检测、遮盖和修复图片中的人脸、手部或全身,使用 ultralytics 的检测模型,而不是 mmdet 的检测模型。
工程:https://github.com/Bing-su/adetailer
测试模型:DreamShaper
测试提示词:
<lora:americanmcgee_alice:1> , solo, 1girl, (mcgeealice:1.5), (black long hair:1,4) , wonderland, (covered blue dress spacious with tapered waist:1.5), (white apron:1.4), white belt at back waist (striped black and white pantyhose:1.4) , (pendant horseshoe down:1.5), solo, perfect eyes color, detailed face and eyes, finely detailed beautiful eyes, masterpiece, best quality, insanely intricate details, intricate details, incredible detail, ((vivid color)), 4k , <lora:add_detail:0.6>
Negative prompt: BadDream, (UnrealisticDream:1.5), deformed iris, deformed pupils, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, bad anatomy, bad hands, cropped, missing fingers, missing toes, too many toes, too many fingers, missing arms, long neck, missing legs, too many legs, deformed, disfigured, poorly drawn face, distorted face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, out of focus, long body, monochrome, symbol, text, logo, door frame, window frame, mirror frame, text box, out of frame, mutated legs, blurry, multiple girls, watermark, watermarked, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, letterbox, blurry, poorly drawn legs, missing leg, 2 girls, 2 females
Steps: 30, Size: 512x768, Seed: 194416167, Model: dreamshaper_7, model: control_v11p_sd15_canny [d14c016b], weight: 1, Version: v1.4.1, Sampler: DPM++ SDE Karras, CFG scale: 7, Clip skip: 2, Model hash: ed989d673d, resize mode: Crop and Resize, control mode: Balanced, "preprocessor: canny, Hires upscale: 2, pixel perfect: False, Hires upscaler: 4x_NMKD-Siax_200k, ADetailer model: face_yolov8n.pt, starting/ending: (0, 1), ADetailer version: 23.7.5, Denoising strength: 0.4, ADetailer mask blur: 4, americanmcgee_alice: 1> face mcgeealice", preprocessor params: (512, 20, 200)", "americanmcgee_alice: 2706a59bf406", ADetailer confidence: 0.3, ADetailer dilate/erode: 4, ADetailer inpaint padding: 32, ADetailer denoising strength: 0.4, ADetailer inpaint only masked: True
测试图像:
安装插件:After Detailer,即 adetailer
工程。
1. 面部修复
添加 After Detailer
的面部修复:
- 启用
After Detailer
- 模型:
face_yolov8n.pt
- 提示词:
detailed face,glamorous face,<lora:americanmcgee_alice:1>,(mcgeealice:1.5),
- 设置:
局部重绘幅度
默认0.4
即:
未添加面部修复
与 After Detailer面部修复
之间的脸部对比,明显改善一些眼睛的畸形处理:
After Detailer 面部修复
与 默认的面部修复
之间的脸部对比,明显保留更多提示信息,如绿色的眼睛:
2. 手部修复
添加 After Detailer
的手部修复:
- 启用
After Detailer
- 模型:
hand_yolov8n.pt
- 提示词:
detailed hands,
- 设置:
局部重绘幅度
默认0.4
当手部质量较差时,局部重绘幅度 可适当提高至 0.6,效果改善明显。
默认
与 After Detailer 手部细节修复
之间的效果对比,左手明显纹理更丰富:
默认
与 After Detailer 手部细节修复
之间的效果对比,右手增加指甲细节:
最终效果:
同时,也可以选择开启,身体修复
,即person_yolov8n-seg.pt
,使用顺序:person - face - hands,避免排名之后的修复被遮盖。注意 person 修复,可能会导致画面差异较大,建议多人场景时使用,谨慎使用。
其他
Upscaler: 4x_NMKD-Siax_200k
4x_NMKD-Siax_200k
的 下载地址
4x_NMKD-Siax_200k
是Upscaler的一个插件,使用 ESRGAN(Enhanced Super-Resolution Generative Adversarial Network)的模型,可以将图像的分辨率提高 4 倍。
下载导入完成,需要重启 SD,才能生效。
Embeddings: BadDream & UnrealisticDream
BadDream 的 下载地址;UnrealisticDream 的 下载地址
用于 DreamShaper
模型的负面提示词,DreamShaper
的 下载地址。
Lora: Detail Tweaker LoRA (细节调整LoRA)
官网地址:Detail Tweaker LoRA (细节调整LoRA)
权重越大,细节越多,提示词 add_detail
,例如<lora:add_detail:0.6>
,如图所示:
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-1LJG4GNi-1689223743289)(/Users/wang/Library/Application Support/typora-user-images/image-20230713082635271.png)]
Lora: Alice Liddell | American McGee’s Alice
Alice Liddell | American McGee's Alice
的 下载地址,例如 <lora:americanmcgee_alice:1>
SD: Clip Skip 参数
参考:Stable Diffusion|解开Clip Skip值的秘密
用户界面
- 快捷设置列表
- 添加参数 CLIP_stop_at_last_layers
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-eRyfsUTA-1689223743290)(/Users/wang/Library/Application Support/typora-user-images/image-20230713092900242.png)]
Pose 图像
希林娜依高:
参考
- 希林娜依高全身黑look帅气酷飒写真图片