当前位置:   article > 正文

StableDiffusion-02 LoRA上手使用实测 尝试生成图片 使用多个LoRA 调整LoRA效果 10分钟上手 多图_lora生成图

lora生成图

准备工作

请你确保,你已经完成了 StableDiffusion-01 这一节的内容,可以顺利的运行SD,并且可以正常的生成图片。
本节我们就尝试使用LoRA并生成图片。

介绍 LoRA

Stable Diffusion中的LoRA(Low-Rank Adaptation,低秩自适应)是一种针对大型模型微调的技术,旨在加速模型的训练过程并显著减少模型文件的存储成本。这项技术通过冻结原有基础模型的权重层并重新计算,实现了快速的训练速度和较小的模型文件大小,从而提高了训练效率和降低了存储成本。

下载 LoRA

这种左上角写:LoRA的,便是我们要下载的模型,你可以自己挑选喜欢的。
请添加图片描述

可以在网上下载到关于Lora的模型,相比于实际的模型,它会小很多。
选择 Lora选项卡:
在这里插入图片描述
可以看到我们需要把LoRA放到目录下,目前我下载了:五彩斑斓_1.0.safetensors
把该文件,放到上述的xxx/models/lora目录下即可

加载LoRA

重启你的服务,这个时候重新选择LoRA选项卡就可以看到了
在这里插入图片描述

使用 LoRA

此时点击该 Lora就会看到,Prompt提示词中多了:

<lora:新蜡笔:1>
  • 1

此时,我们继续往提示词中添加内容即可:

<lora:新蜡笔:1>, xxxxx(你的提示词,:1表示占比,可以降低比如:0.7)
  • 1

按照上一节,我们的配置,生成图片:
在这里插入图片描述

测试案例

Prompt

<lora:新蜡笔:1>, Fashion Girl, (height: 1.1) , (color: 0.9) , (masterpiece: 1.2) , extremely complex, best quality, detail, 8k, height, 1 girl, mature female, short hair, real light source, focus person lens, close-up, uP front, subjective perspective, male focus, looking at the audience, solo, medium lens, define 'real' light source, straight line, (above: 0.9) , (over-the-shoulder shot) , (chest: 1.1) , Tall Woman, (crotch: 1.1) , shot from a distance, looking away, gradation of hair, indigo eyes, delicate eyes, shy expression, (a slim woman standing on the observation deck: 1.1) , view from a tall observation tower, (wearing a light-colored Jyoshi Kousei suit: 1.05) , (thick-waisted shirt) , (pleated skirt) , aloof expression, small breasts, outdoor, landscape, trees, plants, lakes, (Blue Sky: 0.3) ,
  • 1

Negative Prompt

nsfw,yallow,(((pubic))), ((((pubic_hair)))),sketch, duplicate, ugly, huge eyes, text, logo, monochrome, worst face, (bad and mutated hands:1.3), (worst quality:1.7), (low quality:1.7), (blurry:1.7),horror, geometry, bad_prompt, (bad hands), (missing fingers), multiple limbs, bad anatomy, (interlocked fingers:1.2),(interlocked leg:1.2), Ugly Fingers, (extra digit and hands and fingers and legs and arms:1.4), crown braid,, (deformed fingers:1.2), (long fingers:1.2),succubus wings,horn,succubus horn,succubus hairstyle, (bad-artist-anime), bad-artist, bad hand,
  • 1

其他参数

保持和上一节一致即可,详见 StableDiffusion-01中的内容。

生成图片

在这里插入图片描述

多LoRA

同理,我们下载多个 LoRA,放到指定的目录,即可看到:
在这里插入图片描述

多LoRA案例

调整 LoRA的占比
LoRA列表,这次选择两个,分别配置占比为1和0.4

Prompt

 <lora:新蜡笔:1> <lora:gfzzjl-SDXL:0.4>,girl swims underwater,hyper detailed render style,glow,yellow,blue,brush,surreal oil painting,shiny eyes,head closeup,exaggerated perspective,tyndall effect,water drops,mother of pearl iridescence,holographic white,black background,
  • 1

Negative Prompt

sketches, (worst quality:2), (low quality:2), (normal quality:2), lowers, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, bad anatomy,DeepNegative,(fat:1.2),facing away, looking away,tilted head, bad anatomy,bad hands, text, error, missing fingers,extra digit, fewer digits, cropped, worst quality, low quality, normal quality,jpeg artifacts,signature, watermark, username,blurry,bad feet,cropped,poorly drawn hands,poorly drawn face,mutation,deformed,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,extra fingers,fewer digits,extra limbs,extra arms,extra legs,malformed limbs,fused fingers,too many fingers,long neck,cross-eyed,mutated hands,bad body,bad proportions,gross proportions,text,error,missing fingers,missing arms,missing legs,extra digit, extra arms, extra leg, extra foot
  • 1

出图结果

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/620189
推荐阅读
相关标签
  

闽ICP备14008679号