今天有小伙伴提起了多人生成的问题,自己之前也尝试过,不过当时比较低级,prompt 中就抄袭了 2girl 的提示词,好在抄的模型比较好,勉强能看。
后来了解到了几个插件,
Composable LoRA:分区域LoRa效果控制(汉化下叫“可自组 Lora”!!!)https://github.com/opparco/stable-diffusion-webui-composable-lora
分割(行 :列)
|
1:1
|
1:2
|
1:2
|
全区域
|
第一个位置
|
第二个位置
|
|
位置
|
0:0
|
0:0
|
0:1
|
全区域提示词
|
第一个人物提示词对应
|
第二个人物提示词对应
|
|
权重
|
0.2
|
0.8
|
0.8
|
全区域权重
|
第一个人物权重
|
第二个人物权重
|
|
prompt
|
全局提示词
|
AND 第一个人物提示词
|
AND 第二个人物提示词
|
分割
|
1:1
|
1:3
|
1:3
|
1:3
|
全区域
|
第一个位置
|
第二个位置
|
第三个位置
|
|
位置
|
0:0
|
0:0
|
0:1
|
0:2
|
全区域提示词
|
第一个人物提示词对应
|
第二个人物提示词对应
|
第三个人物提示词对应
|
|
权重
|
0.2
|
0.8
|
0.8
|
0.8
|
全区域权重
|
第一个人物权重
|
第二个人物权重
|
第三个人物权重
|
|
prompt
|
全局提示词
|
AND 第一个人物提示词
|
AND 第二个人物提示词
|
AND 第三个人物提示词
|
在使用插件时,可以将采样迭代步数(Steps)先设置为1~2 ,生成看一下区域生成是否正常,这是分为3列的情况:
两排的参数情况如下:
位置: 1:1 ,2:2, 2:2, 2:2, 2:2
2:2 |
2:2 |
2:2 |
2:2 |
区域顺序: 0:0,0:0,0:1,0:2,0:3
1(0:0) |
3(0:2) |
2(0:1) |
4(0:3) |
权重:0.2,0.8,0.2,0.8,0.2
1(0.8) |
3(0.8) |
2(0.2) |
4(0.2) |
这么无聊的内容你都能看到这里,不写点摸索出来的经验有点对不起你了……
关于拆分区域不起作用与生成多人失败变成一个人的问题:
在没有使用ControlNet 的情况下 想使用这两个插件稳定生成,那么:
各个区域的提示内容不能过于复杂,把多个单独成像的提示词 直接Copy过来作为一个人物的内容进行组装是不可取的。多种风格,多种复杂的关键词会带来巨大偏差。
这是与上面三种风格混成一张人物(圣斗士|蒸汽朋克|吸血新娘)的相通的提示词,在玩家建议增大画布尺寸下,尝试采用了1024x512尺寸下生成的效果(随机性极大9张图能出2张能看的),依稀还能看到三种风格的混搭……
出来两个?是不是画布不够大?然后又采用了 1536x512尺寸下产生的,这里面依然只是生成了一个人,三种描述风格混搭,也还能看(出图可用性更低了)
这张与上张相同提示词,随机了另一个种子(seed),貌似混搭也不错……
以上巨大而冗余的prompt就不贴了……
这肯定是方向不对……
在参考了插件作者的Github中后,得到了部分海外友人的支持,提到了提示词过于复杂造成了部分污染,致使插件的分区没能正常工作……
遂做了大部分删减,果然效果好了很多,较为稳定可以生成多人模式了……
但是依然看到圣斗士风格覆盖了 蒸汽朋克 与 吸血新娘 风格,变成了三女神模式……
重新看了作者给的例子…… 不仅对作者由衷的佩服,一切早就摆在了面前……
((ultra-detailed)), ((illustration)), 2girls
AND ((ultra-detailed)), ((illustration)), 2girls, black hair
AND ((ultra-detailed)), ((illustration)), 2girls, blonde hair
Negative prompt: (low quality, worst quality:1.4)
Steps: 28, Sampler: Euler a, CFG scale: 5, Seed: 722014241, Size: 512x512, Model hash: 3f64f3baf5, Model: Anything-v3.0-fp16, ENSD: 31337, Latent Couple: "divisions=1:1,1:2,1:2 positions=0:0,0:0,0:1 weights=0.2,0.8,0.8 end at step=20", Eta: 0.67
发现了么 :
((ultra-detailed)), ((illustration)), 2girls
每一个区域都出现了相同的关键词 + 单独的个性化内容
重新修改了prompt 符合这个范式…… 然后……
圣斗士、蒸汽朋克、吸血新娘(眼神太过魅惑已被打码,不然发不出来)……
3girls,aespakarina,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body)
AND 3girls,aespakarina,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body), ,piscesarmor,armor,golden armor,helmet
AND 3girls,aespakarina,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body),(steampunk warrior queen:1.3) holding a (mechanical sword:1.2), powerful, intricately detailed armor, (rusty metal:1.1) with (copper accents:1.1), intense colors, hyper-realistic lifelike texture,
AND 3girls,aespakarina,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body),deep shadow, (darkness:1.1), (highly detailed beautiful gothic vampire bride:1.1), (bride:1.2), lace wedding veil, cleavage,(extremely detailed eyes:1.2) face, (piercing red eyes:1.1), detailed clothes, curly red black hair, bangs, frills, decorative black wedding dress with red roses bouquet
Negative prompt: (watermark:1.2), (a signature:1.1), Ugly, deformed, distorted, blurry, low quality, low resolution, simultaneous, bad anatomy, extra limbs, extra ears, out of frame, ugly, extra limbs, ((bad anatomy)), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy, 3d render
Steps: 30, Sampler: Euler a, CFG scale: 7, Seed: 4029803897, Size: 768x512, Model hash: 46d105afa7, Model: faetastic.kn0y, Denoising strength: 0.9, ENSD: 31337, Latent Couple: "divisions=1:1,1:3,1:3,1:3 positions=0:0,0:0,0:1,0:2 weights=0.2,0.8,0.8,0.8 end at step=20", Hires upscale: 2, Hires upscaler: 4x-UltraSharp, Eta: 0.67
processing | 28.2/268.5s
Time taken: 45m 44.93s
45分钟…… 羡慕4090……
内容来自于C站,不能魔法访问C站的小伙伴可以下载使用,已经使用C站助手更新了效果图与pormpt及模型信息,下载下来之后直接解压到Lora目录即可使用。
https://download.csdn.net/download/bestpasu/87762524
———补充更新——————————————————————————————————————
小伙伴提了说是生成头发颜色存在污染,我尝试了一下(后附魔法):
需要注意的:要确定自己使用的魔法能被自己的大模型识别,有的调制的大模型不一定有相关的内容,比如上图生成的模型年轻女人和年轻女孩识别出来脸都差不多……
Three women,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body)
AND Three women,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body),silver haired granny,
AND Three women,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body),Young woman with red hair,
AND Three women,RAW,(8k, best quality, masterpiece:1.2),(intricate details:1.4),(photorealistic:1.4),octane render, studio soft light, rim light, vibrant details, ultra detailed, realistic skin texture, (Super fine pattern:1.3),(full body),Blue-haired girl
Negative prompt: (watermark:1.2), (a signature:1.1), Ugly, deformed, distorted, blurry, low quality, low resolution, simultaneous, bad anatomy, extra limbs, extra ears, out of frame, ugly, extra limbs, ((bad anatomy)), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy, 3d render
Steps: 30, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 3971804455, Face restoration: CodeFormer, Size: 768x512, Model hash: 59ffe2243a, Model: chilloutmix_NiPrunedFp16Fix, Denoising strength: 0.4, ENSD: 31337, Latent Couple: "divisions=1:1,1:3,1:3,1:3 positions=0:0,0:0,0:1,0:2 weights=0.2,0.8,0.8,0.8 end at step=20", Hires upscale: 2, Hires upscaler: R-ESRGAN 4x+Time taken: 1m 37.06s
Torch active/reserved: 12273/16856 MiB, Sys VRAM: 18266/24269 MiB (75.26%)