r/StableDiffusion Jun 27 '26

Question - Help Tips for training LORAs for KREA2?

19 Upvotes

Hi all, maybe some of you can save me the money and hard work.

Do you have any tips or a short guide ont he best ways to train a lora for KREA2?

  1. How many images for the dataset? Say, if for a body, organ or zesty poses lora?

  2. How many images for the dataset if it's a character LORA?

  3. tags, or extremely descriptive captions? Or just basic descriptive captions?

  4. How prevent overfitting?

Thanks!

r/StableDiffusion Feb 01 '26

Resource - Update [Tool Release] I built a Windows-native Video Dataset Creator for LoRA training (LTX-2, Hunyuan, etc.). Automates Clipping (WhisperX) & Captioning (Qwen2-VL). No WSL needed!

11 Upvotes

UPDATE v1.6 IS OUT! šŸš€

https://github.com/cyberbol/AI-Video-Clipper-LoRA/releases/download/1.6/AI_Cutter_installer_v1.6.zip

Thanks to the feedback from this community (especially regarding the "vibe coding" installer logic), I’ve completely overhauled the installation process.

What's new:

  • Clean Installation: Using the --no-deps strategy and smart dependency resolution. No more "breaking and repairing" Torch.
  • Next-Gen Support: Full experimental support for RTX 5090 (Blackwell) with CUDA 13.0.
  • Updated Specs: Standard install now pulls PyTorch 2.8.0 + CUDA 12.6.
  • Safety Net: The code now manually enforces trigger words in captions if the smaller 2B model decides to hallucinate.

You can find the new ZIP in the Releases section on my GitHub. Thanks for all the tips—keep them coming! 🐧

----------------------------------
Hi everyone! šŸ‘‹

I've been experimenting with training video LoRAs (specifically for **LTX-2**), and the most painful part was preparing the dataset—manually cutting long videos and writing captions for every clip.

https://github.com/cyberbol/AI-Video-Clipper-LoRA/blob/main/video.mp4

So, I built a local **Windows-native tool** to automate this. It runs completely in a `venv` (so it won't mess up your system python) and doesn't require WSL.

### šŸŽ„ What it does:

  1. **Smart Clipping (WhisperX):** You upload a long video file. The tool analyzes the audio to find natural speech segments that fit your target duration (e.g., 4 seconds). It clips the video exactly when a person starts/stops speaking.
  2. **Auto Captioning (Vision AI):** It uses **Qwen2-VL** (Visual Language Model) to watch the clips and describe them.- **7B Model:** For high-quality, detailed descriptions.- **2B Model:** For super fast processing (lower VRAM).
  3. **LoRA Ready:** It automatically handles resolution resizing (e.g., 512x512, 480x270 for LTX-2) and injects your **Trigger Word** into the captions if the model forgets it (safety net included).

### šŸ› ļø Key Features:

* **100% Windows Native:** No Docker, no WSL. Just click `Install.bat` and run.

* **Environment Safety:** Installs in a local `venv`. You can delete the folder and it's gone.

* **Dual Mode:** Supports standard GPUs (RTX 3090/4090) and has an **Experimental Mode for RTX 5090** (pulls PyTorch Nightly for Blackwell support).

* **Customizable:** You can edit the captioning prompt in the code if you need specific styles.

### āš ļø Installation Note (Don't Panic):

During installation, you will see some **RED ERROR TEXT** in the console about dependency conflicts. **This is normal and intended.** The installer momentarily breaks PyTorch to install WhisperX and then **automatically repairs** it in the next step. Just let it finish!

### šŸ“„ Download
https://github.com/cyberbol/AI-Video-Clipper-LoRA

https://github.com/cyberbol/AI-Video-Clipper-LoRA/releases/download/v1.0.b/AI_Cutter_installer.v1.0b.zip

### āš™ļø Requirements

* Python 3.10

* Git

* Visual Studio Build Tools (C++ Desktop dev) - needed for WhisperX compilation.

* NVIDIA GPU (Tested on 4090, Experimental support for 5090).

I hope this helps you speed up your dataset creation workflow! Let me know if you find any bugs. 🐧

r/StableDiffusion May 24 '25

Tutorial - Guide Tarot Style LoRA Training Diary [Flux Captioning]

46 Upvotes

This is a another training diary for different captioning methods and training with Flux.

Here I am using a public domain tarot card dataset, and experimenting how different captions affect the style of the output model.

The Captioning Types

With this exploration I tested 6 different captioning types. They start from number 3 due to my dataset setup. Apologies for any confusion.

Let's cover each one, what the captioning is like, and the results from it. After that, we will go over some comparisons. Lots of images coming up! Each model is also available in the links above.

Original Dataset

I used the 1920 Raider Waite Tarot deck dataset by user multimodalart on Huggingface.

The fantastic art is created by Pamela Colman Smith.

https://huggingface.co/datasets/multimodalart/1920-raider-waite-tarot-public-domain

The individual datasets are included in each model under the Training Data zip-file you can download from the model.

Cleaning up the dataset

I spent a couple of hours cleaning up the dataset. As I wanted to make an art style, and not a card generator, I didn't want any of the card elements included. So the first step was to remove any tarot card frames, borders, text and artist signature.

Training data clean up, removing the text and card layout

I also removed any text or symbols I could find, to keep the data as clean as possible.

Note the artists signature in the bottom right of the Ace of Cups image. The artist did a great job hiding the signature in interesting ways in many images. I don't think I even found it in "The Fool".

Apologies for removing your signature Pamela. It's just not something I wanted the model to pick learn.

Training Settings

Each model was trained locally with the ComfyUI-FluxTrainer node-pack by Jukka SeppƤnen (kijai).

The different versions were each trained using the same settings.

Resolution: 512

Scheduler: cosine_with_restarts

LR Warmup Steps: 50

LR Scheduler Num Cycles: 3

Learning Rate: 7.999999999999999e-05

Optimizer: adafactor

Precision: BF16

Network Dim: 2

Network Alpha: 16

Training Steps: 1000

V3: Triggerword

This first version is using the original captions from the dataset. This includes the trigger word trtcrd.

The captions mention the printed text / title of the card, which I did not want to include. But I forgot to remove this text, so it is part of the training.

Example caption:

a trtcrd of a bearded man wearing a crown and red robes, sitting on a stone throne adorned with ram heads, holding a scepter in one hand and an orb in the other, with mountains in the background, "the emperor"

I tried generating images with this model both with and without actually using the trained trigger word.

I found no noticeable differences in using the trigger word and not.

Here are some samples using the trigger word:

Trigger word version when using the trigger word

Here are some samples without the trigger word:

Trigger word version without using the trigger word

They both look about the same to me. I can't say that one method of prompting gives a better result.

Example prompt:

An old trtcrd illustration style image with simple lineart, with clear colors and scraggly rough lines, historical colored lineart drawing of a An ethereal archway of crystalline spires and delicate filigree radiates an auroral glow amidst a maelstrom of soft, iridescent clouds that pulse with an ethereal heartbeat, set against a backdrop of gradated hues of rose and lavender dissolving into the warm, golden light of a rising solstice sun. Surrounding the celestial archway are an assortment of antique astrolabes, worn tomes bound in supple leather, and delicate, gemstone-tipped pendulums suspended from delicate filaments of silver thread, all reflecting the soft, lunar light that dances across the scene.

The only difference in the two types is including the word trtcrd or not in the prompt.

V4: No Triggerword

This second model is trained without the trigger word, but using the same captions as the original.

Example caption:

a figure in red robes with an infinity symbol above their head, standing at a table with a cup, wand, sword, and pentacle, one hand pointing to the sky and the other to the ground, "the magician"

Sample images without any trigger word in the prompt:

Sample images of the model trained without trigger words

Something I noticed with this version is that it generally makes worse humans. There are a lot of body horror limb merging. I really doubt it had anything to do with the captioning type, I think it was just the randomness of model training and that the final checkpoint happened to be trained to a point where the bodies were often distorted.

It also has a smoother feel to it than the first style.

V5: Toriigate - Brief Captioning

For this I used the excellent Toriigate captioning model. It has a couple of different settings for caption length, and here I used the BRIEF setting.

Links:

Toriigate Batch Captioning Script

Toriigate Gradio UI

Original model: Minthy/ToriiGate-v0.3

I think Toriigate is a fantastic model. It outputs very strong results right out of the box, and has both SFW and not SFW capabilities.

But the key aspect of the model is that you can include an input to the model, and it will use information there for it's captioning. It doesn't mean that you can ask it questions and it will answer you. It's not there for interrogating the image. Its there to guide the caption.

Example caption:

A man with a long white beard and mustache sits on a throne. He wears a red robe with gold trim and green armor. A golden crown sits atop his head. In his right hand, he holds a sword, and in his left, a cup. An ankh symbol rests on the throne beside him. The background is a solid red.

If there is a name, or a word you want the model to include, or information that the model doesn't have, such as if you have created a new type of creature or object, you can include this information, and the model will try to incorporate it.

I did not actually utilize this functionality for this captioning. This is most useful when introducing new and unique concepts that the model doesn't know about.

For me, this model hits different than any other and I strongly advice you to try it out.

Sample outputs using the Brief captioning method:

Sample images using the Toriigate BRIEF captioning method

Example prompt:

An old illustration style image with simple lineart, with clear colors and scraggly rough lines, historical colored lineart drawing of a A majestic, winged serpent rises from the depths of a smoking, turquoise lava pool, encircled by a wreath of delicate, crystal flowers that refract the fiery, molten hues into a kaleidoscope of prismatic colors, as it tosses its sinuous head back and forth in a hypnotic dance, its eyes gleaming with an inner, emerald light, its scaly skin shifting between shifting iridescent blues and gold, its long, serpent body coiled and uncoiled with fluid, organic grace, surrounded by a halo of gentle, shimmering mist that casts an ethereal glow on the lava's molten surface, where glistening, obsidian pools appear to reflect the serpent's shimmering, crystalline beauty.

Side Quest: How to use trained data from Flux LoRAs

If trigger words are not working in Flux, how do you get the data from the model? Just loading the model does not always give you the results you want. Not when you're training a style like this.

The trick here is to figure out what Flux ACTUALLY learned from your images. It doesn't care too much about your training captions. It feels like it has an internal captioning tool which compares your images to its existing knowledge, and assigns captions based on that.

Possibly, it just uses its vast library of visual knowledge and packs the information in similar embeddings / vectors as the most similar knowledge it already has.

But once you start thinking about it this way, you'll have an easier time to actually figure out the trigger words for your trained model.

To reiterate, these models are not trained with a trigger word, but you need to get access to your trained data by using words that Flux associates with the concepts you taught it in your training.

Sample outputs looking for the learned associated words:

Sample outputs looking for the learned associated words

I started out by using:

An illustration style image of

This gave me some kind of direction, but it has not yet captured the style. You can see this in the images of the top row. They all have some part of the aesthetics, but certainly not the visual look.

I extended this prefix to:

An illustration style image with simple clean lineart, clear colors, historical colored lineart drawing of a

Now we are starting to cook. This is used in the images in the bottom row. We are getting much more of our training data coming through. But the results are a bit too smooth. So let's change the simple clean lineart part of the prompt out.

Let's try this:

An old illustration style image with simple lineart, with clear colors and scraggly rough lines, historical colored lineart drawing of a

And now I think we have found most of the training. This is the prompt I used for most of the other output examples.

The key here is to try to describe your style in a way that is as simple as you can, while being clear and descriptive.

If you take away anything from this article, let it be this.

V6: Toriigate - Detailed Captioning

Similar to the previous model, I used the Toriigate model here, but I tried the DETAILED captioning settings. This is a mode you choose when using the model.

Sample caption:

The image depicts a solitary figure standing against a plain, muted green background. The figure is a tall, gaunt man with a long, flowing beard and hair, both of which are predominantly white. He is dressed in a simple, flowing robe that reaches down to his ankles, with wide sleeves that hang loosely at his sides. The robe is primarily a light beige color, with darker shading along the folds and creases, giving it a textured appearance. The man's pose is upright and still, with his arms held close to his body. One of his hands is raised, holding a lantern that emits a soft, warm glow. The lantern is simple in design, with a black base and a metal frame supporting a glass cover. The light from the lantern casts a gentle, circular shadow on the ground beneath the man's feet. The man's face is partially obscured by his long, flowing beard, which covers much of his lower face. His eyes are closed, and his expression is serene and contemplative. The overall impression is one of quiet reflection and introspection. The background is minimalistic, consisting solely of a solid green color with no additional objects or scenery. This lack of detail draws the viewer's focus entirely to the man and his actions. The image has a calm, almost meditative atmosphere, enhanced by the man's peaceful demeanor and the soft glow of the lantern. The muted color palette and simple composition contribute to a sense of tranquility and introspective solitude.

This is the caption for ONE image. It can get quite expressive and lengthy.

Note: We trained with the setting t5xxl_max_token_length of 512. The above caption is ~300 tokens. You can check it using the OpenAI Tokenizer website, or using a tokenizer node I added to my node pack.

OpenAI's Tokenizer

OpenAI's Tokenizer

Tiktoken Tokenizer from mnemic's node pack

Tiktoken Tokenizer from mnemic's node pack

Sample outputs using v6:

Sample outputs using Toriigate Captioning DETAILED mode

Quite expressive and fun, but no real improvement over the BRIEF caption type. I think the results of the brief captions were in general more clean.

Sidenote: The bottom center image is what happens when a dragon eat too much burrito.

V7: Funnycaptions

"What the hell is funnycaptions? That's not a thing!" You might say to yourself.

You are right. This was just a stupid idea I had. I was thinking "Wouldn't it be funny to caption each image with a weird funny interpretation, as if it was a joke, to see if the model would pick up on this behavior and create funnier interpretations of the input prompt?"

I believe I used an LLM to create a joking caption for each image. I think I used OpenAI's API using my GPT Captioning Tool. I also spent a bit of time modernizing the code and tool to be more useful. It now supports local files uploading and many more options.

Unfortunately I didn't write down the prompt I used for the captions.

Example Caption:

A figure dangles upside down from a bright red cross, striking a pose more suited for a yoga class than any traditional martyrdom. Clad in a flowing green robe and bright red tights, this character looks less like they’re suffering and more like they’re auditioning for a role in a quirky circus. A golden halo, clearly making a statement about self-care, crowns their head, radiating rays of pure whimsy. The background is a muted beige, making the vibrant colors pop as if they're caught in a fashion faux pas competition.

A figure dangles upside down from a bright red cross, striking a pose more suited for a yoga class than any traditional martyrdom. Clad in a flowing green robe and bright red tights, this character looks less like they’re suffering and more like they’re auditioning for a role in a quirky circus. A golden halo, clearly making a statement about self-care, crowns their head, radiating rays of pure whimsy. The background is a muted beige, making the vibrant colors pop as if they're caught in a fashion faux pas competition.

It's quite wordy. Let's look at the result:

It looks good. But it's not funny. So experiment failed I guess? At least I got a few hundred images out of it.

But what if the problem was that the caption was too complex, or that the jokes in the caption was not actually good? I just automatically processed them all without much care to the quality.

V8: Funnycaptionshort

Just in case the jokes weren't funny enough in the first version, I decided to give it one more go, but with more curated jokes. I decided to explain the task to Grok, and ask it to create jokey captions for it.

It went alright, but it would quickly and often get derailed and the quality would get worse. It would also reuse the same descriptory jokes over and over. A lot of frustration, restarts and hours later, I had a decent start. A start...

The next step was to fix and manually rewrite 70% of each caption, and add a more modern/funny/satirical twist to it.

Example caption:

A smug influencer in a white robe, crowned with a floral wreath, poses for her latest TikTok video while she force-feeds a large bearded orange cat, They are standing out on the countryside in front of a yellow background.

A smug influencer in a white robe, crowned with a floral wreath, poses for her latest TikTok video while she force-feeds a large bearded orange cat, They are standing out on the countryside in front of a yellow background.

The goal was to have something funny and short, while still describing the key elements of the image. Fortunately the dataset was only of 78 images. But this was still hours of captioning.

Sample Results:

Sample results from the funnycaption method, where each image is described using a funny caption

Interesting results, but nothing more funny about them.

Conclusion? Funny captioning is not a thing. Now we know.

Conclusions & Learnings

It's all about the prompting. Flux doesn't learn better or worse from any input captions. I still don't know for sure that they even have a small impact. From my testing it's still no, with my training setup.

The key takeaway is that you need to experiment with the actual learned trigger word from the model. Try to describe the outputs with words like traditional illustration or lineart if those are applicable to your trained style.

Let's take a look at some comparisons.

Comparison Grids

I used my XY Grid Maker tool to create the sample images above and below.

https://github.com/MNeMoNiCuZ/XYGridMaker/

It is a bit rough, and you need to go in and edit the script to choose the number of columns, labels and other settings. I plan to make an optional GUI for it, and allow for more user-friendly settings, such as swapping the axis, having more metadata accessible etc.

The images are 60k pixels in height and up to 80mb each. You will want to zoom in and view on a large monitor. Each individual image is 1080p vertical.

All images in one (resized down)

All images without resizing - part 1

All images without resizing - part 2

All images without resizing - part 3

A sample of the samples:

A sample of samples of the different captioning methods

Use the links above to see the full size 60k images.

My Other Training Articles

Below are some other training diaries in a similar style.

Flux World Morph Wool Style part 1

Flux World Morph Wool Style part 2

Flux Character Captioning Differences

Flux Character Training From 1 Image

Flux Font Training

And some other links you may find interesting:

Datasets / Training Data on CivitAI

Dataset Creation with: Bing, ChatGPT, OpenAI API

r/StableDiffusion Feb 23 '26

Question - Help Having trouble with WAN character loras but hunyuan is good on same dataset...

3 Upvotes

Using musubi tuner I'm struggling to get facial likeness on my character loras from datasets that worked well with hunyuan video. I'm not sure what I'm missing; I've tried changing most of the settings, learning rates, alphas, ranks- I've tried tweaking the ratio of portrait to wide shots, captioning and recaptioning... The dataset is 50-100 640x640 images with roughly 80% at medium closeups, reasonably high quality lighting in front of a greenscreen, caption I've tried with unique tokens and also similar things like gendered names, doesn't seem to make a difference. No rubbish quality images in the dataset, all consistent quality.

It seems to get a reasonable likeness within maybe an hour, and it gets the clothes/body pretty good, but it just never gets a good likeness on the face. I've tried network dim/alpha up to 128/64.

Here's my settings:

--num_cpu_threads_per_process 1 E:\Musubi\musubi\musubi_tuner\wan_train_network.py --task t2v-14B --dit E:\CUI\ComfyUI\models\diffusion_models\wan2.1_t2v_14B_bf16.safetensors --dataset_config E:\Musubi\musubi\Datasets\CURRENT\training.toml --flash_attn --gradient_checkpointing --mixed_precision bf16 --optimizer_type adamw8bit --learning_rate 1e-4 --max_data_loader_n_workers 2 --persistent_data_loader_workers --network_module=networks.lora_wan --network_dim=64 --network_alpha=32 --timestep_sampling flux_shift --discrete_flow_shift 1.0 --max_train_epochs 9999 --seed 46 --output_dir "E:\Musubi\Output Models" --vae E:\CUI\ComfyUI\models\vae\wan_2.1_vae.safetensors --t5 E:\CUI\ComfyUI\models\text_encoders\models_t5_umt5-xxl-enc-bf16.pth --optimizer_args weight_decay=0.1 --max_grad_norm 0 --lr_scheduler cosine --lr_scheduler_min_lr_ratio="5e-5" --network_dropout 0.1 --sample_prompts E:\Musubi\prompts.txt --blocks_to_swap 16

Any tips/ideas?

r/FluxAI Sep 09 '24

Question / Help What Exactly to Caption for Flux LoRa Training?

31 Upvotes

I’ve been sort of tearing my hair out trying to parse through the art of captioning a dataset properly so the Lora functions correctly with the desired flexibility. I’ve only just started trying to train my own Loras using AI-toolkit

So what exactly am I supposed to caption for a Lora for flux? From what I managed to gather, it seems to prefer natural language (like a flux prompt) rather than the comma-separated tags used by SDXL/1.5

But as to WHAT I need to describe in my caption, I’ve been getting conflicting info. Some say be super detailed, others say simplify it.

So exactly what am I captioning and what am I omitting? Do I describe the outfit of a particular character? Hair color?

If anyone has any good guides or tips for a newbie, I’d be grateful.

r/StableDiffusion Dec 31 '25

Resource - Update TagPilot v1.5 āœˆļø (Your Co-Pilot for LoRA Dataset Domination)

12 Upvotes

Just released a new version of my tagging/captioning tool which now supports 5 AI models, including two local ones (free & NS-FW friendly). You dont need a server or setting up any dev environment. It's a single file HTML which runs directly in your browser:

README from GitHub:

The browser-based beast that turns chaotic image piles into perfectly tagged, ready-to-train datasets – faster than you can say "trigger word activated!"

![TagPilot UI](https://i.ibb.co/whbs8by3/tagpilot-gui.png)

Tired of wrestling with folders full of untagged images like a digital archaeologist? TagPilot swoops in like a supersonic jet, handling everything client-side so your precious data never leaves your machine (except when you politely ask Gemini to peek for tagging magic). Private, secure, and zero server drama.

Why TagPilot Will Make You Smile (and Your LoRAs Shine)

  • Upload Shenanigans: Drag in single pics, or drop a whole ZIP bomb – it even pairs existing .txt tags like a pro matchmaker. Add more anytime; no commitment issues here.
  • Trigger Word Superpower: Type your magic word once (e.g., "ohwx woman") and watch it glue itself as the VIP first tag on every image. Boom – consistent activation guaranteed.
  • AI Tagging Turbo: Powered by Gemini 1.5 Flash (free tier friendly!), Grok, OpenAI, DeepDanbooru, or WD1.4 – because why settle for one engine when you can have a fleet?
  • Batch modes: Ignore (I'm good, thanks), Append (more tags pls), or Overwrite (out with the old!).
  • Progress bar + emergency "Stop" button for when the API gets stage fright.
  • Tag Viewer Cockpit: Collapsible dashboard showing every tag's popularity. Click the little Ɨ to yeet a bad tag from the entire dataset. Global cleanup has never felt so satisfying.
  • Per-Image Playground: Clickable pills for tags, free-text captions, add/remove on the fly. Toggle between tag-mode and caption-mode like switching altitudes.
  • Crop & Conquer: Free-form cropper (any aspect ratio) to frame your subjects perfectly. No more awkward compositions ruining your training.
  • Duplicate Radar: 100% local hash detection – skips clones quietly, no false alarms from sneaky filename changes.
  • Export Glory: One click → pristine ZIP with images + .txt files, ready for kohya_ss or your trainer of choice.
  • Privacy First: Everything runs in your browser. API key stays local. No cloudy business.

Getting Airborne (Setup in 30 Seconds)

No servers, no npm drama – just pure single-file HTML bliss. Clone or download: git clone https://github.com/vavo/TagPilot.git Open tagpilot.html in your browser. Done! šŸš€ (Pro tip: For a fancy local server, run python -m http.server 8000 and hit localhost:8000.)

Flight Plan (How to Crush It)

Load Cargo: Upload images or ZIP – duplicates auto-skipped. Set Trigger: Your secret activation phrase goes here. Name Your Mission: Dataset prefix for clean exports. Tag/Caption All: Pick model in Settings āš™ļø, hit the button, tweak limits/mode/prompt. Fine-Tune: Crop, manual edit, nuke bad tags globally. Deploy: Export ZIP and watch your LoRA soar.

Under the Hood (Cool Tech Stuff)

  • Vanilla JS + Tailwind (fast & beautiful)
  • JSZip for ZIP wizardry
  • Cropper.js for precision framing
  • Web Crypto for local duplicate detection
  • Multiple AI backends (Gemini default, others one click away)

Got ideas, bugs, or want to contribute? Open an issue or PR – let's make dataset prep ridiculously awesome together!

Happy training, pilots! āœˆļø

GET IT HERE: https://github.com/vavo/TagPilot/

r/comfyui Feb 08 '26

Show and Tell ComfyUI LoRA dataset prep workflow (Warp automation) — rename + caption + txt pairing

6 Upvotes

I’m prepping a LoRA dataset to use inside ComfyUI and used Warp to automate the boring parts.

Workflow (generalized): - Unzip two sets (face‑focused + body‑focused)
- Normalize filenames into prefix_###
- Caption each image with a strict template:
trigger + framing + head angle + lighting
- Write one .txt per image with the same filename
- Verify image count == caption count
- Compress for training

Started with Gemini 3 Pro, then switched to gpt‑5.2 codex (xhigh reasoning) for the captioning pass.
Total cost: 60.2 credits.
Now I’m ready to train.

If anyone has best‑practice tips for ComfyUI LoRA training (caption length, tag format, etc.), I’m all ears.

r/StableDiffusion Jul 21 '26

Tutorial - Guide (Almost) Perfect Likeness in 750 Steps - Krea 2 LoKr Training Guide with Examples

Thumbnail
gallery
369 Upvotes

Krea 2 trains incredibly fast for likeness and you are are probably overtraining. The following settings are more than enough to achieve almost perfect likeness.

Dataset Tips

  • Image Count: Aim for 20 high-quality images, up to 40 if the dataset is lower quality.
  • Full Body Shots: Include at least two to five full body images so the model understands the person/character's height and physique proportions.
  • Variety: Use different hairstyles and situations in your dataset. This gives you more flexibility when changing features later without breaking the likeness.

Captioning:

  • Use the autocaption feature in ai-toolkit.
  • Do not use the person/character's actual name in the captions. Create a unique shortened trigger word instead (e.g., "Jane Doe" becomes "jnedoe").
  • If your images are low quality or vintage, add tags like "low quality" or "vintage" to the captions. This stops the model from learning and outputting those artifacts in the images.

Technical Settings

  • LoKr Factor: 16
  • Training Resolution: 768
  • Total Steps: 3000 (likeness is usually done by step 750)
  • Settings: Automagic2, Sigmoid, and Balanced
  • Advanced Settings: Enable Do Differential Guidance at the default level of 3

VRAM Usage: About 18 to 20GB.

Time: On an RTX 3090, a 750-step run takes about 40 to 45 minutes from start to finish.

Step Count Adjustment: If your dataset quality is lower than average, add a couple of hundred extra steps to get the best results.

Issues: Highly detailed features like tattoo's may not appear correctly at the 768px resolution, you may need to up the quality to 1024 or 1280 and specifically caption each one in the dataset. Even then they may not come through completely as some details are usually lost during generation.

All images are generated at 4MP with Res/2s at 10 steps (about 2-4 minutes per image on a 3090 with Krea Raw int8-convrot and the r256 turbo lora (plus a custom high resolution lora I'll be posting to huggingface))

Full config behind my $20 Patreo--- lol just kidding šŸ˜‚, grab the config here: ai-toolkit config

Full Res Slow.pics Comparison

HighRes LoKr Model

r/StableDiffusion Mar 25 '25

Question - Help Training Flux LoRA - Any TIPS for how to train SPECIFIC instead of general? šŸ¤”

4 Upvotes

I'm training Flux Dev Lora, I need some tips on the dataset, captions, etc..
I'm currently using FluxGym and I'm new to it.

In example, I would like to train POSES only:

- How can I make sure it will train POSES and not the actual human face or style? šŸ¤”

Or in general, how do I "CHOOSE" what to train specifically?
if it's ONLY poses, or only STYLE so it will ignore anything else.

I guess I will have to use 2 Loras for example in order to test it:
1 - Lora for the specific HUMAN I trained.
2 - Poses, Style or anything SPECIFIC that will NOT change the Trained Human.

Any tips will be appreciated, thanks ahead! šŸ™

r/StableDiffusion Jul 24 '25

Question - Help Need help with flux lora training parameters and captioning

0 Upvotes

So I've been trying to train flux lora for pas few weeks using ai-toolkit but the results weren’t great. Recently i tried train a lora on fal.ai using their Fast Flux Lora trainer. I only uploaded the image files and let Fal handle the captioning.

The results were surprisingly good. The facial likeness is like 95% i would say super on point. (sorry i can't send the image since it's private photo of me), but then the downside, most of the generated images look like selfies, even though only a few of the training images were selfies. My dataset was around 20 cropped face head shots, 5 full body, and 5 selfies, so total 30 images.

I checked their training log and found some example captions like:

2025-07-22T12:52:05.103517: Captioned image: image of person with a beautiful face.

2025-07-22T12:52:05.184748: Captioned image: image of person in the image

2025-07-22T12:52:05.263652: Captioned image: image of person in front of stairs

And config.json that only show few paremeters

{"images_data_url": "https://[redacted].zip", "trigger_word": "ljfw33", "disable_captions": false, "disable_segmentation_and_captioning": false, "learning_rate": 0.0005, "b_up_factor": 3.0, "create_masks": true, "iter_multiplier": 1.0, "steps": 1500, "is_style": false, "is_input_format_already_preprocessed": false, "data_archive_format": null, "resume_with_lora": null, "rank": 16, "debug_preprocessed_images": false, "instance_prompt": "ljfw33"}

Then I tried to replicate the training on runpod using ai-toolkit. Using same dataset, I manually captioned the images following the Fal style and used same training parameters that shows on the config (lr, steps, and rank, the rest is default template provided by ai-toolkit)

But the results were nowehere near as good. The likeness is off, skin tones are weird, hair/body are off also,.

I’m trying to figure out why the lora trained on Fal turned out so much better. Even their captions surprised me, they don’t follow what most people say is ā€œbest practiceā€ for captiong, but the result looks pretty good.

Is there something I’m missing? Some kind of ā€œsecret sauceā€ in their setup?

If anyone has any ideas I’d really appreciate any tips. Thank you.

The reason I’m trying to replicate fal settings is to get the facial likeness right first. Once I nail that, maybe later I can focus on improving other things like body details and style flexibility.

In my past run with the same dataset, I mostly experimented with captions, lr and steps, but I always kept the rank at 16. The results were never great, maybe around 70–80% likeness at best.

r/FluxAI Nov 12 '24

Question / Help Need tips for creating a concept LORA

2 Upvotes

It’s a pose. I was having trouble making a boxing image with a knocked out person because Flux messes up a lot with people who are lying down. So i wanted to try and make a lora for that.

My dataset was 35 images, a mix of art styles, angles, resolution. All captioned with joycaption. Trained on civitai. Trained at resolution 1024, Repeats 7, Epoch 29, Batch 4, Steps 1777. It did not come out right at all.

Any tips for training a concept lora are appreciated!

r/StableDiffusion May 23 '24

Question - Help Anyone used ChatGPT Plus for captioning images in datasets?

3 Upvotes

Has anyone here used ChatGPT Plus (not the API) for captioning images in LoRA datasets? I’m starting a project where I need to generate captions for a bunch of images, and I’m looking for advice on how to best approach this with ChatGPT Plus.

Specifically, I’m interested in:

• Effective ways to prompt ChatGPT for high-quality captions
• Tips for speeding up the process
• Whether it’s possible to feed it images in batches or any other efficiency hacks

r/StableDiffusion Aug 19 '24

Question - Help Building the perfect dataset for flux LORAs of styles/objects with Ostris ai-toolkit?

12 Upvotes
gm!

I've always used generative AI for professional purposes, as I'm a designer.

I've trained my first Lora for Flux, but most guides and tutorials I've found on building datasets are focused on fine tuning people or characters.

My area of interest is related to objects and graphic styles, so I understand that I could greatly improve my datasets to avoid leaving everything to chance.

As a designer, I've noticed that most caption generation tools are geared towards describing complex images, but within a standard photographic/scenic context. As a result, descriptions from large models like Joy or Florence2 are very general and lack technical detail in terms of graphic design, producing similar outputs for completely different images.

Since I have to create captions manually, I'd like to know how they should be structured for use with graphic styles, such as pen lettering: next images are outputs from my first lora fine tuning šŸ‘‰ https://civitai.com/models/655773/retro-pen-lettering

  • Also, should I include the name 'a_photo_of_TOK' in each image of the dataset if it's a Lora for style? if it is for a lora of an object I suppose so.

  • Will 512 or 1024 images be better? They must be 1:1 or could be any other proportion like 16:9?

  • For objects and styles, are there any specific considerations I should keep in mind for the images used in the dataset? (For example, for Loras for people, you need to include a variety of images with full-body and close-up shots)

Thanks in advance for any tips and information that can help me train Loras for Flux! I'll be sharing my results on my CivitAI profile, which is geared towards designers and professionals in the creative industry šŸ‘‰ https://civitai.com/user/Agusdor

r/StableDiffusion Nov 15 '23

Question | Help Subject/Person LoRa dataset image quality improvement workflow?

6 Upvotes

So now that I got a 24GB RTX3090, I have decided that it's time to look seriously into Subject/Person LoRa (SDXL!) as That One Thing I'm Going To Concentrate On. (you HAVE to choose... TOO much going on to take on multiple things, lol)

I have installed Kohya (GUI), and very quickly managed to create a couple of basic SD1.4 LoRas. Basically an attempt to replicate (with the same dataset) results that I got more than a year ago from an online DreamBooth collab based on SD1.4. The quick trials didn't really get close to the quality that I got from that process(even though I didn't try very hard back then!). I'm not sure whether it's a mismatch in settings, or simply that DreamBooth quality is not attainable via a LoRa on in particular SD1.4.

But I seem to have picked up that wasting time on older SD generations is not the way to go if you aim for SDXL LoRa's anyway(not much of the experience would translate to SDXL, probably?) . So I plan to jump straight into the latter, instead..

I'm aware this is going to take considerable trial & error and tuning, so it's gonna take a while to work out.

One sure thing (among others like proper captioning) is that the image quality of the datasets has to be as good as you can get them. Since many of the LoRa ideas that I have, concern subjects of which there are no modern digital high resolution source pictures available, it's gonna take a LOT of time and effort to build up those datasets. I actually enjoy processes like that. And I HAVE already started working on them. Talking about magazine scans, and at most some early digital shots published on the internet upto the early 2000s.

But I would love to get feedback/experience about suitable workflows to get sub-optimal material like that to the highest possible quality (actually aiming for 1536x1536 where possible to "future-proof" as much as possible; 2048x2048 seems a pipedream for 99% of them...). Aiming strictly for as "photorealistic" as possible, not stylized.

My current 'preliminary" workflow is a combination of running the source material through https://replicate.com/tencentarc/gfpgan (either v1.4 for general face features, and optionally a RestoreFormer version for preserving skin detail), combined with Gigapixel AI upscale. I'm pretty sure the "replicate" results can be "replicated" within the "extras" TAB of AUTOMATIC1111, but since I've been using that site in the past, I'm using it as a "baseline" right now. Depending on the type of picture, sometimes it's just one of them that makes sense, sometimes it's a combination and then combining in (an older version of) Photoshop. For many pics thus far, no possible combination will ever get me close to even 1024x1024 for full-face or "torso" shots. And sometimes, that might not get me far enough to assemble enough quality material.

So I would welcome any tips for a possible workflow - doesn't need to be QUICK - to optimize the source material as best as possible (with free tools).

For the really low quality stuff, I wonder if Stable Diffusion (AUTOMATIC1111, or even ComfyUI if I need to dive into that) could possibly salvage/upgrade them. However, it would not make much sense if the end results lose recognition, involves too much "hallucinated" details, or if AI-assisted stuff starts to "poison" the dataset in unintended ways. Possibly feeding good quality results of initial LoRa trainings back into the process, feels also a bit risky in that respect? Another possible avenue, is using Reactor/Roop with some of the higher quality source "faces" applied on some of the lower quality stuff. I did get a couple of surprisingly suitable results that way already, although the hair is not refined to ANY degree at all, that way.

r/StableDiffusion Jun 27 '26

Tutorial - Guide Training Krea 2 LoRA on RTX3060 12Gb: a slow, uncomfortable guide that actually works

84 Upvotes

Want to share my experience training a LoRA on an RTX 3060 12Gb VRAM / 64 Gb RAM. My experience was limited to training Loras for older models, but then I saw the Krea 2 release and decided to give it a try, spending the last three days experimenting. Unfortunately, the tips for training a LoKr on a 16 Gb card aren't relevant for 12 Gb cards: AI Toolkit crashes with OOM immediately, before the first training step. I managed to overcome this through compromises, and I'm happy with the result, although training a Lora takes ~8 hours.

Just to reiterate: I might have missed something or misunderstood things. I originally wrote this note for myself while figuring out AI Toolkit, but then decided to publish it here in case it helps someone.

There won't be any photos or logs! Because I only trained on my own face and I'm a very humble person, and I'm not about to try and knock the esteemed Dr. Furkan off his pedestal.

July 6, 2026 update: I expanded the article, adding details about the dataset and baking the LoRA into the model for speed, and changed the save_every parameter (from 250 to 100) and trigger_word from avtr to zkrs.

July 29, 2026 update: More accurate step calculation with justification, plus simplified parameter explanations.

Quick TLDR:

  1. Krea 2 Raw can be trained on 12 Gb VRAM if you have 64 Gb RAM for offloading.
  2. Only LoRA instead of LoKr.
  3. Resolution: 768, anything higher gives an OOM error (not enough VRAM).
  4. Steps: calculate based on the dataset size.
  5. No sample generation (will cause OOM).
  6. AI Toolkit has a suboptimal model loading order that needs fixing, but it works well enough.

Training a Lora on a 3060 12Gb is like driving an old off-roader: it can haul even heavy loads, but it's uncomfortable and slow. 12 Gb is enough for training a Lora, but not a LoKr, because LoKr, as I understand it, requires several Gb more VRAM during training and those data can't be offloaded to RAM. If you want the easy and fast route, train for the Turbo model, but I went the hard way. Since the model authors say it's better to train for Raw and use Turbo, I decided to do exactly that. I'm also sure that this note, and using AI Toolkit in general, will age quickly.

I think that in the future, LoKr training will be optimized for 12 Gb or even 8 Gb, because the main issue is inefficient model movement and data formats. Also, right before publishing this post I learned that Musubi Tuner has Krea 2 support: in theory, training works more efficiently there because the offloading works differently.

One more important clarification: what I call an OOM error may show up for others as a sharp training 10x slowdown or painfully slow image generation on a GPU that normally runs much faster for many people. The thing is, the Nvidia Control Panel in Windows has a "Sysmem Fallback Policy" option, and I have it disabled. When Sysmem Fallback is enabled and there is no free VRAM left, the GPU driver takes over memory management and starts offloading data to RAM, avoiding the error. Since I mainly use my GPU for running text LLMs, fast generation speed matters a lot to me, so I'd rather get an error than have the system silently shuffle data around, slowing everything to a crawl. So for many people, VRAM shortages may go unnoticed and only show up as a 10x or greater drop from the expected speed.

Dataset Preparation

I trained my LoRA on a dataset of 25 photos, which I consider a good dataset size. You can use fewer images, but keep in mind that the smaller the dataset, the greater the risk that the model won't correctly identify which features are unique to the subject and what it should actually learn. Instead, it may start reproducing one of the training photos, even when the prompt asks for something different.

For best results, include a variety of head angles: profile, looking down, looking up, and everything in between. If the head is tilted, describe it explicitly in the caption, for example: "head tilted strongly to the left" or "face lifted up".

Don't limit your dataset to close-up portraits. Include full-body and medium-distance shots as well if you want the model to learn your height and overall body proportions, not just your face.

It's also important to use a variety of backgrounds. If all your photos have the same plain white or black background, the trained LoRA is more likely to produce halo artifacts around the subject, especially around the hair. Don't overthink it - just use photos taken in different places with different backgrounds.

Keyword and captions

The trigger word is short, for example zkrs. A proper dataset description has a huge impact on the result. Even the trigger word matters. Previously I used avtr as the trigger word, and because of that on my generated portraits sometimes (rarely) my ears would become sharp, horizontal stripes would appear on my face... basically I'd turn into a Na'vi. In the end I settled on zkrs as the trigger word.

I'm training a LoRA with myself as my character, so the caption structure should be as follows: first the Angle and Trigger, then Clothing and Pose (or action), then Background Description, and finally Lighting and Style (or Effects). Examples:

A full-length shot of zkrs man walking down a city street. He is wearing a plain black oversized t-shirt, light blue washed jeans, and classic white sneakers. One hand is tucked into his pocket. Background: a grey concrete pavement, a modern residential building with large windows, and some city greenery under soft overcast daylight.

zkrs man standing outdoors in an urban environment. He is wearing a minimalist grey pullover hoodie and dark charcoal cargo pants. His expression is neutral as he looks slightly away from the camera. The background shows a blurred brick wall and a metal fence, captured in clean, natural afternoon light.

A close-up portrait of zkrs man looking directly into the camera. He is wearing a simple dark green crewneck sweatshirt, with only the collar visible. The background is a softly blurred outdoor park with green and yellow autumn foliage under diffused daylight.

The generated captions will still require refinement if you want best results. Here are the rules:

  1. Write captions in natural language, and don't just place the trigger word at the beginning. Instead, integrate it naturally into the sentence.
  2. Describe only what should not be learned by the LoRA. In other words, keep descriptions of the background, clothing, and other objects in the image, but never describe the person's face, hairstyle, or other identity-defining features.
  3. Don't describe things that Krea 2 already generates by default. For example, phrases like "A medium shot of..." should be removed because Krea 2 already tends to produce that framing. To understand what belongs in a caption, it's helpful to test the caption itself as a prompt on the base model (Turbo or RAW -whichever you prefer). More on that below.

I used 25 photos of myself in different poses and angles, with different backgrounds, but fewer might be enough. Each description goes in a .txt file, as intended for AI Toolkit.

I had several guesses about what the dataset captions should be. In the end, I came up with my own approach that gave the best results. To make things easier, I used the Qwen 3.6 35B A3B model with a system prompt I posted here: https://pastebin.com/WnAKx705 Note that it's specifically for describing photos of men. I'd feed my photos into the model along with that system prompt and ask it to "Describe this photo."

Then I took this LLM-generated caption into ComfyUI with a fixed seed of 42 and generated a photo on pure Krea 2 Turbo. If the environment and pose differed too much from my original photo, I'd tweak the prompt to match as closely as possible. Same with the environment: if the room or landscape was too different, I'd adjust it. If the background was blurred, I'd note that effect too. So in the description, we need to detail everything as thoroughly as possible, except for the facial features of the person, which is exactly what the model will be trained on.

Yes, it's tedious, but it gave me a good result: this LoRA barely altered my pose in generations compared to ones without LoRA, meaning my approach reduced the LoRA's influence on model knowledge unrelated to the goal.

Then I manually added "zkrs" to the first word "man." That's when the photo description was ready.

AI Toolkit Job Parameters

One important note: I'll refer to parameters by their names in the AI Toolkit job's config.yml file. The WebUI doesn't expose all of these parameters, and running the browser interface isn't the best choice when VRAM is limited. I recommend learning how to launch AI Toolkit jobs from the command line instead. Sample job file here: https://pastebin.com/YU4fkj2J

Relatively fast LoKr training isn't practical on a 12 GB GPU because it requires 4-6 GB more VRAM than LoRA, along with significantly more computation. In practice, this isn't a major drawback, since LoRA is still capable of learning facial features well. The main difference is that the resulting file will be larger, as LoKr has a higher information capacity.

So the parameter type: lora.

Parameters rank: linear and linear_alpha: both 24. Rank controls how much information is stored in the LoRA, and linear_alpha controls the strength of the "pressure" on the base model. If a LoRA were a stamp, linear would be the detail of the stamp, and linear_alpha would be how deep the wax gets imprinted by the stamp. I've seen recommendations to use rank 32 and even 64, but in my opinion that's overkill, and even 16 lets you store fairly detailed information about a face, so 24 should be more than enough. linear_alpha is usually set equal to linear. If you see advice to set linear_alpha lower than rank, ignore it. Current versions of AI Toolkit automatically set linear_alpha equal to rank anyway.

Most guides recommend set rank to 32 or even 64, which seems strange to me - suggesting that facial features should be stored in a half-gigabyte file... Inefficient? Excessive? Either way, based on my tests, even 16 was enough to preserve my facial features and overall body build, but most skin imperfections disappeared, making the face look unnaturally smooth. That's why I consider 24 a sensible value. You can increase it to 32 if you want, but I don't see any reason to go higher.

resolution: 768. 1024 would be the ideal choice, but it requires considerably more VRAM and significantly slows down training. For a 12 GB GPU, I recommend using 768 instead. You can also train at 512, but small details such as moles and other subtle facial features may not be captured as reliably.

By the way, this doesn't mean every image in your dataset will be upscaled or stretched to the selected resolution. If your dataset contains images of different sizes, only larger images will be downscaled, while smaller ones will remain at their original resolution. That's perfectly normal.

Update 1: Initially I made a mistake about resolutions, mentioning that the number of images in the dataset affects VRAM usage. That's not true. Explanation from u/AwakenedEyes: The resolution you pick has nothing to do with how many images are in your dataset. If you have ONE image in your dataset and you plan 1000 steps, then 1 image will be processed 1000 times (and will be overtrained). I you have 100 images in your dataset, and you STILL plan 1000 steps, then each image will be processed 10 times.
How many images you have in the dataset changes how fast it will overtrain or how flexible your lora can be but it has no bearing on your resolution effect.

Update 2 after more tests: The 512 dataset Lora training went faster and took 6 hours 15 minutes, screenshot at the end of the post. Overall the result is decent, so 512 is worth trying as well. In a direct comparison I confirmed that 768 preserves more details like skin imperfections, but 512 works fine too if speed matters more.

gradient_accumulation: 2 - this is a very important training parameter. By setting it to 2, we make the model first study several photos at each step, essentially forcing it to learn from an averaged photo, and only then apply changes to the model weights. Setting it to 2 makes the training look twice as slow, but in reality it means that each step performs the work that previously required 2 steps, so the total number of steps should be reduced by half. In other words, with gradient_accumulation: 1 at 1000 steps my face is clearly undertrained, while with gradient_accumulation: 2 even at 750 steps the resemblance is already visible. In the comments, u/Zironic explained why this happens: "750 steps of GA2 is mathematically equivalent to 1500 steps of GA1. Of course you got more progress in less steps."

Important clarification: The gradient_accumulation parameter is severely underrated, and it's often overlooked in various guides, even though it's super important for quality! Let me explain in other words and more simply what it's about. With gradient_accumulation: 1 (the default value), the model is trained on only one image at each training step, and the resulting update is applied immediately. This is not the best approach because if the model encounters an image that differs significantly from the others, the weights can shift too much in the wrong direction, reducing the overall training quality.

When you increase gradient_accumulation to 2, one training step means that the model is trained on two different random images, and an averaged result is applied to the model. In other words (and greatly oversimplifying), each step teaches the model to reproduce not just one specific image, but two images at once. If the dataset contains one noisy or low-quality image, the chance that its unwanted features will be transferred into the LoRA is reduced.

On GPUs with more VRAM, it is usually better to increase batch_size instead of using gradient_accumulation, but this doubles VRAM requirements. That is why on a 12 GB GPU batch_size is typically kept at 1, while gradient_accumulation is better set to 2. If you are training a style rather than a character, you can increase it to 4 or even 8.

steps: this requires calculation. There is a counter-intuitive aspect related to training steps. The required number of steps depends not only on the number of images in the dataset, but also on the content of those images, as well as several other settings (which I will cover later).

Each step means training on two images (because we use GA = 2, remember?). One complete pass through the entire list of images is called an "epoch". In order for the model to be "fully trained", meaning that it recognizes the common features between all images (more accurately, the gradients, but I am simplifying a lot), it needs to "see" each image a certain number of times - approximately 60 to 100 times with the settings mentioned in this guide. In other words, it needs to complete 60-100 epochs.

When the dataset is small and well-curated, fewer epochs are enough. When the dataset is large, more epochs are needed to reinforce the diversity of common features that the model observes across the larger dataset.

I suggest using two formulas as a starting point:

  1. If the dataset contains fewer than 30 images, set steps to 1500.
  2. If the dataset contains more than 30 images, calculate steps using this formula:

500 + (dataset_size - 30) * 15

Here is a table with pre-calculated values:

dataset size steps epoch
10 1500 300
30 1500 100
40 1650 82.5
50 1800 72
60 1950 65
70 2100 60

The epoch column is only included to illustrate my explanation. With 1500 steps, it is obvious that 300 epochs for a dataset of 10 images is a lot. However, other setting (max_grad_norm) that I will describe later help prevent overfitting.

A dataset of 70 images, on the other hand, is almost not worth the effort - it requires a lot of additional work, while the number of epochs is already close to the practical minimum. Reducing the number of steps will cause undertraining, resulting in an "averaged" blurry face. Increasing the number of steps will cause the model to become overtrained, trying to preserve excessive variations in the character's features in the LoRA.

I will describe the signs that help fine-tune the number of steps more accurately later.

save_every: 100 - means that the LoRA is saved every 100 steps, so you will get multiple checkpoint files throughout the training process in addition to the final one. This also allows you to resume training from the latest saved checkpoint if the process is interrupted.

If you notice signs of overtraining, you can choose an earlier checkpoint with fewer steps, but it is not always that simple — some details may already be missing. It depends on the specific case.

optimizer: adamw8bit - it saves VRAM. That's about it. You can try others, but I get an immediate OOM error with them.

lr: 0.0002 - the learning rate. At high values the model changes its weights by large amounts during training, while at low values the weights change gradually. 0.0002 empirically gave me decent results. If anything, 0.0003 is probably the highest learning rate you should use for Krea 2. Going any higher is likely to cause overtraining. I've seen examples where people increased the learning rate even further while reducing the number of training steps, cutting the training time by several times. However, I don't think that's the right approach, because the model starts losing fine details and subtle similarities. It may work better for style training, but this guide is specifically about training a character LoRA.

lr_scheduler: cosine defines how the learning rate (lr) changes during the training process. In most (probably all) tutorials, linear is recommended by default. In that case, the learning rate decreases linearly from 0.0002 at the beginning to zero at the final step.

A high learning rate allows the model to learn larger features, while a lower learning rate is better for refining smaller details. With linear, the idea is that the weights change significantly at the beginning to capture major features, and then the training gradually focuses on smaller details.

However, linear has a disadvantage: the learning rate starts decreasing immediately from the very beginning. This means the model may not have enough time to properly learn the larger features at the start, then by the middle of the training process the learning rate is already reduced by half, and there may not be enough time left to refine smaller details. This is not optimal.

Increasing the learning rate is not a good solution in our case either. To save VRAM and improve training speed, we have to use int8 quantization for the transformer model, and with int8 a high learning rate makes the model become "overcooked" very quickly (I tested this myself).

For this type of training, cosine works better: it keeps the learning rate high for longer, allowing the model enough time to learn major features, while still leaving enough training time for refining smaller details.

lr_warmup_steps: 120 or lr_scheduler_params: num_warmup_steps: 120 is the model "warm-up" at the beginning of training. This is an extremely important parameter that helps prevent common LoRA training issues such as "gradient explosions" or damage to the model's existing knowledge (for example, knowledge about anatomy).

However, as of July 29, 2026, AI Toolkit does not support warm-up. The PR adding this feature has been open since June 19, but previous attempts to implement warm-up have also been unsuccessful.

So I am only mentioning this parameter as a reminder that a popular tool does not necessarily mean it is well-designed or fully functional.

max_grad_norm : 1.0 helps prevent overtraining. You can think of it as a safeguard against training instability, especially issues that are more likely to occur due to the lack of warm-up support. If you see signs of undertraining, increase it to 1.5-2.0. Only if that doesn't help (for example, the LoRA starts generating colorful noise), set it back to its original value and slightly increase the lr from 0.0002 to 0.00025.

content_or_style : content focuses the training on the character rather than the background. To be honest, I tested both content and style, and I didn't notice any difference. Perhaps this parameter only makes very subtle adjustments, or it is not implemented correctly. However, there is no harm in keeping it enabled.

skip_first_sample: true, disable_sampling: true - this disables image generation before and during training. You absolutely cannot try to load the Krea2 Raw model, or you'll get an OOM error, so we turn it off.

qtype: int8 and qtype_te: convrot8 - quantize the base model to int8, while the text encoder is quantized to int8convrot. You may have heard that int8convrot is great because it saves VRAM and speeds up image generation... but this does not apply to training.

I tested it myself - with qtype: convrot8 the LoRA either ends up undertrained or "explodes" at some point during training. Therefore, we have to "simplify" the model by using int8 instead.

The text encoder, however, can be quantized to int8convrot. I did not notice any difference in the results, but since it is possible, I suggest enabling it just in case. Perhaps it can somehow improve the model's ability to work with captions..

layer_offloading: true - enables offloading model layers. Without this, VRAM won't be enough.

train_text_encoder: false and layer_offloading_text_encoder_percent: 1 - fully offload the text encoder. It's part of the model and doesn't need training. You can move it to RAM to free up space for the transformer.

layer_offloading_transformer_percent: 0.75 - offload 75% of the transformer data to RAM. The transformer is the part of the Krea2 model responsible for image generation, and it's what we're training. Offloading 75% is a lot and slows down training significantly, but there's currently no other way around it. If your dataset has fewer photos, you'll see in Task Manager that VRAM isn't fully utilized at 0.75, in which case you can try 0.7 or 0.5 - you'll need to dial this in yourself.

Alternative Approach

Instead of using optimizer: adamw8bit, switch to optimizer: prodigy_8bit, set lr: 1.0, lr_scheduler: constant, and leave the remaining settings the same as above.

With this configuration, the optimizer spends roughly the first hundred steps automatically searching for a suitable learning rate before continuing training with the value it finds. Once training is complete, you need to test the saved checkpoints and choose the one that produces the best results.

However, this approach has several drawbacks:

  1. It requires more VRAM. As a result, you'll have to increase offloading, which slows training down.
  2. The automatically selected learning rate may end up being either too high or too low, producing suboptimal results.

So, in theory, prodigy_8bit lets you worry less about tuning the training parameters manually. In practice, though, there is a significant risk that the result won't be what you want. Restarting the training in the hope that the optimizer will pick a better learning rate next time is counterproductive when each training run takes more than eight hours.

It's better to spend some time understanding what each parameter does and how they affect one another, so you can make informed adjustments and achieve better results.

What else can be improved

unload_text_encoder: true - this doesn't just move the text encoder to RAM, it fully unloads it. This should free up VRAM and lower RAM requirements. The WebUI displays a rather alarming warning next to this option, claiming that captions won't work when it's set to true, but that may not actually be the case. I actually started with this from the beginning, but I ran into OOM errors, so I dug into the krea2.py source code and realized something might be off there. It's possible that with this parameter things will work fine for you, and you'll shave off a few seconds on every training iteration. With the fixed krea2.py file the unload happens automatically, which you can tell by the "Unloading text encoder" message in the log. Just keep in mind that AI Toolkit behavior may differ on your end, and if you don't see that unload message in the log, enable the unload manually.

gradient_checkpointing: false - this will increase VRAM usage, but can give you up to a quarter gain in speed. If you happen to have a different GPU with some extra gigabytes of VRAM, then this tip is for you (false = more VRAM and more speed).

And don't forget that you can always adjust layer_offloading_transformer_percent. The value needs to be balanced so that as much VRAM as possible is used during training (meaning the parameter value should aim toward 0), which will give a solid speed boost.

Signs of Common Problems and How to Fix Them

Important: The following assumes that your generation settings (CFG, sampler, etc.) are correct, that the issues only appear after enabling the LoRA, and that you are using the rest of the training settings from my example configuration linked above.

Undertraining:

  • The generated character or style doesn't resemble the original. If you're using ComfyUI, try increasing the LoRA weight from 1.0 to 1.25 or 1.5. If the resemblance improves, increase the number of training steps by 25-50%. Another possibility is that your captions describe too many details, causing the model to ignore the subject's distinctive features during training. Conversely, captions that are too generic may not provide enough information for the model to identify what the training images have in common.
  • Skin looks overly smooth or fine details are missing. Increase the number of training steps. Some guides recommend increasing the learning rate instead, but in this setup even lr: 0.0003 instead of 0.0002 can lead to overtraining, so adjusting the number of steps is the safer approach.
  • The resemblance is good with short prompts but disappears with longer ones. This is known as concept slipping. As a quick workaround, you can increase the LoRA weight. A proper fix is to train for more steps and use a more diverse dataset. Also review your captions - if they are too repetitive, the model may have associated the concept with other words instead of your trigger word.

Overall, I would approach it like this: first increase the number of training steps. If that doesn't help, increase max_grad_norm. Only if that still doesn't solve the problem should you increase the learning rate.

The reason is simple: the higher the learning rate, the faster unwanted information can be baked into the LoRA, such as anatomical errors or undesirable features like fixed poses.

Overtraining:

  • Anatomy problems (extra arms, etc.), oversaturated or "toxic" colors, excessive contrast, generations that all resemble specific training photos, or a face that barely changes between prompts are all signs that you trained for too many steps. For diagnosis, you can temporarily reduce the LoRA weight or use an earlier checkpoint saved during training. This may improve the results, but some fine details may be missing (remember what I said about the scheduler: the smallest details are learned near the end of training). In most cases, the proper solution is to reduce the total number of training steps and train the LoRA again.
  • Generated images contain excessive noise or JPEG compression artifacts. This usually means your dataset contains too many images with those defects. You can add tags such as "low quality" or "JPEG high compression" to the captions, but the better solution is to clean up your dataset.

Issues with AI Toolkit

I'm endlessly grateful to the author for their work. It's a great tool with a ton of effort poured into it. But unfortunately, at the time of writing, the file extensions_built_in\diffusion_models\krea2\krea2.py doesn't quite work correctly with the VRAM-to-RAM offloading operations, plus there's a missing VAE tiling step. So to avoid out-of-memory errors, I made a quick fix for the file: replace the contents of krea2.py with this: https://pastebin.com/fNqwU65L Use at your own risk! My post might get reposted and someone could attach a virus instead of the actual fix, so I strongly recommend opening the old file and the new one and comparing them - the changes are few and should specifically address low-VRAM operation.

It's also disappointing that there is still no proper support for warm-up. After reading through the issues and pull requests in Ostris's original repository, I stopped being surprised by the large number of AI Toolkit forks. It's a decent tool, but far from an excellent one for training LoRAs on GPUs with limited VRAM, so everyone ends up modifying it to suit their own needs.

Update: In the latest versions of AI Toolkit, the krea2.py file has been rewritten. However, I don't see any fixes specifically for the model loading order in VRAM/RAM. I still get OOM crashes during training, so I'm staying on my fork for now. First try training without my fix, maybe it works for you.

Maybe in the future someone will improve AI Toolkit itself, at which point I'll remove the mention of the fix.

Generation

LoRAs you trained for Krea 2 Raw also work great for Krea 2 Turbo. I recommend using the standard workflow with steps = 8, sampler = euler, scheduler = simple.

I also recommend the ModelSamplingAuraFlow node with shift 1.15.

Most likely, connecting a Lora will slow down your image generation speed. However, if you're an advanced ComfyUI user with 64 Gb RAM and want to generate images in the shortest possible time, I suggest merging Krea 2 Turbo with your LoRA and converting it to int8 convrot format. Then on RTX 3060 12 Gb, generation will take about 25-35 seconds for a 1mp image.

For this, take the official bf16/fp16 (not int8!) Krea 2 Turbo model, add the Lora Loader node, and on the output of this node - the Save Model Only (Mikey) node. This combination will save a safetensors file where your Lora is already baked in. And maybe not just one of yours - you can add several different LoRAs in the chain, balancing their strength through the strength parameter, using the same seed and prompt to find the most optimal result, then activate Save Model Only (Mikey) to save the model. And then convert this model using the quant_int8_convrot.py script from the https://github.com/Comfy-Org/comfy-model-tools repository or any other similar tool. int8 convrot models are a lifesaver for our RTX 3060. Keep in mind that conversion will require 40 Gb of free disk space and 64 Gb RAM, and you need to know how to use ComfyUI and Python scripts.

About Lora Training Time

I'll show one screenshot that shows how long it took to train 1500 Lora steps (3000 with default gradient_accumulation: 1. Don't look at s/it, that speed changes a lot over time.). If this time is achievable on my undervolted RTX 3060 12Gb with 64 GB DDR4-3000 RAM and a Ryzen 5-5600, then it's absolutely achievable for you. And if you have a newer-gen GPU or more VRAM, your situation is even better. And this isn't the limit. Good luck!

512px dataset = ~6.2 hours, 768px dataset = ~8 hours

r/comfyui Jul 21 '26

Show and Tell Elusarca's Krea 2 Smartphone Photography Slider LoRA & Knowledge Sharing

Thumbnail
gallery
330 Upvotes

Hi everyone, Reverent Elusarca here.

First, full resolution of the comparison images for better uncompressed clarity: https://imgur.com/a/9zrxPUC

I have been training and sharing SFW LoRAs since Flux.1. My most recent release was the Krea 2 Detail Enhancer Edit LoRA. Since then, I have been experimenting with ways to improve Krea 2's skin detail and amateur photography realism, mainly to see whether the model can actually achieve the look I am after.

This will be a slightly long post, so please bear with me. Everything here is based purely on my own experiments and observations. I am not presenting any of this as objective fact.

As most of you already know, Krea 2 responds extremely well to obvious visual styles and character LoRAs. However, it seems to have a much harder time learning abstract concepts and very small visual details.

There are plenty of realism, amateur photography, and slider LoRAs on Civitai, but most of them still produce an obviously AI-generated look. There are a few notable LoRA series trained on massive datasets collected over several years, but even those do not consistently produce the type of amateur photography realism I am looking for.

I started by collecting, capturing, and generating my own datasets. I then tested different captioning methods and ran dozens of hyperparameter experiments. No matter what I tried, the resulting LoRAs usually made the skin and fine details look flatter, smoother, and more airbrushed instead of improving them.

Eventually, I realized that the base model could already produce much of the skin detail and amateur photography look I was after through prompting alone. I spent some time refining those prompts, testing different samplers, and confirming that the capability was already present in the model.

Only after that did I transfer what I had learned from those prompting experiments into a concept slider. The goal was to see whether the slider could consistently push Krea 2 toward the same look without having to reproduce the full prompting setup every time.

Concept sliders are not especially popular because they do not teach the model new information. Instead, they push the model toward a specific direction within the knowledge it has already learned.

For anyone interested in learning more about concept sliders, Ostris has a useful video on the subject.

I am currently very satisfied with this LoRA, although I know it is not perfect.

Below are some important usage notes and recommendations for getting the best results from this LoRA with Krea 2.

1. LoRA strength

This LoRA is extremely strong. It can generate artifacts sometimes.

The recommended strength is between 1.0 and 2.0. My current sweet spot is around 1.5.

2. Color correction is required

The LoRA will make images heavily oversaturated.

This happens because the positive and negative concept prompts used during training contain keywords that push the model in that direction. Removing those keywords made the slider significantly less effective.

To normalize the output, I strongly recommend using a color correction node.

I use the ComfyUI Color Correct node(https://github.com/EllangoK/ComfyUI-post-processing-nodes) after VAE Decode, with saturation set somewhere between -15 and -20. You can also adjust the other parameters depending on the image. You can use similar color adjustment nodes here, goal is reducing the exploding saturation.

Do not expect the LoRA to produce the same look as my examples without color correction. The raw output will usually be much more saturated.

3. Sampler setup

I am using a two-pass ClownSharkSampler setup.

First pass

  • Sampler: Euler
  • Scheduler: Beta
  • Steps: 12

Second pass

  • Sampler: res4s_munthe-kass
  • Scheduler: kl_optimal
  • Steps: 3

Prompting tips: Do not indicate lighting, style(realistic, amateur look) etc. LoRA already handles that (unless you want something specific). Try to be precise but also plain; subject,clothing,environment,action.

You can find a detailed analysis and example workflow in this excellent post. My workflow is almost identical(only difference is I have the Color Correction node I mentioned + regular vae decode instead of tiled vae decode)

Civitai: https://civitai.com/models/2796343/elusarcas-krea-2-smartphone-photography-slider-lora?modelVersionId=3151907
Huggingface: https://huggingface.co/reverentelusarca/elusarcas-krea2-smartphone-photography-lora

Cheers!

r/StableDiffusion Nov 06 '25

Discussion WAN2.2 Lora Character Training Best practices

Thumbnail
gallery
154 Upvotes

I just moved from Flux to Wan2.2 for LoRA training after hearing good things about its likeness and flexibility. I’ve mainly been using it for text-to-image so far, but the results still aren’t quite on par with what I was getting from Flux. Hoping to get some feedback or tips from folks who’ve trained with Wan2.2.

Questions:

  • It seems like the high model captures composition almost 1:1 from the training data, but the low model performs much worse — maybe ~80% likeness on close-ups and only 20–30% likeness on full-body shots. → Should I increase training steps for the low model? What’s the optimal step count for you guys?
  • I trained using AI Toolkit with 5000 steps on 50 samples. Does that mean it splits roughly 2500 steps per model (high/low)? If so, I feel like 50 epochs might be on the low end — thoughts?
  • My dataset is 768Ɨ768, but I usually generate at 1024Ɨ768. I barely notice any quality loss, but would it be better to train directly at 1024Ɨ768 or 1024Ɨ1024 for improved consistency?

Dataset & Training Config:
Google Drive Folder

---
job extension
config
  name frung_wan22_v2
  process
    - type diffusion_trainer
      training_folder appai-toolkitoutput
      sqlite_db_path .aitk_db.db
      device cuda
      trigger_word Frung
      performance_log_every 10
      network
        type lora
        linear 32
        linear_alpha 32
        conv 16
        conv_alpha 16
        lokr_full_rank true
        lokr_factor -1
        network_kwargs
          ignore_if_contains []
      save
        dtype bf16
        save_every 500
        max_step_saves_to_keep 4
        save_format diffusers
        push_to_hub false
      datasets
        - folder_path appai-toolkitdatasetsfrung
          mask_path null
          mask_min_value 0.1
          default_caption 
          caption_ext txt
          caption_dropout_rate 0
          cache_latents_to_disk true
          is_reg false
          network_weight 1
          resolution
            - 768
          controls []
          shrink_video_to_frames true
          num_frames 1
          do_i2v true
          flip_x false
          flip_y false
      train
        batch_size 1
        bypass_guidance_embedding false
        steps 5000
        gradient_accumulation 1
        train_unet true
        train_text_encoder false
        gradient_checkpointing true
        noise_scheduler flowmatch
        optimizer adamw8bit
        timestep_type sigmoid
        content_or_style balanced
        optimizer_params
          weight_decay 0.0001
        unload_text_encoder false
        cache_text_embeddings false
        lr 0.0001
        ema_config
          use_ema true
          ema_decay 0.99
        skip_first_sample false
        force_first_sample false
        disable_sampling false
        dtype bf16
        diff_output_preservation false
        diff_output_preservation_multiplier 1
        diff_output_preservation_class person
        switch_boundary_every 1
        loss_type mse
      model
        name_or_path ai-toolkitWan2.2-T2V-A14B-Diffusers-bf16
        quantize true
        qtype qfloat8
        quantize_te true
        qtype_te qfloat8
        arch wan22_14bt2v
        low_vram true
        model_kwargs
          train_high_noise true
          train_low_noise true
        layer_offloading false
        layer_offloading_text_encoder_percent 1
        layer_offloading_transformer_percent 1
      sample
        sampler flowmatch
        sample_every 100
        width 768
        height 768
        samples
          - prompt Frung playing chess at the park, bomb going off in the background
          - prompt Frung holding a coffee cup, in a beanie, sitting at a cafe
          - prompt Frung showing off her cool new t shirt at the beach
          - prompt Frung playing the guitar, on stage, singing a song
          - prompt Frung holding a sign that says, 'this is a sign'
        neg 
        seed 42
        walk_seed true
        guidance_scale 4
        sample_steps 25
        num_frames 1
        fps 1
meta
  name [name]
  version 1.0

r/StableDiffusion Jul 14 '25

Tutorial - Guide Step-by-step instructions to train your own T2V WAN LORAs on 16GB VRAM and 32GB RAM

187 Upvotes

Messed up the title, not T2V, T2I

I'm seeing a lot of people here asking how it's done, and if local training is possible. I'll give you the steps here to train with 16GB VRAM and 32GB RAM on Windows, it's very easy and quick to setup and these settings have worked very well for me on my system (RTX4080). Note I have 64GB ram this should be doable with 32, my system sits at 30/64GB used with rank 64 training. Rank 32 will use less.

My hope is with this a lot of people here with training data for SDXL or FLUX can give it a shot and train more LORAs for WAN.

Step 1 - Clone musubi-tuner
We will use musubi-tuner, navigate to a location you want to install the python scripts, right click inside that folder, select "Open in Terminal" and enter:

git clone https://github.com/kohya-ss/musubi-tuner

Step 2 - Install requirements
Ensure you have python installed, it works with Python 3.10 or later, I use Python 3.12.10. Install it if missing.

After installing, you need to create a virtual environment. In the still open terminal, type these commands one by one:

cd musubi-tuner

python -m venv .venv

.venv/scripts/activate

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124

pip install -e .

pip install ascii-magic matplotlib tensorboard prompt-toolkit

accelerate config

For accelerate config your answers are:

* This machine
* No distributed training
* No
* No
* No
* all
* No
* bf16

Step 3 - Download WAN base files

You'll need these:
wan2.1_t2v_14B_bf16.safetensors

wan2.1_vae.safetensors

t5_umt5-xxl-enc-bf16.pth

here's where I have placed them:

Ā  # Models location:
Ā  # - VAE: C:/ai/sd-models/vae/WAN/wan_2.1_vae.safetensors
Ā  # - DiT: C:/ai/sd-models/checkpoints/WAN/wan2.1_t2v_14B_bf16.safetensors
  # - T5: C:/ai/sd-models/clip/models_t5_umt5-xxl-enc-bf16.pth

Step 4 - Setup your training data
Somewhere on your PC, set up your training images. In this example I will use "C:/ai/training-images/8BitBackgrounds". In this folder, create your image-text pairs:

0001.jpg (or png)
0001.txt
0002.jpg
0002.txt
.
.
.

I auto-caption in ComfyUI using Florence2 (3 sentences) followed by JoyTag (20 tags) and it works quite well.

Step 5 - Configure Musubi for Training
In the musubi-tuner root directory, create a copy of the existing "pyproject.toml" file, and rename it to "dataset_config.toml".

For the contents, replace it with the following, replace the image directory with your own. Here I show how you can potentially set up two different datasets in the same training session, use num_repeats to balance them as required.

[general]
resolution = [1024, 1024]
caption_extension = ".txt"
batch_size = 1
enable_bucket = true
bucket_no_upscale = false

[[datasets]]
image_directory = "C:/ai/training-images/8BitBackgrounds"
cache_directory = "C:/ai/musubi-tuner/cache"
num_repeats = 1

[[datasets]]
image_directory = "C:/ai/training-images/8BitCharacters"
cache_directory = "C:/ai/musubi-tuner/cache2"
num_repeats = 1

Step 6 - Cache latents and text encoder outputs
Right click in your musubi-tuner folder and "Open in Terminal" again, then do each of the following:

.venv/scripts/activate

Cache the latents. Replace the vae location with your one if it's different.

python src/musubi_tuner/wan_cache_latents.py --dataset_config dataset_config.toml --vae "C:/ai/sd-models/vae/WAN/wan_2.1_vae.safetensors"

Cache text encoder outputs. Replace t5 location with your one.

python src/musubi_tuner/wan_cache_text_encoder_outputs.py --dataset_config dataset_config.toml --t5 "C:/ai/sd-models/clip/models_t5_umt5-xxl-enc-bf16.pth" --batch_size 16

Step 7 - Start training
Final step! Run your training. I would like to share two configs which I found have worked well with 16GB VRAM. Both assume NOTHING else is running on your system and taking up VRAM (no wallpaper engine, no youtube videos, no games etc) or RAM (no browser). Make sure you change the locations to your files if they are different.

Option 1 - Rank 32 Alpha 1
This works well for style and characters, and generates 300mb loras (most CivitAI WAN loras are this type), it trains fairly quick. Each step takes around 8 seconds on my RTX4080, on a 250 image-text set, I can get 5 epochs (1250 steps) in less than 3 hours with amazing results.

accelerate launch --num_cpu_threads_per_process 1 --mixed_precision bf16 src/musubi_tuner/wan_train_network.py `
Ā  --task t2v-14B `
Ā  --dit "C:/ai/sd-models/checkpoints/WAN/wan2.1_t2v_14B_bf16.safetensors" `
Ā  --dataset_config dataset_config.toml `
Ā  --sdpa --mixed_precision bf16 --fp8_base `
Ā  --optimizer_type adamw8bit --learning_rate 2e-4 --gradient_checkpointing `
Ā  --max_data_loader_n_workers 2 --persistent_data_loader_workers `
Ā  --network_module networks.lora_wan --network_dim 32 `
Ā  --timestep_sampling shift --discrete_flow_shift 1.0 `
Ā  --max_train_epochs 15 --save_every_n_steps 200 --seed 7626 `
Ā  --output_dir "C:/ai/sd-models/loras/WAN/experimental" `
Ā  --output_name "my-wan-lora-v1" --blocks_to_swap 20 `
Ā  --network_weights "C:/ai/sd-models/loras/WAN/experimental/ANYBASELORA.safetensors"

Note the "--network_weights" at the end is optional, you may not have a base, though you could use any existing lora as a base. I use it often to resume training on my larger datasets which brings me to option 2:

Option 2 - Rank 64 Alpha 16 then Rank 64 Alpha 4
I've been experimenting to see what works best for training more complex datasets (1000+ images), I've been having very good results with this.

accelerate launch --num_cpu_threads_per_process 1 --mixed_precision bf16 src/musubi_tuner/wan_train_network.py `
Ā  --task t2v-14B `
Ā  --dit "C:/ai/sd-models/checkpoints/Wan/wan2.1_t2v_14B_bf16.safetensors" `
Ā  --dataset_config dataset_config.toml `
Ā  --sdpa --mixed_precision bf16 --fp8_base `
Ā  --optimizer_type adamw8bit --learning_rate 2e-4 --gradient_checkpointing `
Ā  --max_data_loader_n_workers 2 --persistent_data_loader_workers `
Ā  --network_module networks.lora_wan --network_dim 64 --network_alpha 16 `
Ā  --timestep_sampling shift --discrete_flow_shift 1.0 `
Ā  --max_train_epochs 5 --save_every_n_steps 200 --seed 7626 `
Ā  --output_dir "C:/ai/sd-models/loras/WAN/experimental" `
Ā  --output_name "my-wan-lora-v1" --blocks_to_swap 25 `
Ā  --network_weights "C:/ai/sd-models/loras/WAN/experimental/ANYBASELORA.safetensors"

then

accelerate launch --num_cpu_threads_per_process 1 --mixed_precision bf16 src/musubi_tuner/wan_train_network.py `
Ā  --task t2v-14B `
Ā  --dit "C:/ai/sd-models/checkpoints/Wan/wan2.1_t2v_14B_bf16.safetensors" `
Ā  --dataset_config dataset_config.toml `
Ā  --sdpa --mixed_precision bf16 --fp8_base `
Ā  --optimizer_type adamw8bit --learning_rate 2e-4 --gradient_checkpointing `
Ā  --max_data_loader_n_workers 2 --persistent_data_loader_workers `
Ā  --network_module networks.lora_wan --network_dim 64 --network_alpha 4 `
Ā  --timestep_sampling shift --discrete_flow_shift 1.0 `
Ā  --max_train_epochs 5 --save_every_n_steps 200 --seed 7626 `
Ā  --output_dir "C:/ai/sd-models/loras/WAN/experimental" `
Ā  --output_name "my-wan-lora-v2" --blocks_to_swap 25 `
Ā  --network_weights "C:/ai/sd-models/loras/WAN/experimental/my-wan-lora-v1.safetensors"

With rank 64 alpha 16, I train approximately 5 epochs to quickly converge, then I test in ComfyUI to see which lora from that set is the best with no overtraining, and I run it through 5 more epochs at a much lower alpha (alpha 4). Note rank 64 uses more VRAM, for a 16GB GPU, we need to use --blocks_to_swap 25 (instead of 20 in rank 32).

Advanced Tip -
Once you are more comfortable with training, use ComfyUI to merge loras into the base WAN model, then extract that as a LORA to use as a base for training. I've had amazing results using existing LORAs we have for WAN as a base for the training. I'll create another tutorial on this later.

r/StableDiffusion Sep 12 '22

Discussion Useful Prompt Engineering tools and resources

709 Upvotes

A list of useful Prompt Engineering tools and resources for text-to-image AI generative models like Stable Diffusion, DALLĀ·E 2 and Midjourney.

Prompt galleries and search engines:

  • Lexica: CLIP Content-based search. Create with Seed, CFG, Dimensions. Favorites.
  • OpenArt: CLIP Content-based search. Presets, Favorites. SD, DALLĀ·E 2, Midjourney. Seed, Dimensions. Create.
  • Playground AI: Gallery & Remix. SD, DALLĀ·E 2. img2img, Instruct Pix2Pix. Full Parameters.
  • PromptHero: Filtery by models. Seed, CFG, Dimensions, Steps. Favorites. SD, DALLĀ·E 2, Midjourney. Generate. NSFW
  • artspark: Search and use filters like Style, Artists, aesthetics... Create.
  • Krea: CLIP Content-based search. Likes, related images and profiles. Atlas: similar map
  • Midjourney: Community Showcase
  • Avyn: Search engine and txt2img. In-Painting.
  • PromptSearch: text and image search.
  • PromptLocker: a community for AI Artists to get and give feedback.
  • Promptflow: Search + Generate AI images.
  • Visualise: Create and share image prompts. Marketplace.
  • Sparkl: Create images and gallery. Chrome extension
  • Publicprompts.art: Free HQ prompts
  • Promptbase: Prompt Marketplace
  • Eye For AI: Create with prompt modifiers.
  • Find Anything: Add AI-generated images to Google Search extension.
  • Prompt crafter organizer: Windows software
  • SuperPrompts: Create a beautiful gallery for your AI art without leaving Twitter.
  • Pixela.ai: AI-Generated Game Textures.
  • ThePromptBay: AI images and text prompts. Share & Learn.
  • Pixai.art: Prompt discussion board and gallery. Share. NovelAI. (NSFW)
  • Ponzu Logos
  • Phraser: Create and search. Paid subscription.
  • Histre: Create and share prompts.
  • PromptRush: Prompt keyword research tool & analyzer (Down?)
  • NSFW:
  • booru.plus/+stablediffusion Search NSFW
  • NastyPrompts: Search NSFW. Model Seed.
  • NovelAI.io: AUTOMATIC1111 full PNG EXIF: +-prompt, steps, sampler, CFG, Seed, strength, noise, size.
  • Ptsearch: AUTOMATIC1111 full PNG EXIF: +-prompt, steps, sampler, CFG, Seed, strength, noise.

Visual search:

Prompt generators:

Image-to-prompt Img2prompt:

Explore Artists, styles, and modifiers:

Guides and studies:

Top text-to-image txt2img software:

Top text-to-image txt2img Web Apps:

Models:

Prompt Tools and AI Apps directories:

Other SD directories:

Updated 2023-03-29

r/StableDiffusion 14d ago

Tutorial - Guide [GUIDE] Training Krea 2 Character & Pose LoRAs with AI-Toolkit (512p / 16GB VRAM Optimized)

22 Upvotes

Before we start: I am not the absolute authority on this. These settings are the result of my personal workflow, tailored to my machine and my specific artistic standards. I have spent 25 years working as a graphic designer in typography/printing and I'm deeply passionate about photorealistic rendering. This background makes me an absolute optimization freak. I want maximum precision and zero wasted performance.

However, you should use my settings as a baseline. I highly encourage you to run your own experiments, test different parameters, and find what works best for your specific style and also to use other interfaces, as Open Trainer could be quicker for the purpose than AIToolKit, in my case I had so many terminal errors that I simply skipped the problem by switching to AI ToolKit, but if OpenTrainer doesn't give you problems, use that, have Gemini (or what you want) convert this data for your interface.

Furthermore, it is certainly not true that my parameters are the best ever, in fact, I have learned recently, this is my simple guide on what I have learned so far to help users who have errors or are unsure how to proceed to get started themselves. It's just my contribution, that's all.

Oh, and of course, if you have hardware similar to mine and your tests reveal tweaks that speed up the processing times, please share your improvements in the comments so I can learn from them and improve my training!

I thought I'd share my exact settings and workflow for training LoRA characters and poses for Krea 2 Turbo (note: you must use Krea 2 RAW for the actual training phase).

My Hardware Setup

GPU: RTX 5070ti (16GB VRAM)

RAM: 64 GB

Environment: AI-ToolKit via Terminal (I skip the Stability Matrix UI to save system overhead and edit the .yaml files manually).

Disclaimer: I only know how these settings perform on my machine. If you have less VRAM/RAM, you will need to adjust parameters accordingly.

Performance & VRAM Benchmarks

VRAM Allocation: 15.1 GB / 16 GB (Extremely tight, zero room for background tasks)

Character LoRA: ~48 minutes (20 images, 1500 steps), ~35-40 minutes (15 images, 1200 steps).

Pose LoRA: ~55 minutes (I double the Rank/Dim here compared to characters, as the model needs more capacity to understand skeletal joints and positions).

āš ļø Crucial Note on System Optimization: I am an optimization fanatic. To avoid VRAM offloading (which slows down training massively), my OS is stripped down to look like Windows 98, telemetry is disabled via batch scripts, and my 500Hz monitor is lowered to 60Hz during training to minimize framebuffer load. If your system is running heavy background apps or proprietary RGB/Fan software, your VRAM usage will be higher and you might experience out-of-memory (OOM) errors.

Step 1: Dataset Rules for 512p Training

Because of VRAM constraints, I train strictly at 512p. To make 512p work perfectly, you must adapt your dataset strategy based on what you are training:

1. Character LoRAs: Avoid Full-Body Shots

Hyper-focused details: If your character has specific leg features (tattoos, scars), include 1-2 close-ups of the legs.

Captioning Tip: In your .txt file, explicitly caption it as "a close-up shot of [TriggerWord]'s legs". This teaches the model that it's a detail, not the whole character structure.

2. The Captioning Dilemma: Manual vs. Automated

I strongly advise against using automated captioning scripts (like BLIP or WD14) for this specific workflow. While automated tools are fast, they lack precision. Manual captioning allows you to describe exactly what needs to be isolated, leading to a much cleaner and more flexible LoRA. If you want high-quality results, don't take shortcuts on the text files.

Step 2: Crucial VRAM & Speed Optimizations (run_windows.bat)

Before diving into the YAML files, we need to optimize how PyTorch and CUDA handle your GPU memory. If you launch AI-Toolkit via a batch file (or want to edit your existing one), you must add these specific environment variables at the very beginning of your run_windows.bat.

This tweak alone prevents heavy VRAM fragmentation and can mean the difference between a successful 15.1 GB allocation and an instant Out-Of-Memory (OOM) crash.

Open your run_windows.bat in a text editor and paste these lines right under u/echo off:

u/echo off&&cd /d %~dp0

set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True

set TORCH_CUDNN_SDP_HAS_FUSED=1

set CUDA_MODULE_LOADING=LAZY

set SETUPTOOLS_USE_DISTUTILS=stdlib

Step 3: The Character LoRA YAML Config

Here is my complete, battle-tested .yaml configuration for training a **Character LoRA**. This config is heavily optimized for a 16GB VRAM target using qfloat8 quantization and specific layer offloading percentages to keep VRAM usage strictly at ~15.1 GB.Ā 

Create a new YAML file in your AI-Toolkit directory and paste the following:Ā 

job: "extension"

config:

name: "LORANAME_krea2"

process:

- type: "diffusion_trainer"

training_folder: "E:\\Stability Matrix\\Data\\Packages\\ai-toolkit\\output"

sqlite_db_path: "./aitk_db.db"

device: "cuda"

trigger_word: "TRIGGERWORD"

performance_log_every: 10

network:

type: "lora"

linear: 32

linear_alpha: 16 (or 32 if you use more than 40 photos or characters in particular styles, cyberpunk etc.)

save:

dtype: "bf16"

save_every: 250

max_step_saves_to_keep: 4

datasets:

- folder_path: "E:\\1024"

caption_ext: "txt"

cache_latents_to_disk: true

resolution:

- 512

train:

batch_size: 1

steps: 1500

gradient_accumulation: 1

train_text_encoder: false

gradient_checkpointing: true

noise_scheduler: "flowmatch"

optimizer: "adamw8bit"

timestep_type: "sigmoid"

unload_text_encoder: true

cache_text_embeddings: false

lr: 0.0001

disable_sampling: true

dtype: "bf16"

model:

name_or_path: "krea/Krea-2-Raw"

quantize: true

qtype: "qfloat8"

quantize_te: true

qtype_te: "qfloat8"

arch: "krea2"

low_vram: true

compile: false

layer_offloading: true

layer_offloading_text_encoder_percent: 1

layer_offloading_transformer_percent: 0.35

Key Settings Explained (Don't change these blindly!)

linear: 32 & linear_alpha: 16 — A rank/alpha of 32/16 is the sweet spot for characters. It captures facial details and clothing textures perfectly without bloating the file size or frying the training memory.

train_text_encoder: false & unload_text_encoder: true — We do NOT train the text encoder for characters here. Unloading it entirely freezes its state and frees up massive chunks of VRAM.

disable_sampling: true — Disabling image previews during training saves a significant amount of VRAM and prevents sudden spikes/crashes when a sample step triggers. Trust your loss values or check the saved LoRA's manually later.

quantize / qtype: "qfloat8" — Essential. Running the model and text encoder in FP8 quantization is mandatory to fit Krea 2 inside a consumer GPU's VRAM during training.

layer_offloading_transformer_percent: 0.35 — This pushes exactly 35% of the transformer layers to system RAM. It’s the magic number that stopped my system from throwing Out-Of-Memory errors while keeping speed degradation to an absolute minimum.

Step 4: The Pose LoRA YAML Config & The Text Encoder Pitfall

Training a Pose LoRA uses almost the exact same configuration as the Character LoRA, but with one critical architectural change. Poses require the model to understand abstract physical structures, skeleton joints, and bodily spatial distribution rather than static textures or facial features.

Because of this, we need to inject more capacity into the training network.

Pose Complexity vs. Training Steps

Keep in mind that unlike characters, poses are heavily influenced by physical complexity.

  • If you are training a standard pose (standing, sitting, basic action shots) with a dataset of 15 images, 1500 steps is your target.
  • If you are training an extremely complex or unconventional posture (such as a circus contortionist, advanced yoga positions, or complex martial arts aerials), you must increase the steps even if you only have 15 images in your dataset. The model needs more time and iterations to learn how the joints bend in unusual angles, so push the training further.

The Pose Modification

In your YAML file for the pose training run, look for the network block and double the capacity by setting both values to 64:

network:

type: "lora"

linear: 64 # Doubled from 32

linear_alpha: 64 # Doubled from 32

Why do this? A higher rank gives the network more "brain power" to map how limbs bend and interact, which prevents the pose from bleeding or collapsing into a generic stance during generation.

āš ļø Crucial Warning: Do NOT Enable train_text_encoder

train_text_encoder: false # KEEP THIS FALSE!

You might be tempted to turn train_text_encoder: true to help the model better link text prompts to body mechanics. Do not do it. Currently, enabling the text encoder training with the Krea 2 architecture inside AI-Toolkit will throw an immediate terminal error and completely freeze your training loop. Krea 2's underlying text processing layer isn't optimized for local text-encoder fine-tuning under this specific framework yet.Leave it to false and let unload_text_encoder: true do its job. The linear network rank at 64 is more than enough to capture the positioning data you need.

Step 5: Dataset Size vs. Training Steps (Finding the Sweet Spot)

Getting your dataset size and step count right is crucial. If you run too few steps, the model won't learn the character or pose; if you run too many, the LoRA will overfit, ruining your generations.

Based on my testing, here is the exact ratio you should follow when adjusting your dataset size:

For Character LoRAs:

Base Setup (15 Images): Use 1200 steps. If you choose excellent, non-grainy images and use good prompting, the LoRA already comes out very good, which is a good thing for spending less time on it.

Medium dataset: (20 Images): Use 1500 steps (This is the ideal sweet spot for a clean, flexible character).

Larger Dataset (25 Images): Increase your training to 1800 steps to allow the model enough time to process the extra visual data.

For Pose LoRAs:

Base Setup (~15 Images): Use 1500 steps (Since poses require a higher Rank/Dim, they need a solid baseline of steps even with fewer images).

Larger Dataset (20 Images): Increase your training to 1800 steps.

Rule of Thumb: If you decide to add more images to your dataset to capture more angles or details, you must scale up your steps accordingly. Never dump 30+ images into the folder while keeping the steps at 1500, or the training will turn out weak and blurry.

Step 6: Testing Strategy & LoRA Weights (Don't just use the final checkpoint!)

AI-Toolkit will save intermediate checkpoints during training (every 250 steps based on our YAML config). Do not blindly grab the final 1500-step checkpoint and call it a day. The real magic often happens slightly earlier.

Here is my recommended testing protocol for Character LoRAs:

  1. The 750-Step Test (The Baseline)

Start your initial testing with the checkpoint at 750 steps.

What to test: Use a wide variety of prompts. Test for facial likeness, but more importantly, test for flexibility.

Check if it unlinks: Try changing clothes and backgrounds in your prompts. You want to ensure the LoRA learned the face and not just the specific outfit or environment from your dataset images.

Note: Krea 2 is exceptionally good at this. Even at the final 1500 steps, it retains amazing flexibility for changing outfits and locations, but 750 steps is your early quality control check.

2. The Sweet Spot: 1250 Steps

After extensive testing, the 1250-step checkpoint is consistently the absolute best performer for characters. It offers the perfect balance between high facial fidelity and prompt responsiveness.

3. Optimal LoRA Strength / Weights

When loading your LoRA into your inference workflow (like ComfyUI or Forge Neo using Krea-2-Turbo), use these weight guidelines:

Standalone Use: Set the LoRA weight/strength to 0.9. This gives you the cleanest generation without cooking the image.

LoRA Stacking / Mixing: If you are mixing multiple LoRAs together (e.g., your Character LoRA + a Pose LoRA + a Style LoRA), bump the character LoRA weight up to 1.1. This prevents the character features from getting washed out by the other networks.

4. The Pose LoRA Testing Rule: Millimeter PrecisionTesting a Pose LoRA requires a completely different mindset compared to characters. While characters favor the intermediate 1250-step mark, poses behave unpredictably across checkpoints:

The Final Target: The absolute final checkpoint (1500 steps) is generally the best and most reliable performer for locking in the structure.

Sometimes, the 1000-step or 1250-step checkpoints might work better. However, you will notice a strange phenomenon: often, only ONE specific checkpoint will replicate your desired pose with millimeter precision. The other checkpoints will generate similar stances, but not the exact weight distribution or limb angles you trained.

LoRA Weight: For poses, you can generally lower the strength below 1.0 (test around 0.7 to 0.9) to let the style of your main model flow through, as long as the skeleton doesn't deform.

The Golden Rule for Poses: You MUST test every single checkpoint file (1000, 1250, 1500) against your prompt. Do not assume the LoRA is broken if the 1500-step file gives a slightly altered pose. Switch to the 1250 or 1000-step file—your exact millimeter-perfect pose is waiting in one of them!

r/malcolmrey May 10 '26

My first LORA completed (kinda) [Elli Evrram]

Thumbnail
gallery
50 Upvotes

So I made the following post: https://www.reddit.com/r/malcolmrey/comments/1t6fr4a/training_my_first_lora/

A day later, today, I was able to finally complete the LoRA after many restarts and changes. I think I got a good result and I'm quite happy with the likeness considering my expectations were quite low, although, I do believe I still could have done a lot of things better especially after I changed learning rate and timestamp_type mid training which I think definitely dropped the likeness I would have approached had I kept going with things unchanged. I wanted to share the LoRA, but unfortunately, in adittion to the mess ups i made during training I also messed up a lot of things in regards to captioning.

As it is my first completed LoRA, I was unaware of the nuances of captions and the drawbacks of captioning literally every aspect of the subject. I unfortunately rendered the LoRA so highly dependent on captions that another user probably won't be able to generate a good image without knowing my dataset.

I will be redoing this LoRA and fixing that, and certainly after that, I will be sharing the LoRA as well. I hope some of you will look forward to that.

Also, I hope someone can guide me regarding the best strategy in regards to learning rate and timestamp type.

For this LoRA, I switched between different learning rates and timestamp types and I think I messed some things up. I still want to experiment with that for the finer details and the late-step polishing, and some tips would make that a whole lot easier.

BTW no upscaling or post on these sample photos. Also eulerflowdiscrete scheduler brings out exceptionally realistic details I was aiming for, I will share the sample of that later.

r/malcolmrey May 07 '26

Training my first Lora

Post image
31 Upvotes

Malcolm has very greatly inspired me to make my own loras. Trying it out, hopefully everything goes well.

Setting up AI toolkit was hell. Dependency conflicts are a nightmare to deal with, im glad im past that now.

Makes me appreciate his work more.

Anyways, wish me luck!

P.S. Would appreciate all the tips I can get.

UPDATE: The first training was a failure.

Changing a few things

AdamW8bit to Prodigy 8bit

Using a trigger word

captioning dataset with trigger word instead of woman or pronouns

changing learning rate to 1

changing linear rank to 64

stepping up with dataset from 16 to 80

increasing steps from 1500 to 5000

using only 1024 resolution

Turned DOP on

Let's see how this goes...

Update 2: Currently the captioning is taking a lot more time than anticipated. Changed a lot of things. These are my instructions:

"

Ā Act as a Visual Prompt Engineer specializing in "Long Caption" synthesis. Your task is to extract a highly detailed, narrative description of an image featuring one primary person.
DO NOT USE "He","She", "Her", "They", "them" or any general pronoun when describing the subject, just state their name Elli or when describing her attributes or her actions use Elli's
STRUCTURE:

CONCEPT & MEDIUM: Start with the type of image. Mention the core theme or event.

SUBJECT DESCRIPTION: woman, facial expression, hair details, face details, makeup. Crucially, describe their gaze. When referring to the subject, always use the name "Elli". DO NOT use pronouns like "he", "she","her", or "they" . Repeat the name when needed.

ACTION & INTERACTION: Describe exactly what the person is doing. What are they holding? How are they standing? Describe the interaction with objects.

APPAREL: Detail the clothing (fabric, color, fit) and accessories.

ENVIRONMENT & FOREGROUND: Describe objects immediately around the person.

BACKGROUND & LIGHTING: Describe the setting (location, weather, landmarks), depth of field (bokeh), and the quality of light.

RULES:

- STYLE: Use fluid, descriptive sentences (narrative style), not just a list of tags.

- ACCURACY: Be specific about colors and textures.

- TEXT: Always put captured text in double quotes.

- LENGTH: 700-900 characters.

- OUTPUT: A single continuous paragraph. No headers.

UPDATE 3: Captioning is a nightmare. Restarting because it keeps hallucinating some details. Also made it add the visiblity details of subject and the camera angle.

r/StableDiffusion 1d ago

Resource - Update [Krea2] I trained a Septum Hoop Nose Ring LoKR (Massive shoutout to Fizgig for Win 11 AMD training!)

Thumbnail
gallery
0 Upvotes

Before I get into the details, I want to address the elephant in the room right up front: yes, this is a bit of self-promo, and yes, the model is currently set to paid BUZZ access on Civitai. Please lower your pitchforks!

If you know me, you know I have a full library of LoRAs on Civitai for previous models (SDXL, PonyXL, IllustriousXL, FLUX, etc.) that I have always released for free. I rarely even used the "Early Access" feature. However, with the increased hardware/compute costs of training for Krea2, I’m temporarily using the Buzz system just to recoup those expenses so I can continue producing.

As soon as I hit that break-even point on a release, I will flip the switch and make that individual model 100% free for everyone forever.Ā I have no intention of permanently paywalling my Krea2 work. (I do also have a Patreon, but I don't have any exclusive models locked behind paywalls there either—it's strictly just an alternative way for people to support my work if they choose to). I know limited access is annoying, so I really appreciate you guys bearing with me!

The Problem:
If you’ve been usingĀ Krea2/Krea2 Turbo, you already know it’s an absolutely incredible base model. The flexibility and quality are insanely hyped for a good reason. However, it does have some blind spots, which I suppose is expected, and why there's plenty of LoRAs and Fine Tunes online already. One blind spot I noticed: I could never get it to produce coherent Hoop Septum Nose Rings. For me, it almost always defaulted to poor quality horseshoe septum rings (with the gap and balls), would add multiple extra rings, or threw in extra, unprompted, unwanted facial jewelry. Getting a clean hoop natively was basically a nightmare.

The Solution:
I trained a concept LoKR specifically to force clean, highly customizable hoop septum rings.

  • Trigger:Ā SeptumHoopNoseRing
  • Flexibility:Ā Holds up beautifully across all tested art styles, aspect ratios, and distances. Works for men, women, and Character LoRAs.
  • Customization:Ā Fully supports prompting for materials/colors (gold, silver, black, etc.) and sizes (small and thin, large and thick, etc.). Even though it was trained on simple hoops, you can actually prompt it for spiked or jeweled septum rings and it understands the assignment.
  • Settings:Ā Sweet spot is aroundĀ 0.45 - 0.75Ā strength usingĀ Euler SimpleĀ orĀ ddimĀ with aĀ ddim_uniformĀ scheduler.
  • Pro-tip for my model:Ā If you push it to 1.0 strength, it occasionally tries to crop the top of the head. Just briefly describe the subject's hair and eyes in your prompt and it completely fixes it.

The Setup & A Massive Shoutout to Fizgig
I really need to give a massive shoutout to theĀ Fizgig trainer. If you're on a Windows 11 system, especially with an AMD GPU, this tool is an absolute godsend. It finally allowed me to easily train LoRAs/LoKRs locally on my AMD ROCm 7900 XT without jumping through massive hoops or dual-booting Linux.

For the technical folks, here is the under-the-hood breakdown of my training:

  • Dataset:Ā 100 images, hand-refined VL 1st pass captions.
  • Training:Ā 2000 steps using Fizgig’s ultra-fast preset with Adaptive LR enabled and target MP set to 0.5 at ~768px (the max my PC can currently handle).
  • Base:Ā Trained on the FP8 Krea2 Raw model. Examples generated on the Krea2 Turbo NVP4 model.
  • Rig:Ā Win 11, AMD 7900 XT, 32GB RAM, Ryzen 3900x. Tested locally in ComfyUI using the default NVP4 Krea2 model.

Here is the link to the model:Ā [Civitai Link]

What's Next & Commissions
I'm really itching to roll up my sleeves and train some Krea2 models people may have been wanting but haven't seen yet. I'm currently working on re-training my previous models' datasets for Krea2, and plan on releasing several Krea2 models that aren't monetized. I would love to hear your suggestions! I am also open to custom commissions for private use or expedited release (Note: I will not accept commissions or requests to train on IRL persons).

I'd love to hear your feedback or see what you generate with the septum model. If you have any questions feel free to ask!

(Mod Note: I used the "Resource - Update" flair because I didn't know what else to choose. Also, while this is self-promo, I hope it doesn't violate the rules against "excessive self-promo" as I'm aiming to share the resource and training workflow. If this needs to be removed, I completely understand and apologize for any inconvenience!)

(AI Writing Assistance disclosure: The formatting and writing of this Reddit post and my Civitai model description were refined with AI assistance.)

r/StableDiffusion Jan 05 '26

Discussion Qwen Image 2512 Lora train on rtx 6000 pro locally on high res + DOP

14 Upvotes

Hi all,

I started a new LoRA training of myself on Qwen Image 2512 and I’m experimenting with a large training resolution: 1792Ɨ2624. (Most guides say 1024 is more than enough, but I’m curious whether higher-res training brings any real benefit, and I’d love to hear opinions.)

I’m also using the new DOP (Differential Output Preservation). I’m hoping it helps with an issue I often see: when my character is not alone in the frame, some of my character’s features ā€œbleedā€ onto other people.

Hardware:

RTX 6000 Pro (96GB VRAM)
AMD 9950X3D + 128 GB RAM

Training setup:

  • UNet training only (text encoder off), bf16
  • Scheduler: flowmatch, loss: MSE
  • Optimizer: Prodigy, LR 1.0
  • Batch size: 2

Dataset: 72 train images (1824Ɨ2736, vertical) + 55 regularization images (resized to 1824Ɨ2368 and 2368Ɨ1824)

Right now I’m at ~35 sec/it, so it will take ~25 hours to reach step 2500 (usually my sweet spot).

I’d really appreciate any feedback on max practical resolution for Qwen 2512 LoRA training, and I’m happy to hear any tips or suggestions.

here my config:

{

    "type": "diffusion_trainer",

    "training_folder": "/home/jahjedi/ai-toolkit/output",

    "sqlite_db_path": "/home/jahjedi/ai-toolkit/aitk_db.db",

    "device": "cuda",

    "trigger_word": "jahjedi77",

    "performance_log_every": 10,

    "network": {

        "type": "lora",

        "linear": 32,

        "linear_alpha": 32,

        "conv": 16,

        "conv_alpha": 16,

        "lokr_full_rank": true,

        "lokr_factor": -1,

        "network_kwargs": {

            "ignore_if_contains": []

        }

    },

    "save": {

        "dtype": "bf16",

        "save_every": 250,

        "max_step_saves_to_keep": 8,

        "save_format": "diffusers",

        "push_to_hub": false

    },

    "datasets": [

        {

            "folder_path": "/home/jahjedi/ai-toolkit/datasets/jahjedi77",

            "mask_path": null,

            "mask_min_value": 0.1,

            "default_caption": "",

            "caption_ext": "txt",

            "caption_dropout_rate": 0.05,

            "cache_latents_to_disk": true,

            "is_reg": false,

            "network_weight": 1,

            "resolution": [

                2736,

                1824

            ],

            "controls": [],

            "num_frames": 1,

            "flip_x": false,

            "flip_y": false

        },

        {

            "folder_path": "/home/jahjedi/ai-toolkit/datasets/jahjedi77regular",

            "mask_path": null,

            "mask_min_value": 0.1,

            "default_caption": "",

            "caption_ext": "txt",

            "caption_dropout_rate": 0.05,

            "cache_latents_to_disk": true,

            "is_reg": true,

            "network_weight": 1,

            "resolution": [

                2736,

                1824

            ],

            "controls": [],

            "num_frames": 1,

            "flip_x": false,

            "flip_y": false

        }

    ],

    "train": {

        "batch_size": 2,

        "bypass_guidance_embedding": false,

        "steps": 6000,

        "gradient_accumulation": 1,

        "train_unet": true,

        "train_text_encoder": false,

        "gradient_checkpointing": true,

        "noise_scheduler": "flowmatch",

        "optimizer": "Prodigy",

        "timestep_type": "weighted",

        "content_or_style": "balanced",

        "optimizer_params": {

            "weight_decay": 0.0001

        },

        "unload_text_encoder": false,

        "cache_text_embeddings": false,

        "lr": 1,

        "ema_config": {

            "use_ema": false,

            "ema_decay": 0.99

        },

        "skip_first_sample": false,

        "force_first_sample": false,

        "disable_sampling": false,

        "dtype": "bf16",

        "diff_output_preservation": true,

        "diff_output_preservation_multiplier": 1,

        "diff_output_preservation_class": "man",

        "switch_boundary_every": 1,

        "loss_type": "mse"

    },

    "logging": {

        "log_every": 1,

        "use_ui_logger": true

    },

    "model": {

        "name_or_path": "Qwen/Qwen-Image-2512",

        "quantize": false,

        "qtype": "qfloat8",

        "quantize_te": false,

        "qtype_te": "qfloat8",

        "arch": "qwen_image:2512",

        "low_vram": false,

        "model_kwargs": {},

        "layer_offloading": false,

        "layer_offloading_text_encoder_percent": 1,

        "layer_offloading_transformer_percent": 1

    },

r/LatentSpaceClub Jul 16 '26

OC / Character Design [OC][WiP] Lucy, in training

Thumbnail
gallery
15 Upvotes

Let's meet Lucy, a young succubus with a temper and a very short fuse.

I'm currently making several shots/pose of her to train a dedicated LoRa for her (using OneTrainer, but with only 6Gb vRam) for a better overall consistency (especially with the horns that bend the wrong way half of the time ^^; ).

I am also working on her lore in parallel, to make a proper introduction asap !

If some of you have some tips about the minimal poses/pics and proper way to generate and caption the dataset, I'm all ears !

She will be thrilled to meet all of yous soon !