CivArchive
    Preview 131287900
    Preview 131287920
    Preview 131288091
    Preview 131288099
    Preview 131288101
    Preview 131288143
    Preview 131288257
    Preview 131288233
    Preview 131287932
    Preview 131292624

    Aesthetic Quality Modifiers - Masterpiece

    Training data is a subset of all my manually rated datasets with the quality/aesthetic modifiers, including only the masterpiece tagged images.

    ℹ️ LoRA work best when applied to the base models on which they are trained. Please read the About This Version on the appropriate base models, trigger usage, and workflow/training information.

    Recommended prompt structure:

    Positive prompt (quality tags at the start of prompt):

    masterpiece, best quality, very aesthetic, {{tags}}, {{natural language}}

    Description

    Trained on Anima Base 1

    Same dataset as v5.0 with a mix of natural language and tag captions.

    386 images, all masterpiece tagged images trained in Kirazuri (Anima) model version 2 dataset.

    Partitioned and trained at multi-res 1024, 1280, 1536

    Trained for 1,413 Steps, 3 Epochs.

    Training config:

    # trained using diffusion-pipe commit b0aa4f1e03169f3280c8518d37570a448420f8be
    # NCCL_P2P_DISABLE="1" NCCL_IB_DISABLE="1" NCCL_CUMEM_ENABLE="0" deepspeed --num_gpus=1 train.py --deepspeed --config anima-lora.toml --i_know_what_i_am_doing
    
    output_dir = '/mnt/d/anima/training_output/anima-base-1-masterpiece-v51'
    
    dataset = 'dataset-anima-masterpiece.toml'
    
    # training settings
    epochs = 3
    # Per-resolution batch sizes
    micro_batch_size_per_gpu = [[1024, 32], [1280, 24], [1536, 16]]
    pipeline_stages = 1
    gradient_accumulation_steps = 1
    gradient_clipping = 1
    warmup_steps = 30
    lr_scheduler = 'cosine'
    
    # misc settings
    save_every_n_epochs = 1
    activation_checkpointing = true
    #reentrant_activation_checkpointing = true
    
    partition_method = 'parameters'
    
    save_dtype = 'bfloat16'
    caching_batch_size = 1
    map_num_proc = 8
    steps_per_print = 1
    compile = true
    
    [model]
    type = 'anima'
    transformer_path = '/mnt/c/workspace/models/diffusion_models/anima-base-v1.0.safetensors'
    vae_path = '/mnt/c/workspace/models/vae/qwen_image_vae.safetensors'
    llm_path = '/mnt/c/workspace/models/text_encoders/qwen_3_06b_base.safetensors'
    dtype = 'bfloat16'
    #cache_text_embeddings = false
    llm_adapter_lr = 0
    #timestep_sample_method = 'uniform'
    flux_shift = true
    multiscale_loss_weight = 0.5
    sigmoid_scale = 1.3
    
    [adapter]
    type = 'lora'
    rank = 32
    dtype = 'bfloat16'
    
    [optimizer]
    type = 'adamw_optimi'
    lr = 4e-5
    betas = [0.9, 0.99]
    weight_decay = 0.01
    eps = 1e-8
    resolutions = [1024, 1280, 1536]
    
    enable_ar_bucket = true
    min_ar = 0.5
    max_ar = 2.0
    num_ar_buckets = 9
    
    # Totals
    # 386 images
    # 16 repeats from captions.json
    
    # 153 images
    [[directory]]
    path = '/mnt/d/training_data/0_masterpieces_kirazuri/1536x1536'
    resolutions = [1024, 1280, 1536]
    
    # 44 images
    [[directory]]
    path = '/mnt/d/training_data/0_masterpieces_kirazuri/1280x1280'
    resolutions = [1024, 1280]
    
    # 189 images
    [[directory]]
    path = '/mnt/d/training_data/0_masterpieces_kirazuri/1024x1024'
    resolutions = [1024]
    

    FAQ

    Comments (7)

    And233May 20, 2026· 2 reactions
    CivitAI

    i see you have a fixed warmup and a strange epoch in 'about this version'. so what is the total epoch and warmup steps you actually use?

    motimalu
    Author
    May 20, 2026

    Hi @And233, yes for the cosine lr scheduler tried to determine an appropriate total epoch target.
    Warmup 30 steps, total 1,413 Steps over 3 Epochs is what I used.
    16 repeats and multiple resolution buckets so the highest res 1536 dataset is sampled at 16 repeats x 3 res buckets x 3 epochs = 144 total samples/image.
    Would be simpler if not using cosine or using cosine with restarts, could train as long as desired and select the best epoch, but I found a lower lr works better for small details and don't want to bother with multiple runs for a LoRA.

    And233May 21, 2026

    @motimalu what about style training? i saw your reply under your impasto lora, you said it used 49 epochs, is it the max epochs? since cosine scheduler is affected by it

    motimalu
    Author
    May 21, 2026· 1 reaction

    @And233 Hey yes that was three months ago using a fork of diffusion-pipe that accepted different config settings, cosine also wasn't available as a lr scheduler at that time in the main repository either.

    I plan to write an article to try to make this clearer since I often experiment with different settings / trainers and much of it is dependent on the underlying code and dataset setup, no guarantees that it works well or at all really.

    With that in mind I'd advise to follow the circlestone labs example training config for Anima rather than what I share since it is mostly for transparency and my own record keeping.

    And233May 21, 2026

    @motimalu have you tried or will you try other optimizer? like CAME? in my test, CAME might be better than adam. at least i can get a little lower vram usage and better loss with similar result. ( i know the loss doesnt show anything in this kind of training)

    ACatStickMay 31, 2026· 2 reactions
    CivitAI

    Hi, the model you trained on base1.0 is still as excellent as ever. I noticed that in the "About this version" section of base1.0, it mentions "16 repeats from captions.json." Does this mean you used up to sixteen different caption mixes to train this LoRA? I'm curious about the specific forms of captions used, and whether this improves the model's generalization during inference. So far, I've only tried mixing four types of captions to train a LoRA, and I'm unsure about the best approach for diverse captioning methods. I'd love to hear your thoughts. I would be very grateful if you could answer my questions.

    motimalu
    Author
    Jun 1, 2026· 3 reactions

    Hello, thank you for the high praise.
    Yes the idea is to improve the models generalization during inference and reduce the risk of overfitting.
    The 16 repeats were 4 variants of this formatting per image key in the the captions.json:

    {tags}
    {first_n_tags}.\n{nl_caption}
    {dropout_tags1}.\n{nl_caption}
    {nl_caption}\n{dropout_tags2}

    So it is also technically just 4 different variants, repeated 4x to ensure random tag dropouts and shuffles across the entire training run since it is a little more efficient to do that with pre-caching.

    It's kind of overkill for a short training run, I test the approach with a LoRA with the intent to scale it to a 100x dataset size & full finetune.

    The script I used to generate the captions.json: https://gist.github.com/motimalu/08ecfb90e1b4088e7d863b706da7a3ff

    It shouldn't have any destructive file operations, but the general advice to not run anything on your computer that you don't understand applies.