CivArchive
    SDXL LoRA train(8GB) and Checkpoint finetune(16GB) - v2.0
    NSFW
    Preview 1794184

    Credit:

    This script package from bdsqlsz

    use kohya-ss/sd-scripts (github.com) for core

    original script from Akegarasu/lora-scripts: LoRA training scripts use kohya-ss's trainer, for diffusion model. (github.com)

    How to use:

    0、(windows)Give unrestricted script access to powershell so venv can work:

    • Open an administrator powershell window

    • Type Set-ExecutionPolicy Unrestricted and answer A

    • Close admin powershell window

    1、Unzip this to anyway you want(Recommend with other train program which has venv)

    if you Update it,just Rerun install-cn-qinglong.ps1.then enter N

    2、Run install-cn-qinglong.ps1 in windows(linux just use commnd line)

    it will automatically install environment(if you has venv,just put to over it)

    3、Put your datesets in /input dir.

    a formattting:
    ./input/2_lora/(datasets images)

    4、Run tagger.ps1 for tagger them,automatically.(linux use tagger.sh)

    5、Edit your datesets if your want

    6、Edit train script(train_8Glora or train_16G_DB)(linux use train_tacanime)

    just for

    1. train_mode(lora、db、sdxl_lora、sdxl_db、cn3l)

    2. pretrained_model

    3. train_data_dir

      a formatting ./input/

    4. resolution(SDXL for 1024*1024,sd1.5 for 576*576)

    5. max and min bucket repo(SDXL 640~1536,sd1.5:256~1024)

    6. optimizer(SDXL:adaFactor for batch size1,Pagedadamw8bit for batch size 4)

    other dont need more change if you dont know it

    if i can help you ,i will very happy that~

    Support 青龍聖者@bdsqlsz on Ko-fi! ❤️. ko-fi.com/bdsqlsz - Ko-fi ❤️ Where creators get support from fans through donations, memberships, shop sales and more! The original 'Buy Me a Coffee' Page.

    Description

    fixed noise offset

    add instal.bash for linux

    FAQ

    Comments (7)

    CyberDickLangJul 30, 2023
    CivitAI

    妈呀中午刚用1.0,晚上就变成2.0了

    bdsqlsz
    Author
    Jul 30, 2023

    紧急修复了一个BUG...

    CyberDickLangJul 31, 2023

    @bdsqlsz 666 对了大佬 为什么我用sd-webui加载lora会报错提示不是使用 “sd-scrpits”训练的模型,使用comfyui就没有问题,我自己练的模型和下载的lora都是这样无法生效

    bdsqlsz
    Author
    Jul 31, 2023

    @CyberDickLang 那不就是webui的问题。。。

    MixbagxJul 31, 2023· 1 reaction
    CivitAI

    great . I want to use prodigy , (i am editing my comment), shall i just change the optimizer type to prodigy? i can see

    if($optimizer_type -ieq "Prodigy") {

    [void]$ext_args.Add("--optimizer_type=$optimizer_type")

    [void]$ext_args.Add("--optimizer_args")

    [void]$ext_args.Add("weight_decay=0.01")

    [void]$ext_args.Add("decouple=True")

    [void]$ext_args.Add("use_bias_correction=True")

    [void]$ext_args.Add("d_coef=$d_coef")

    if($lr_warmup_steps){

    [void]$ext_args.Add("safeguard_warmup=True")

    }

    if($d0){

    [void]$ext_args.Add("d0=$d0")

    }

    $lr = "1"

    if ($unet_lr) {

    $unet_lr = $lr

    }

    if ($text_encoder_lr) {

    $text_encoder_lr = $lr

    }

    }

    are already written in your script . Shall i just change the lr to 1 and optimizer type to prodigy?

    bdsqlsz
    Author
    Jul 31, 2023

    i had writen it automatically...you dont need change below that change line...
    just change $optimizer=""

    devajyoti151Jul 31, 2023· 2 reactions
    CivitAI

    got it working after installing tensorflow . training now with adafactor and lycoris

    Other
    SDXL 1.0

    Details

    Downloads
    140
    Platform
    CivitAI
    Platform Status
    Available
    Created
    7/30/2023
    Updated
    5/13/2026
    Deleted
    -

    Files

    sdxlLoraTrain8GBAnd_v20.zip

    Mirrors

    CivitAI (1 mirrors)

    Available On (1 platform)

    Same model published on other platforms. May have additional downloads or version variants.