赞
踩
https://stable-diffusion-art.com/inpainting_basics/https://stable-diffusion-art.com/inpainting_basics/inpainting的应用主要是重绘,目前的模型换衣主要还是通过lora训练特定衣服来实现的。
模型权重:
!wget https://huggingface.co/runwayml/stable-diffusion-inpainting/resolve/main/sd-v1-5-inpainting.ckpt -O models/Stable-diffusion/sd-v1-5-inpainting.ckpt
v1.5的效果确实要比v1.4要好。
[emma watson: amber heard: 0.5], (long hair:0.5), headLeaf, wearing stola, vast roman palace, large window, medieval renaissance palace, ((large room)), 4k, arstation, intricate, elegant, highly detailed.
prompt:
复用原始的prompt,像限定区域的图像生成。
image size:
与原图保持一致
face restoration:
可以打开上面的restore faces,并且在设置中设计codeformer,这是人脸恢复模型。
mask content:
如果希望和原始图片的颜色形状保持一致,就选original,inpainting face常选original,一般使用original和denoising strength能够实现不同的效果。如果想生成与原来完全不同的东西,移除或者隐藏手臂之类的,可以使用latent noise/latent nothing.
- Fill: Initialize with a highly blurred of the original image.
- Original: Unmodified.
- Latent noise: Masked area initialized with fill and random noise is added to the latent space.
- Latent nothing: Like latent noise except no noise is added to the latent space.
denosing strength:
去噪强度表明和原始图像之间的变化,为0时,不会改变,为1时,将得到一张不相关的修复,0.75通常是不错的值。
sampling steps:20
sampling method:euler a
cfg(classifer free guidace scale):
1 – Mostly ignore your prompt.
3 – Be more creative.
7 – A good balance between following the prompt and freedom.
15 – Adhere more to the prompt.
30 – Strictly follow the prompt.
tips for inpainting:
1.一次一个小区域
2.将masked content设置为original,并且调整denoising strength
3.可以用使用ps等软件绘制mask
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。