在nagative prompt输入

NSFW, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.5), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), lowers, bad hands, missing fingers, extra digit,bad hands, missing fingers, (((extra arms and legs))),
 class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}">

通用参数:

其它参数先不用管,点击生成

2025-01-15T08:02:38.png

图生图

图生图(img2img)是让AI参照现有的图片生图,源自InstructPix2Pix技术。

例如:上传一张真人照片,让AI把他改绘成动漫人物;上传画作线稿,让AI自动上色;上传一张黑白照,让AI把它修复成彩色相片。

这个功能位于「Img2img」的页签。

随便在网上找一张非二次元的图片,例如我这里使用矿泉水瓶的图片

参考步骤:

提示词(注意看格式)

SFW, (1girl:1.3), long hair, white hair, face, front, looking at viewer,  white shirt, (green belt:1.5), red skirt, red hats, dancing, upper body, standing, (white background:1.5), hands at the back
(masterpiece:1.2), best quality, masterpiece, highres, original, extremely detailed wallpaper, perfect lighting,(extremely detailed CG:1.2),
Negative prompt: NSFW, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.5), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), lowers, bad hands, missing fingers, extra digit,bad hands, missing fingers, (((extra arms and legs))),
Steps: 20, Sampler: DPM++ SDE Karras, CFG scale: 8, Seed: 4072734573, Size: 600x600, Model hash: 038ba203d8, Model: AbyssOrangeMix2_SFW, Denoising strength: 0.7, Clip skip: 2, ENSD: 31337, Mask blur: 4
 class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}">

2025-01-15T08:13:53.png

图生图的生成结果按钮下的最后两个按钮可以从图片中提取提示词,有兴趣的也可以试一下。

内补绘制

内补绘制(inpaint)。这是用AI填充涂黑(遮罩)区域的技术,例如给图片的角色换衣服。或是反过来:让AI把图片空白的地方绘制完成(outpaint)。

可以想像成让AI帮您修图,用于在图中添加或去除对象。

此功能位于Img2img下的Inpaint页面。

参数说明:

参考流程:

若要切换为外补绘制:点击左下角的Mask mode,将Inpaint masked改成Inpaint not masked,这样AI就会改为填满没有涂黑的地方。

batch页面可以批量处理图片,大家自行尝试。

这里我没做出效果比较好的示例,在网上找了张效果图,涂黑的部分就是重绘的部分,新版涂抹已经变成白色了

2025-01-15T08:33:34.png

额外网络 进阶模型

大模型一般指Checkpoint,小模型则是除了大模型之外的其他模型,如LoRA、Embeddings、Hypernetwork对大模型起到“微调”作用

小模型主要用来改善画风,并改善生成特定对象、角色的准确度。例如使用Anything模型生图,再搭配"Taiwan-doll-likeness LoRA"就能转成真人风格而不用依赖许多提示词,并且可以一次叠很多个,就像套多层滤镜一般。

Civitai有很多小模型可以下载。下载时需注意模型是哪一种。

如果要显示小模型缩略图,将图片取跟该模型一样的文件名,并放到该模型的文件夹。例如在Taiwan-doll-likeness.safetensors所在的文件夹放一张Taiwan-doll-likeness.png。

使用方法:

这里介绍一下VAE,之前生成的图片都会偏灰。VAE (variational autoencoder)可以让算出来的图片色彩更漂亮,改善图片颜色灰灰暗暗的问题。

这里下载模型对应的VAE:https://huggingface.co/WarriorMama777/OrangeMixs/tree/main/VAEs
下载orangemix.vae.pt

如果要使用VAE,下载VAE模型后,将其放到stable-diffusion-webui/models/VAE文件夹。

接着点击Settings → Stable Diffusion → SD VAE,选取要使用的VAE,再点击Apply Settings,此后生图就会一律使用指定的VAE。

lora案例1

到c站下载lora:https://civitai.com/models/9727?modelVersionId=11564

这里我下载的是d.va (overwatch) d.va 守望先锋

下载后放到models\Lora文件夹。

此时在Lora选项卡的右上角点击刷新就可以看到卡片

提示词

SFW, masterpiece, best quality, 1girl, brown hair, brown eyes, smile, standing, dynamic pose, outdoors, city background, , deeva \(overwatch 1 version\), d.va /(overwatch 1/),
facial_mark, whisker_markings, d.va_\(overwatch\), 1girl, blue bodysuit, long_hair, pilot_suit, solo, facepaint, headphones, gun, brown_hair, holding_gun, swept_bangs, clothes_writing, bangs, breasts, blue_background, hand_on_hip, animal_print, handgun, brown_eyes, medium_breasts, holding_weapon, bracer, ribbed_bodysuit, weapon, white_gloves, shoulder_pads, holding, high_collar, turtleneck, standing, white_footwear, full_body, charm_\(object\), pink_lips, gloves, hand_up, pistol, skin_tight, smile
Negative prompt: NSFW, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.5), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), lowers, bad hands, missing fingers, extra digit,bad hands, missing fingers, (((extra arms and legs))),
Steps: 20, Sampler: DPM++ SDE Karras, CFG scale: 7, Seed: 3590206651, Size: 600x800, Model hash: a074b8864e, Model: 二次元:Counterfeit V2.5, Denoising strength: 0.4, Clip skip: 2, ENSD: 31337, Hires upscale: 1.5, Hires upscaler: R-ESRGAN 4x+ Anime6B
 class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}">

可以试一下加和不加的区别

2025-01-15T12:18:03.png

放大图片分辨率

用默认的512x512分辨率就生出不错的图,可以将图片直接丢到Extras放大。

参数

Upscaler的选择

切换至Extras页面,上传图片,选取放大2倍,点击下面的Upscaler 1中挑一个看起来顺眼的,其余维持缺省,按Generate即会得到放大过的图片。

参考


image

data-report-view="{"mod":"1585297308_001","spm":"1001.2101.3001.6548","dest":"https://blog.csdn.net/m0_74252714/article/details/145173856","extend1":"pc","ab":"new"}">>
注:本文转载自blog.csdn.net的破晓一代网络的文章"https://blog.csdn.net/m0_74252714/article/details/145173856"。版权归原作者所有,此博客不拥有其著作权,亦不承担相应法律责任。如有侵权,请联系我们删除。
复制链接

评论记录:

未查询到任何数据!