Formidable-Azur-Lane

我要开发同款
匿名用户2024年07月31日
86阅读

技术信息

开源地址
https://modelscope.cn/models/sd_lora/Formidable-Azur-Lane
授权协议
Apache License 2.0

作品详情

2023.05.30:

  • 使用金字塔噪声,增加图像质量。

  • Applyig "Diffusio With Offset Noise" to ehace image quality.

  • 尝试加强腰部附着物的拟合程度,代价是没有头部的图像出现概率变大。

  • Attemptig to improve the fit of waist attachmets, at the cost of icreased probability of images without heads.

  • 如果出现没有头部的图像,请尝试在负面提示词添加lower body

  • If images without heads occur, please try addig 'lower body' to the egative prompt.

2023.04.22:

  • 重新校对文本集,提示词的准确有所上升。

  • Reviewed the text dataset agai, ad the accuracy of prompt words has improved.

  • 增加训练步数,提升拟合程度。

  • Icreased the umber of traiig steps to improve the fittig level.

2023.04.13:

这是我第一次进行LoRA训练,出现问题的地方我未必知道如何解决。

This is my first time traiig with LoRA, ad there may be issues that I am ot sure how to solve.

~~大就是好。~~

~~bigger is better.~~

?

Traiig Set:

  • umber of repeats = 2

    • close-up = 10

    • portrait = 10

    • upper body = 10

    • lower_body=10

    • cowboy shot = 10

    • full body = 10

    • pose = 15

    • other clothig = 10

    • oramet_waist = 10

  • umber of repeats = 4

    • sfw = 30

    • chibi = 5

  • umber of images = 130

  • umber of epochs = 19

    !/bi/bash

    LoRA trai script by @Akegarasu

    Trai data path | 设置训练用模型、图片

    pretraiedmodel="./sd-models/model.ckpt" # base model path | 底模路径 isv2model=0 # SD2.0 model | SD2.0模型 2.0模型下 clipskip 默认无效 parameterizatio=0 # parameterizatio | 参数化 本参数需要和 V2 参数同步使用 实验性功能 traidatadir="./trai/1.formidable-default" # trai dataset path | 训练数据集路径 regdatadir="" # directory for regularizatio images | 正则化数据集路径,默认不使用正则化图像。

    Network settigs | 网络设置

    etworkmodule="etworks.lora" # 在这里将会设置训练的网络种类,默认为 etworks.lora 也就是 LoRA 训练。如果你想训练 LyCORIS(LoCo、LoHa) 等,则修改这个值为 lycoris.kohya etworkweights="" # pretraied weights for LoRA etwork | 若需要从已有的 LoRA 模型上继续训练,请填写 LoRA 模型路径。 etworkdim=32 # etwork dim | 常用 4~128,不是越大越好 etworkalpha=16 # etwork alpha | 常用与 etworkdim 相同的值或者采用较小的值,如 etworkdim的一半 防止下溢。默认值为 1,使用较小的 alpha 需要提升学习率。

    Trai related params | 训练相关参数

    resolutio="768,768" # image resolutio w,h. 图片分辨率,宽,高。支持非正方形,但必须是 64 倍数。 batchsize=2 # batch size maxtraiepoches=20 # max trai epoches | 最大训练 epoch saveeveryepochs=1 # save every epochs | 每 N 个 epoch 保存一次

    traiuetoly=0 # trai U-Net oly | 仅训练 U-Net,开启这个会牺牲效果大幅减少显存使用。6G显存可以开启 traitextecoderoly=0 # trai Text Ecoder oly | 仅训练 文本编码器 stoptextecodertraiig=0 # stop text ecoder traiig | 在第N步时停止训练文本编码器

    噪音

    oiseoffset="0" # oise offset | 在训练中添加噪声偏移来改良生成非常暗或者非常亮的图像,如果启用,推荐参数为0.1 keeptokes=2 # keep headig N tokes whe shufflig captio tokes | 在随机打乱 tokes 时,保留前 N 个不变。 misrgamma=0 # miimum sigal-to-oise ratio (SNR) value for gamma-ray | 伽马射线事件的最小信噪比(SNR)值 默认为 0

    金字塔噪声

    multiresoiseiteratios=6 # 多分辨率(金字塔)噪声迭代次数 推荐 6-10。无法与 oiseoffset 一同启用。 multiresoisediscout=0.3 # 多分辨率(金字塔)衰减率 推荐 0.3,须同时与上方参数 multiresoise_iteratios 一同启用。

    Learig rate | 学习率

    lr="3.5e-5" # 3.5e-5=3.510^(-5)=0.000035 uetlr="3.5e-5" # 3.5e-5=3.510^(-5)=0.000035 textecoderlr="3e-6" # 3e-6=3.0*10^(-6)=0.000003 lrscheduler="cosiewithrestarts" # "liear", "cosie", "cosiewithrestarts", "polyomial", "costat", "costatwithwarmup", "adafactor" lrwarmupsteps=0 # warmup steps | 学习率预热步数,lrscheduler 为 costat 或 adafactor 时该值需要设为0。 lrrestartcycles=1 # cosiewithrestarts restart cycles | 余弦退火重启次数,仅在 lrscheduler 为 cosiewithrestarts 时起效。

    Output settigs | 输出设置

    outputame="1.formidable-default" # output model ame | 模型保存名称 savemodel_as="safetesors" # model save ext | 模型保存格式 ckpt, pt, safetesors

    Resume traiig state | 恢复训练设置

    savestate=0 # save state | 保存训练状态 名称类似于 -??????-state ?????? 表示 epoch 数 resume="" # resume from state | 从某个状态文件夹中恢复训练 需配合上方参数同时使用 由于规范文件限制 epoch 数和全局步数不会保存 即使恢复时它们也从 1 开始 与 etworkweights 的具体实现操作并不一致

    其他设置

    mibucketreso=256 # arb mi resolutio | arb 最小分辨率 maxbucketreso=1024 # arb max resolutio | arb 最大分辨率 persistetdataloaderworkers=0 # persistet dataloader workers | 容易爆内存,保留加载训练集的worker,减少每个 epoch 之间的停顿 clipskip=2 # clip skip | 玄学 一般用 2

    优化器设置

    optimizer_type="Lio" # Optimizer type | 优化器类型 默认为 AdamW8bit,可选:AdamW AdamW8bit Lio SGDNesterov SGDNesterov8bit DAdaptatio AdaFactor

    LyCORIS 训练设置

    algo="lora" # LyCORIS etwork algo | LyCORIS 网络算法 可选 lora、loha、lokr、ia3、dylora。lora即为loco covdim=4 # cov dim | 类似于 etworkdim,推荐为 4 covalpha=4 # cov alpha | 类似于 etworkalpha,可以采用与 cov_dim 一致或者更小的值 dropout="0" # dropout | dropout 概率, 0 为不使用 dropout, 越大则 dropout 越多,推荐 0~0.5, LoHa/LoKr/(IA)^3暂时不支持

功能介绍

2023.05.30: 使用金字塔噪声,增加图像质量。 Applying "Diffusion With Offset Noise" to enhance image quality. 尝试加强腰部

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论