How to Train a NSFW LoRA in 2026: Complete Guide (Kohya, OneTrainer, Cloud)

13 min read

Quick verdict: Training a NSFW LoRA in 2026 takes between thirty minutes and two hours of compute on top of one hour of dataset prep. You can train in the cloud (hosted trainers such as Fal.ai, or a rented GPU on RunPod) or locally with kohya_ss, OneTrainer or AI-Toolkit on your own GPU, where the only running cost is electricity. Per the sd-scripts docs, an SDXL LoRA trains on as little as 8 GB of VRAM (10 GB recommended). Train on fictional characters and styles only, never real people. The single biggest determinant of LoRA quality is your dataset, not your hyperparameters: twenty to thirty hand-curated images with consistent captioning beat one hundred random images every time.

This guide walks through the full LoRA training pipeline: what a LoRA is and when to use one instead of a full checkpoint, how to assemble a NSFW dataset that does not waste compute, captioning conventions for the major base models (Pony XL, Illustrious-SDXL, SDXL 1.0), the eight hyperparameters that actually matter (and the dozen that do not), platform-by-platform cost comparison, troubleshooting overfitting and undertraining, and the Civitai upload rules you need to know in 2026 to avoid getting your LoRA removed.

What a LoRA is and when to train one

LoRA stands for Low-Rank Adaptation. Mechanically, it is a small set of weight modifications that you load on top of a full base model (like Pony Diffusion XL) at inference time. The base model contributes ninety-five percent of what the image looks like; the LoRA injects the specific concept you trained on. Use a LoRA when you want to add one of: a specific fictional character, a specific art style, a specific clothing or outfit type, a specific pose or composition pattern, or a specific NSFW act or anatomical detail that the base model handles poorly.

Do not train a LoRA when you want a fundamental change to the base model (that requires a full fine-tune or merged checkpoint instead), or when a Textual Inversion embedding will work (cheaper, smaller, but less powerful). For most NSFW concepts that go beyond what Pony or Illustrious handle out of the box, LoRA is the right tool.

The one hard rule: for NSFW, train only on fictional adult characters, art styles, poses and outfits. Never train a NSFW LoRA on photos of a real person, whether a celebrity, an ex, a coworker or anyone else.Sexual images of real, identifiable people without consent are illegal in many countries, and the big model sites ban them. Good dataset sources are images you generated yourself, your own artwork, or work you hold the rights to.

sd-scripts documentation: SDXL LoRA training works with 8 GB of VRAM, 10 GB recommended, train U-Net only
From the sd-scripts docs: SDXL LoRA training on 8 GB (10 GB recommended); train the U-Net only.

Dataset preparation: the single biggest factor

For a character LoRA: twenty to thirty images, varied poses, varied outfits, varied backgrounds, consistent face and body. For a style LoRA: forty to sixty images, varied subjects, identical or near-identical style. For a pose or act LoRA: fifteen to twenty-five images showing the act from multiple angles. Image resolution should be 1024×1024 or higher for SDXL-based training; the trainer will downscale as needed. Crop tightly when the subject matters more than the environment.

Captioning is where most LoRAs fail. Each image needs a text file with the same base name (image01.png needs image01.txt) containing comma-separated tags. The convention for Illustrious and Pony is to use the Danbooru tag system. Include a unique trigger word at the start of every caption (something nobody else will use, like my_character_xyz), then add descriptive tags for everything you do not want the LoRA to learn as a fixed attribute. The principle: anything you caption gets learned as a variable; anything you skip gets baked in as a constant.

Platform comparison: Fal.ai vs RunPod vs Kohya local

PlatformSetupCostBest for
Fal.aiAPI callPay per training runQuick iteration
RunPodRented GPU (kohya_ss template)Pay per GPU hourCustom configs
kohya_ss, OneTrainer or AI-Toolkit locallySelf-installElectricityVolume training, privacy

Fal.ai exposes a clean API for LoRA training on Flux and SDXL bases. Upload your zip of captioned images, set base model and a handful of parameters, get a downloadable .safetensors file. It charges per run; check the current price on its pricing page before you start. Best for users who want a one-shot training without setup overhead. Note that your dataset is uploaded to their servers.

RunPod rents GPU instances by the hour, priced per card. The kohya_ss project ships its own RunPod setup guide: spin up a pod, upload your dataset, train, download the result, then shut the pod down so the clock stops. Best for users who want custom hyperparameters or are training many LoRAs in batch.

Local training with kohya_ss, OneTrainer or AI-Toolkit is the long-term cheapest option and keeps your dataset private. The sd-scripts documentation says SDXL LoRA training works with 8 GB of VRAM (10 GB recommended) if you train the U-Net only, use gradient checkpointing, cache latents and text encoder outputs, use an 8-bit optimizer or Adafactor and keep the rank low (4 to 8 on 8 GB). More VRAM simply makes it faster and lets you raise the rank. Expect an afternoon of setup. After installation, training cost is electricity. Best for users planning to train more than ten LoRAs total.

The eight hyperparameters that actually matter

Network dimension (rank): 16 for characters, 32 for styles, 64 if you have lots of data and need detail. Higher rank means larger LoRA file and longer training but more capacity.

Network alpha: half of network dim is a safe starting point. Lower alpha means stronger learning, higher alpha means more conservative.

Learning rate: about 1e-4 for the U-Net is a common community starting point. For SDXL, the sd-scripts docs highly recommend training the U-Net only (--network_train_unet_only), because SDXL has two text encoders and training them gives unexpected results. Lower it if you see overfitting; raise it carefully if undertraining.

Optimizer: AdamW8bit for low VRAM, Prodigy for hands-off (it adjusts the learning rate itself, so set the learning rate to 1). Adafactor is the other option the sd-scripts docs list for low memory.

Epochs: 10 to 20 for characters, 20 to 40 for styles. Always save intermediate checkpoints (every 2 epochs) and test each.

Batch size: 1 on 8 to 12 GB cards, 2 to 4 with more VRAM. Higher batch size means smoother but slower.

Resolution: 1024 for SDXL bases. Do not downsize during training; let the trainer handle it.

Repeats per image: 10 to 20 for character LoRAs, 5 to 10 for style. Higher repeats with fewer epochs equals lower repeats with more epochs but is often more stable.

Testing and troubleshooting

After training, test the saved checkpoint at every saved epoch (not just the final one). Generate a grid: same prompt, same seed, with LoRA strength from 0.4 to 1.0 in 0.1 increments. The strongest results usually land between 0.6 and 0.9. If 1.0 is best, you might be undertrained; train more epochs. If 0.4 is best, you are overfit; train fewer epochs or lower the learning rate.

The two failure modes: overfitting (LoRA produces the same pose or background regardless of prompt) and undertraining (LoRA effect is weak even at strength 1.0). Overfitting fix: more varied dataset, fewer repeats, fewer epochs. Undertraining fix: more epochs, higher learning rate, or more images.

For related techniques, see our character consistency methods guide, the negative prompts master list, and the how-to pillar.

OneTrainer README: supported models including Z-Image, Qwen Image, FLUX and SDXL, with LoRA training
OneTrainer supports SDXL, FLUX, Z-Image, Qwen Image and more, with LoRA, full fine-tuning and embeddings.

Civitai upload rules 2026

If you plan to share your LoRA on Civitai, note that since 16 April 2026 adult content lives on its separate official domain, civitai.red (background: civitai.red vs civitai.com). Its rules ban anything involving minors and restrict real-person likenesses, and they change often, so read the current content policy on the site before you upload rather than relying on a summary. Document your trigger words in the description, and make sure your sample images follow the same rules as the LoRA itself.

Once you have trained your own LoRA, see our ranking of the best NSFW LoRAs in 2026 by base model to compare your output against the community’s most-downloaded picks.

Frequently asked questions

How long does it take to train a NSFW LoRA in 2026?

Compute time is twenty minutes to two hours depending on dataset size and GPU. Add one hour for dataset prep and captioning. Total wall-clock time for a first-time trainer is roughly half a day. Subsequent LoRAs go faster once you have the workflow down.

What is the minimum number of training images for a LoRA?

Twelve to fifteen high-quality, varied images is the realistic floor for a character LoRA. Below that and the model has too little signal. Twenty to thirty is the sweet spot. More is not always better if the additional images are repetitive or low quality.

What is the best LoRA training platform in 2026?

Fal.ai for ease of use (API call, no setup, pay per run). RunPod for custom settings on a rented GPU (pay per hour). Locally, kohya_ss is the most used for SDXL, Pony and Illustrious; OneTrainer installs more easily and covers newer models; AI-Toolkit is popular for FLUX, Qwen-Image and Z-Image.

How much does it cost to train a NSFW LoRA?

Cloud prices change, so check them on the day: hosted trainers like Fal.ai charge per run and RunPod charges per GPU hour, which for an SDXL LoRA is usually a few hours. Locally the only running cost is electricity, and an 8 to 10 GB card is enough for SDXL LoRAs per the sd-scripts docs. If you would rather skip training entirely and just generate, a paid browser service such as AI Nudez is the other route.

Can I train a NSFW LoRA on Google Colab’s free tier?

Do not count on it. Colab’s free tier gives limited, unguaranteed GPU time, and Google has restricted some image-generation notebooks on the free tier before. Read Colab’s current terms first; a short rented GPU or a local 8 to 10 GB card is the more reliable path.

What is the best base model for NSFW LoRA training in 2026?

Pony Diffusion V6 XL for character and act LoRAs, Illustrious XL v1.0 (or a popular Illustrious fine-tune) for anime, RealVisXL V5.0 for realism. All three are SDXL based and 6.94 GB each on Hugging Face. FLUX.1-dev LoRAs are possible with AI-Toolkit, whose FLUX example config targets 24 GB of VRAM. Train on the base you will actually generate with: a Pony LoRA loads on Illustrious but usually looks worse.

Can I sell LoRAs trained on a NSFW base model?

It depends on the base model’s license. Pony Diffusion V6 is published under CreativeML OpenRAIL-M on its Hugging Face page, and SDXL 1.0 uses the OpenRAIL++ license; both carry use restrictions you must pass on. FLUX.1-dev has a non-commercial license. Read the license on each model page before selling anything, and never sell LoRAs of real people.

Can I train a NSFW LoRA on photos of a real person?

No. Sexual images of real, identifiable people without their consent are illegal in many countries, and major model sites remove such LoRAs. Use fictional characters, images you generated yourself or your own artwork.

How do I caption images for NSFW LoRA training?

Use comma-separated Danbooru-style tags. Start each caption with your unique trigger word. Caption everything you want as a variable (clothing, pose, background, expression). Skip what you want baked in as a constant (the character face for a character LoRA). Use automatic taggers like wd14-tagger as a starting point and edit manually.

Dataset curation: the failure modes nobody talks about

The captioning advice covered earlier handles the typical case. The failure modes that wreck LoRAs in 2026 are subtler. Lighting consistency in your dataset: if every training image is shot in the same warm bedroom light, the LoRA will refuse to generate the character in any other lighting condition without weight reduction. Mix at least three lighting styles (warm interior, cool daylight, dramatic studio). Background variety: if half your training images share the same brick wall, the LoRA will hallucinate that wall on future generations. Crop tightly or use diverse backgrounds.

Pose diversity matters more than expression diversity. Twenty images of the same pose with different facial expressions teaches the model the pose, not the character. Twenty images of different poses with the same neutral expression teaches the character much better. Plan your dataset around pose variation. The Kohya sd-scripts training documentation has more detail on dataset structure for advanced setups.

Official kohya_ss Windows install with uv: Python 3.11.9, CUDA Toolkit 12.8 and Git
The official kohya_ss Windows install (uv method): Python 3.11.9, CUDA 12.8, Git.

After-training: how to actually deploy your LoRA

Once trained, drop the .safetensors file in the LoRA folder of your inference UI (Forge Neo or Automatic1111: models/Lora; ComfyUI: models/loras). Reference it in prompts using <lora:filename:0.8> where 0.8 is the strength. Start at 0.7, test, scale up or down. For NSFW-specific LoRAs, you almost always want strength 0.6-0.9 to balance the LoRA against the base model’s anatomy training.

If you plan to share, upload to Civitai with: a clear trigger word documented in the description, sample images that demonstrate variety (not just one pose), license terms explicit (commercial vs non-commercial, redistribution allowed or not), and the base model the LoRA was trained on (Pony XL, Illustrious-SDXL, SDXL 1.0, Flux). Without these, your LoRA will get downloads but little use. If you just want results without training anything, AI Nudez runs in the browser. For consistent characters built on top of your LoRA, layer it with the techniques in our character consistency guide.

Iterating on a LoRA that did not turn out right

Most first LoRAs are imperfect. The iteration workflow that actually improves outcomes: save each training run with a versioned filename (character-v1.safetensors, character-v2.safetensors) so you can compare. Test each version with a fixed prompt grid: same prompt, same seed, strength sweep from 0.4 to 1.0. The version that produces the most usable output across that sweep is the one to ship.

If v1 was overfit, v2 needs: fewer training repeats per image, lower epoch count, or more dataset variety. If v1 was undertrained, v2 needs: more epochs, higher learning rate, or more (better) training images. Make one change per iteration so you know what moved the needle. The community-maintained LoRA training rentry has further troubleshooting trees for specific failure modes.

For combining your trained LoRA with character consistency techniques see our consistency methods guide; for using it in a creator workflow see the OnlyFans creator workflows guide.

More NSFW AI video guides:

More control and editing guides:

Ready to train your own model? Related guides:

New to NSFW AI? Learn the basics: