[Tutorial] Beginner’s Guide to Stable Diffusion NSFW/Hentai Generation

[Tutorial] Beginner’s Guide to Stable Diffusion NSFW/Hentai Generation

g

By gerogero

Updated: September 25, 2024

There isn’t any very clear material on how to use Stable Diffusion for NSFW/nude/porn/hentai generation, so today I’m going to go over the following in detail:

  • How to download NSFW Stable Diffusion models
  • How to install AUTOMATIC1111 Stable Diffusion WebUI (we need a interface to generate with, WebUI just means the interface is web browser based)
  • Downloading LoRAs and embeddings (files that act as model extensions) to improve your results
  • Getting started with NSFW prompting and generation
  • Pony Diffusion explainer: why Pony is a technological revolution in Hentai
  • Creating NSFW animated GIFs

This guide is intended to get you generating quality NSFW images as quickly as possible.

If you follow the steps below exactly, you’ll be able to generate the following images:

I also recommend these guides as supplemental reading:

The advantage of following this guide is you’ll end up with a very customizable and free setup that will let you use any model and generate images with your computer’s hardware.

However, there is a free generator on this site that will give you a preview of the things we’ll be doing in this guide:

That’s my shameless plug right before we dive in. It really is shameless though, because it really is good. I know you don’t believe me so you’ll just have to try it later.

Enough. Let’s get started!

1. Download a Stable Diffusion NSFW model

Civitai.com is the home of NSFW models. Civitai will only show you the NSFW models if you have an account. 

Sign up for an account and then go to your settings (Top right Account button > Account settings) and turn on Show me adult content and turn off Blur adult content.

Now you can see all NSFW models.

As an example, I’m going to download Chilloutmix, a great NSFW model.

Models come in either checkpoint (.ckpt) or safetensor (.safetensor) file format, both are fine to use, but .safetensor is newer and safer.

2. Install AUTOMATIC1111’s Stable Diffusion WebUI

This is the user interface you will use to run the generations. AUTOMATIC1111 is the most downloaded user interface for Stable Diffusion.

Installation instructions for different platforms:

Installation on Windows 10/11 with NVIDIA GPUs

This is the simplest and most straightfoward installation.

  1. Download the zip file sd.webui.zip from this link: v1.0.0-pre and extract its contents.
  2. Run update.bat.
  3. Run run.bat.

Installation on Windows with AMD GPU

Follow the official instructions. Note that performance will not be as good as if you had an NVIDIA GPU.

Installation on Apple Silicon

Follow the official instructions. I don’t have a Mac so I’m not familiar with the performance.

3. Place the model in the Web UI folder

When the AUTOMATIC1111 installation is complete, you will have a folder somewhere on your hard drive called stable-diffusion-webui.

After your model file (.cpkt or .safetensor) is finished downloading, place it in the folder stable-diffusion-webui/models/Stable-diffusion

(stable-diffusion-webui is folder containing the WebUI you downloaded in the first step)

Google Colab setups normally require you upload this model to Google Drive and connect the notebook to Google Drive.

Start the WebUI

  • Windows: double-click webui-user.bat to start
  • Linux: run webui-user.sh to start
  • Mac: run ./webui.sh to start

You will know it’s ready when you see the line Running on local URL: http://127.0.0.1:7860

Go to this address in your web browser: http://127.0.0.1:7860

You’ll notice at the top there’s a toggle called “Stable Diffusion Checkpoint”.

You can use this to switch to any of the NSFW models you have placed in the stable-diffusion-webui/models/Stable-diffusion folder.

You can go back to civitai.com and download as many models as you want. After placing models in the stable-diffusion-webui/models/Stable-diffusion folder make sure you click the refresh button.

3. Download LoRAs

By now you can already start prompting and getting results.

However, for best results, I recommend picking up some LoRAs.

What are LoRAs? They’re smaller models trained on a specific subject (such as an art style, a character, a body type, a sex act etc).

Basically you use them in combination with the checkpoint model you downloaded in the first step. There are LoRAs for everything, and people keep on making more of them.

Thankfully, LoRAs have much smaller file sizes than checkpoint models. You can use as many LoRAs as you want in a single prompt.

You activate your LoRAs by adding a special phrase inside your prompt. We’ll get to that in a bit.

I’m going to download the following popular LoRA breastInClass for this example, a LoRA that creates bodies with better proportions.

After downloading this .safetensor file, place it in the folder stable-diffusion-webui/models/Lora

4. Download Embedding

This step is optional, but highly recommended because it will make your images higher quality.

Think of embeddings as a snapshot of a lot of concepts. We normally use negative embeddings: by putting lots of negative concepts such as “bad quality image” in our negative prompts, we get better images.

Download the embedding called easynegative. Then place this file in the folder stable-diffusion-webui/embeddings.

5. Prompt!

By now you should have downloaded the following files:

  • ChilloutMix and placed it in stable-diffusion-webui/models/Stable-diffusion
  • breastInClass and placed it in stable-diffusion-webui/models/Lora
  • EasyNegative and placed it in stable-diffusion-webui/embeddings

Reload/restart your WebUI (scroll to the footer, click Reload UI).

In the prompt field, copy and paste this prompt:

8k, RAW photo, highest quality, masterpiece, High detail, RAW color photo, professional close-up photo, (realistic, photo realism:1. 37), (highest quality), (best shadow), girl sitting by the pool side ,nude ,(naked:1.2), blonde, spreading pussy, (spreading thigh:1.4), butterfly legs, photorealistic, looking at viewer, beautiful detailed eyes, light on face, (fullbodyshot:1.1),Particularly strong light, Feminine Expressions, (small breast:1.4), skinny body, white skin, ((erotic, sexy, horny)) ultra high resolution, highly detailed CG unified 8K wallpapers, physics-based rendering, cinematic lighting, ((good anatomy:1.2)),detailed areolas, detailed nipples, detailed breasts, (extremely detailed pussy),detailed face <lora:breastinclassBetter:0.2>

In the negative prompt field, copy and paste this prompt:

easynegative, muscular, (suntan:2), (sleeves:2), (tattoo:2), (sunglasses:2), (inverted nipples), (mutated:2), (worst quality:2), (low quality:2), (normal quality:2), lowres, blurry, ((nasolabial folds):1.2), 3d, anime, cartoon, cg, comic, drawing, bad detailed background, cropped, grayscale, jpeg artifacts, monochrome, non-linear background, out of frame, paintings, poorly drawn, semi-realistic, sepia, sketches, unclear architectural outline, asymmetric eyes, bad anatomy, cloned, crooked teeth, deformed, dehydrated, disfigured, double nipples, duplicate, extra arms, extra fingers, extra legs, extra limbs, long fingers, long neck, malformed limbs, missing arms, missing legs, missing teeth, more than five fingers on one hand:1.5, more than two arm per body:1.5, more than two leg per body:1.5, mutated, mutation, mutilated, odd eyes, ugly, (artist name:2), (logo:2), (text:2), (watermark:2), acnes, age spot, dark spots, fat, fused, giantess, glans, mole, obesity, skin blemishes, skin spots, animal ears, elf-ears, earrings, childish, morbid

Some notes on the above:

  • Notice how the LoRA is used at the end of the prompt
    <lora:FILENAME_OF_LORA_WITHOUT_EXTENSION:WEIGHT>
    Where weight is a number from 0-1 describing how strong you want the effect of the LoRA to be. Shortcut: you can click on the LoRA tab underneath the negative prompt to see all your LoRAs (click refresh if you don’t see anything), and click on them to automatically add the LoRA phrase to your prompt.
  • Inside the negative prompt you’ll also see the embedding “easynegative”: all you have to do is mention its name to use it.

Change the following settings:

  • Set the height slider to 768 and keep the width at 512 to create a nicer aspect ratio more suitable for portraits.
  • Change the Sampling method to DPM++ 2M Karras. This is a very versatile sampling method that I use for 80% of my generations.
  • Set the seed to 3740919403. The number itself doesn’t matter, but the same seed with the same settings and prompt will always produce the same image. So you can reliably reproduce the images in this guide if you use the same seed as me.

Then click Generate! Here’s what I get:

If you’re getting bad/ugly results, make sure you have the LoRA and embedding downloaded, placed in the proper folders, and used correctly in your positive and negative prompts. Also make sure you are using the DPM++ 2M Karras sampling method.

We’re not doing anything fancy here. The only things we’ve changed from the default settings is increasing the height, changing the Sampling method, and setting a Seed value.

You can also click the dice next to the Seed field to change the seed to -1, which just means “random seed every time”. This will produce a unique image every time you generate.

Here are some variations of our prompt with random seeds:

Next, let’s try a sex act.

Here’s a shortcut: instead of copying each prompt over and manually adjusting the settings, copy this whole block into your Prompt field. Then press the blue button under the “Generate” button and AUTOMATIC1111 will automatically fill everything in for you.

(1boy, 1girl, penetration,girl lying on back, spread legs:1.6) (a girl having sex in a missionary position:1.2) (missionary sex, sex, penis in pussy, pussy out, lying in bed, orgasm face, blush, sweaty) beautiful, masterpiece, best quality, extremely detailed face, perfect lighting (skinny) ((puffy eyes)),small breasts, swept bangs,walking,outdoors,sunshine,light_rays,fantasy,rococo,hair_flower,low tied hair, smile,half-closed eyes, ,dating,(Nude), nsfw, (heavy breathing:1.2) ,tears, crying, blush, wet, sweat, <lora:breastinclassBetter:0.1>

Negative prompt: paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot,(ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), bad hands, missing fingers, extra digit, bad body,pubic

Steps: 25, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1410211169, Size: 512x768, Model hash: fc2511737a, Model: chilloutmix_NiPrunedFp32Fix, Lora hashes: "breastinclassBetter: d62716438a56", Version: v1.6.0
The blue arrow button underneath “Generate”

Then simply click Generate. Here’s what I get:

Here are some other generations with the same prompt, but a random seed:

Different models are better at different things. You should check out this list of NSFW models for other recommendations.

Chilloutmix is not actually that great at sex, which is why this prompt produces unpredictable results. The ones above have been cherry-picked.

6. Using an Anime Hentai Model

Now let’s create some Hentai using an anime model.

Download the model DarkSushiMix, which is a very good anime model. Place it in your models folder stable-diffusion-webui/models/Stable-diffusion.

Make sure you select this model in the Stable Diffusion checkpoint field: (click the blue refresh button if you don’t see it).

Use the follow prompt and settings (same method as before, copy and paste this to your prompt field and then click the blue arrow underneath the Generate button):

masterpiece, best quality, beautiful lighting, (1boy, 1girl, penetration, spread legs, a girl having sex in a missionary position:1.2) (sex, penis in pussy, pussy out, lying in bed, orgasm face, blush, sweaty) nude nsfw, long hair, skinny, wide hips, medium breasts,
Negative prompt: paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot,(ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), bad hands, missing fingers, extra digit, bad body,pubic

Steps: 25, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 338664335, Size: 512x768, Model hash: cca17b08da, Model: darkSushiMixMix_225D, Version: v1.6.0

You should get this result:

8. Using Pony Diffusion: A Technological Revolution in Hentai

A hentai guide wouldn’t be complete without a section on Pony Diffusion.

Pony Diffusion started as a model that could draw my little pony characters (and porn of them).

The creators realized that adding other content, including furry art and anime made the model better. Because it was trained on so many niche fetishes and sex positions, it became better at hentai and combining fetishes than most otherexisting models.

Today it’s usage goes far beyond Pony porn; most people use it to generate anime and stylized porn.

Now, you can use either the base model Pony Diffusion XL or a custom model that has been trained off of it. Today we’re going to use one called Pony Realism, one of the better realistic pony models.

Download Pony Realism

Place the downloaded models in your models folder stable-diffusion-webui/models/Stable-diffusion.

Then download the following LoRAs:

Same as before, place the LoRAs in the folder stable-diffusion-webui/models/Lora.

Use the follow prompt and settings (same method as before, copy and paste this to your prompt field and then click the blue arrow underneath the Generate button, this will automatically set the correct model, prompts, and settings):

score_9,score_8_up,score_7_up,score_6_up, 1girl, on bed, medium breasts, elsa frozen, long braid over shoulder, platinum blonde, tiny waist, exposed breasts, close up, head on pillow, pov, pussy, wet spot, Ice blue panties, grool, (pov hands removing panties, /male hands removing panties/), petite, <lora:Fant5yP0ny:0.6> <lora:Rawfully_Stylish_v0.2:0.6>
Negative prompt: score_6, score_5, score_4, pony, gaping, censored, furry, child, kid, chibi, 3d, photo, monochrome, elven ears, anime, multiple cocks, extra legs, extra hands, mutated legs, mutated hands, open mouth, closed eyes, big man, high man, muscular man, muscular hands, face,

Steps: 30, Sampler: Euler a, Schedule type: Automatic, CFG scale: 7, Seed: 28174397, Size: 832x1216, Model hash: 059934ff58, Model: ponyRealism_v21MainVAE, Clip skip: 2, Lora hashes: "Fant5yP0ny: a493698332df, Rawfully_Stylish_v0.2: 9ebd469fe368", Version: v1.9.4

You were get something like this:


Animated NSFW GIFs and Videos

You can actually produce short animations of all the images above!

You will need minimum 8GB VRAM with an NVIDIA GPU to do this.

In addition, you must cut your prompt and negative prompt to below 75 tokens (token count is displayed in the top right corner of prompts) for this to work.

Here is the full tutorial for animated GIFs with Stable Diffusion.


Next Steps

You can check out these basic prompts for where to get next:

I also highly recommend experimenting with combinations of popular LoRAs and models and seeing what you get:

Happy hentai prompting!