Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

当前位置:首页>设计文章>AIGC>Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

ControlNet推出Reference(参考)控制类型也有一段时间了,最近体验了一下,被他的强大的效果震惊到了,之前一直想生成同一主体系列图片,需要Lora炼丹,这个不仅需要电脑有一定的配置,还要处理大量素材图片耗时耗力,现在Reference却可以调调参数,测测数据,毫不费力的满足你需求!

下面来了解一下这个Reference模式,到底有多强大呢?

1、先看一下官方对Reference(参考)的介绍:

Now we have areference-onlypreprocessor that does not require any control models. It can guide the diffusion directly using images as references.

翻译:现在我们有一个 reference-only预处理,它不需要任何控制模型即可实现直接使用一张图片作为参考来引导扩散。

2、再来看看Reference(参考)界面:

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

预处理器:

reference_adain:仅参考输入图,自适应实例规范

reference_adain+attn:仅参考输入图,自适应实例规范+Attention链接

reference_only:仅参考输入图,今天主要讲这个预处理器。

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

控制权重:控制模型对生成图片的影响的程度。

引导时机:控制模型介入的时间。

引导终止时机:模型终止的时间。

Style Fidelity(仅用于均衡模式):风格保真度,

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

3、来个可爱的猫咪案例演示:

在网上找一张背景干净,主体清晰的图片,这里找的一个猫,将图片改为512x512px尺寸,

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

放入controlnet,启用reference。

选择预处理器:reference_only。

style fidelity:设置为1。

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

模型:realisticVisionV20。

设置提示词:就一个词,一只行走的猫。

正向:

(best quality),((masterpiece)),(highres),original,extremely detailed 8K wallpaper,(an extremely delicate and beautiful),

a walking cat,

反向:

easynegative,ng_deepnegative_v1_75t,(worst quality:2),(low quality:2),(normal quality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark)),

其他的不用管,点击生成图片。

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

可以看出与原素材底图作比较,除了一细节的差别,与原图匹配度高达80%,在降低随机性,提高抽卡中奖率上面还是有比较大的效果的,在生成足够多的样本后,我们可以挑选一些匹配度更高的图片。

下面看下取消reference的效果:

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

AI自由发挥,风格基本难以掌控。

4、再来一个靓妹演示案例来测试,据说这样看的人会多些:

模型:realisticVisionV20

正向:

photo of woman,wispy blonde hair,perfect eyes,simple long knitted tight-fitting shift dress,(detailed face:1.2),(flat chest:1.1),slight smile,walking,outdoor,nature,beautiful,wild flowers,natural skin,dusk,orange clouds,

8k uhd,high quality,ray tracing,(best quality),((masterpiece)),(highres),

反向:

multiple breasts,(mutated hands and fingers:1.5 ),(long body :1.3),(mutation, poorly drawn :1.2),black-white,bad anatomy,liquid body,liquid tongue,disfigured,malformed,mutated,anatomical nonsense,text font ui,error,malformed hands,long neck,blurred,lowers,lowres,bad anatomy,bad proportions,bad shadow,uncoordinated body,unnatural body,fused breasts,bad breasts,huge breasts,poorly drawn breasts,extra breasts,liquid breasts,heavy breasts,missing breasts,huge haunch,huge thighs,huge calf,bad hands,fused hand,missing hand,

参数设置:

迭代步数 (Steps):25

采样方法:DPM++ SDE Karras

重绘幅度:0.6

其他默认,点击生图。

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

然后,用这张图作为底图,做一些变化,先把底图放到reference模式里面,操作步骤和参数同上,

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

然后修改正向提示词:

功能1测试:更换衣服

正向词:

photo of woman,wispy blonde hair,perfect eyes,a sexy swimsuit,(detailed face:1.2),(flat chest:1.1),slight smile,walking,outdoor,nature,beautiful,wild flowers,natural skin,dusk,orange clouds,

8k uhd,high quality,ray tracing,(best quality),((masterpiece)),(highres),

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

功能2测试:更换背景,这边直接用泳装的正向提示词

正向词:

photo of woman,wispy blonde hair,perfect eyes,a sexy swimsuit,(detailed face:1.2),(flat chest:1.1),slight smile,outdoor,in the swimming pool,beautiful,a bright sky,baiyun,natural skin,

8k uhd,high quality,ray tracing,(best quality),((masterpiece)),(highres),

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

可以发现,它保持了底图的服装面料和主体的状态,效果堪比Lora。如果要更多更精确的图片可以批量生成,做挑选会更棒!

功能3测试:更换动作,这里要用到openpose控制模型搭配

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

正向词:

photo of woman,wispy blonde hair,perfect eyes,simple long knitted tight-fitting shift dress,(detailed face:1.2),(flat chest:1.1),slight smile,outdoor,nature,beautiful,wild flowers,natural skin,dusk,

8k uhd,high quality,ray tracing,(best quality),((masterpiece)),(highres),

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

场景的细节还是有点瑕疵,不过大体上还是与原底图匹配,如果觉得差别有点大,我们可以通过调整prompt提示词进行修改。

另外还可以调整controlnet中,两个单元的引导介入时机和退出时机,比如这里,AI重绘基本是先根据openpose骨架图,确定任务的姿态,然后再通过稳定扩散分布进行生成,那么可以把reference介入时机可以调后一点,效果可能会更吻合。

功能4测试:改变画风,

基于上面的图,做个2.5次元的看看吧,放到reference,换一个模型:Anything_V5,其他参数不变,测试看看。

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物
Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

风格来说,还是比较稳定的,概率也比较大,可以通过调整提示词,生成更大量的图片,来进行筛选。想生成2次元的同学也是可以自己做一下测试,大家一起交流。

5、现在测试一下二次元帅哥,效果如何。

先在网上找一张图片,

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

然后,用这张图作为底图,做一些变化,先把底图放到reference模式里面,操作步骤和参数同上,

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

型为Anything_V5等,调整提示词,

正向词:

a boy,wearing clothes,

(best quality),((masterpiece)),(highres),(an extremely delicate and beautiful),original,extremely detailed wallpaper,

反向词:

(naked:1.3),(multi-handed:1.4),worstquality,low quality,normal quality,jpegartifacts,signature,watermark,username,blurry,bad feet,bad_anatomy,bad_feet,bad_hands,bad_perspective,bad_proportions,error,extra_arms,extra_ears,extra_eyes,extra_mouth,feet_out_of_frame,foot_out_of_frame,greyscale,(head_out_of_frame:1.3),out-of-frame_censoring,out_of_frame,wrong_feet,

其他参数默认即可,点击生图

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物

这里的关键词只写了:aboy,wearing clothes,一个穿着衣服的男孩,如果需要做更多精细化的调整,可以通过调整提示词来匹配,这样会更接近理想的效果。

6、总结:

reference对图片的扩散分布引导的效果还是比较不错的,如果是人像,搭配上roop插件,在保持画风等效果一致上面,其实还是很不错的,炼丹Lora的同学,也可以将二者进行结合,相信可以更精准的控制图片的重绘导向。在电商的产品的应用上,也可以做一些尝试,保持产品统一,产品的场景图的风格的统一等等,上面也只是做一些基础的尝试,一个功能的革新,有时候是可以升级一次设计思维。

公众号回复「KKSD」获取SD资料包!

免责声明:以上资源皆来源于互联网公开分享的内容,仅用于个人学习使用,请禁止用于商业用途和倒卖,如真正需要,请支持版权方。

Stable Diffusion | ControlNet:Reference“垫图”功能,不炼丹也能保持同一人物
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
AIGC

Stable Diffusion | ControlNet控制:midjourney没有的功能

2023-10-16 17:50:45

AIGC

Stable Diffusion | 提示词:还在复制别人的提示词?

2023-10-16 17:50:58

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索