NovelAI aka NAI Diffusion is an anime image generator that was released in October 2022.
The tool requires a monthly subscription to use and the cheapest plan is $10.
You can however, run NovelAI for free on your own computer and get the exact same outputs as the paid version:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (1) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (1)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-14-11_10_32-Stable-Diffusion-1024x607.png?is-pending-load=1)
The installation process takes 10 minutes, minus download times. You’ll need around 10GB of free space on your hard drive.
Common points of confusion:
- Models are files that end with the checkpoint extension (.ckpt). They are used for generating a particular genre of images.
- People refer to both the official website and the leaked model as NAI Diffusion or NovelAI.
- The leaked model is sometimes referred to by its filename, animefull, or animefull_final
In this guide, we’ll show you how to download and run the NovelAI/NAI Diffusion model with the AUTOMATIC1111 user interface.
Let’s get started!
Installation
Before proceeding with installation, here are the recommended specs:
- 16GB RAM
- NVIDIA (GTX 7xx or newer) GPU with at least 2GB VRAM (AMD GPU will work, but NVIDIA is recommended)
- Linux or Windows 7/8/10/11 or Mac M1/M2 (Apple Silicon)
- 10GB disk space (includes models)
1. Download the model file
The model is all the stuff the AI has been trained on and is capable of generating. Model files end in ‘.ckpt
‘, which stands for ‘checkpoint’.
As mentioned, we’ll be downloading animefull (which is just what people call the NovelAI model).
Download a torrent client if you don’t have one already. I recommend qBittorrent (works on Windows/macOS/linux).
Add the following torrent magnet link:
magnet:?xt=urn:btih:5bde442da86265b670a3e5ea3163afad2c6f8ecc
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (2) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (2)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/Frame-148-1024x642.png?is-pending-load=1)
Deselecteverything except for the the subfolder“animefull-final-pruned
”and the file“animevae.pt
” (both are located in the /stableckpt
folder)
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (3) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (3)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/Frame-149.png?is-pending-load=1)
You will notice there are pruned models and unpruned models. A pruned model is just a compressed model. Most people use the pruned one.
While the model is downloading in the background you can move on to the next step.
2. Download the Web UI
This is the user interface you will use to run the generations.
The most popular user interface is AUTOMATIC1111’s Stable Diffusion WebUI.
I’ve tried a couple of apps and I can see why people love AUTOMATIC1111. The developers are lightning fast and they keep on adding to an already impressive and robust feature-set.
You’ll notice it’s called the Stable Diffusion interface.
Stable Diffusion is the name of the official generic models published by StabilityAI, but it is used colloquially to refer to any diffusion models.
So when people talk about “anime stable diffusion” they are most likely not referring to the generic model, but a fine-tuned model like NAI Diffusion.
Here are the installation instructions for the WebUI depending on your platform. They will open in new tabs, so you can come back to this guide after you have completed the WebUI installation:
- Installation for Windows (NVIDIA GPU):instructions
- Installation for Windows (AMD GPU): instructions
- Installation for Apple Silicon (Mac M1/M2):instructions
- Installation for Linux:instructions
3. Place the Model in the Web UI folder
After your model finishes downloading, go to the folder “novelaileak/stableckpt"
You want the following files:
model.ckpt
in folderstableckpt
/animefull-final-pruned
- This is the model file. This is the only one you actually need.
config.yaml
in folderstableckpt
/animefull-final-pruned
- This file specifies some model-specific configuration details
animevae.pt
in folderstableckpt
- This
- This
Copy these 3 files into the folder stable-diffusion-webui/models/Stable-diffusion
.
(stable-diffusion-webui
is the containing folder of the Web UI you downloaded in the previous step)
Rename the files like so:
model.ckpt
->nai.ckpt
config.yaml
->nai.yaml
animevae.pt
->nai.vae.pt
(write it exactly like this)
You can actually name these files whatever you want, as long as the name before the first “.
” is the same.
Since you will be placing all future models into this folder choose a descriptive name that helps you remember what this model is.
4. Start the WebUI
- Windows: double-click
webui-user.bat
(Windows Batch File) to start - Mac: run the command
./webui.sh
in terminal to start - Linux: run the command
webui-user.sh
in terminal to start
On the first run, the WebUI will download and install some additional modules. This may take a few minutes.
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (4) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (4)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-12-21_08_50-C__WINDOWS_system32_cmd.exe_-1024x593.png?is-pending-load=1)
Common issues at this step:
RuntimeError: Couldn’t install torch.
Fix: Make you you have Python 3.10.x installed. Type python --version
in your Command Prompt. If you have an older version of Python, you will need to uninstall it and re-install it from the Python website.
Fix #2: Your Python version is correct but you still get the same error? Delete the venv
directory in stable-diffusion-webui
and re-run webui-user.bat
RuntimeError: Cannot add middleware after an application has started
Fix: Go into your stable-diffusion-webui
folder, right click -> Open Terminal. Copy and paste this line into terminal and press enter:
.\venv\Scripts\python.exe -m pip install --upgrade fastapi==0.90.1
See more common issues in the troubleshooting section.
Open WebUI in Browser
In my command prompt, I get the success messageRunning on local URL: http://127.0.0.1:7860
So I would open my web browser and go to the following address: http://127.0.0.1:7860
.
Everything else works but not the web address
- Make sure you have not typed “
https://
” by accident, the address should start with “http://
“ - In this example my web address is
http://127.0.0.1:7860
. Yours might be different. Please read the success message in your Command Prompt carefully for the correct web address.
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (5) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (5)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2022/12/webgui-1024x563.webp?is-pending-load=1)
You’ll notice at the top there’s a toggle called “Stable Diffusion Checkpoint”.
You can use this to switch to any model you have placed in the stable-diffusion-webui/models/Stable-diffusion
folder. We’ll choose the model we renamed nai.ckpt
earlier.
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (6) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (6)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-13-20_34_52-Stable-Diffusion.png?is-pending-load=1)
If you put the model in the folder after you start the WebUI, you will need to restart the WebUI to see the model.
5. Calibrate with Asuka
Hello Asuka is a calibration test used to verify that you have everything installed and configured correctly.
The paid version of NovelAI will generate this image of Asuka from Evangelion with 95%-100% accuracy when you use the right settings:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (7) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (7)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2022/12/Bfl5qJB.png?is-pending-load=1)
If you can recreate this image with your fresh Stable Diffusion & NAI install, then you are successfully emulating NovelAI.
Go to thetxt2img
tab. Input the following values exactly:
- Prompt:
masterpiece, best quality, masterpiece, asuka langley sitting cross legged on a chair
- Negative prompt:
lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts,signature, watermark, username, blurry, artist name
- Sampling Steps:
28
- Sampling Method:
Euler
- Width:
512
- Height:
512
- CFG Scale:
12
- Seed:
2870305590
- Then, go to the
Settings
tab. Click on theStable Diffusion
section and look for the slider labeledClip skip
. Bring it to2
. Then clickApply Settings
at the top.
Click the bigGenerate
button in the upper right corner, and wait for the image to complete:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (8) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (8)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-13-20_31_18-Stable-Diffusion-1024x581.png?is-pending-load=1)
How long does it take to generate an image?
Here’s a rough estimate for image generation time depending on your GPU:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (9) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (9)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/01/chartthin-1024x610.png?is-pending-load=1)
You can expect these benchmark times to go down as the developers keep on optimising the software for faster and faster generations.
Need a better GPU to generate images faster? Check out this handy GPU guide.
My Asuka is messed up!
You want to get a result that is almost exactly the same as the target Asuka. “Close enough” probably means something is wrong.
Here are some reasons why you might not be getting the correct Asuka:
- You are not using the VAE (
.vae.pt
) file and the configuration (.yaml
) file. Check Step 3 again. - Make sure you are using
Euler
for the sampler and notEuler
a - Make sure you are using the correct model. Check the
Stable Diffusion checkpoint
dropdown on the top. If your model is correct, the number[89d59c3dde]
or[925997e9]
should appear after the model name. - Verify that you have entered all the settings correctly: Prompt (did you miss copying a letter?), Negative Prompt, Steps, CFG scale, Seed, Clip Skip in the settings etc.
- You are running Stable Diffusion on your CPU. Not only is this very slow, you will also not be able to pass the Asuka test.
- You have a NVIDIA GTX 1050ti. This specific GPU is known not to be able complete the test.
- You are using a Mac. Macs are known to have trouble completing the test.
Full list of common errors with examples.
Don’t fret if your computer cannot complete the Asuka test. You can still generate high-quality images (it just means you cannot emulate NovelAI 1:1).
NovelAI Emulation
To show you how close the emulation actually is, I’ve input the exact Asuka test settings into the official NovelAI website:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (10) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (10)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/01/Screen-Shot-2023-01-15-at-2.14.47-PM-1024x624.webp?is-pending-load=1)
Here are the results compared:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (11) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (11)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/01/Bfl5qJB_d.webp?is-pending-load=1)
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (12) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (12)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/01/eca7228f-bdad-4033-a950-cfa2de9cc929.png?is-pending-load=1)
You’ll notice the only difference is the sharpness of the separation of the red leg. This difference is acceptable because it is caused by launching the WebUI with custom parameters (–medvram, –lowvram, or –no-half ).
You can use the same settings you did in the Asuka test to emulate any NovelAI image. That is:
- Set the sampler toEuler(Not Euler A)
- Use28Steps
- Set CFG Scale to11
- Use
masterpiece, best quality
at the beginning of all prompts - Use
nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name
as the negative prompt - In the Settings tab click Stable Diffusion sub-section, and change the Clip skip sliderto2and then click “
Apply settings
“
Prompting
Basics
- AUTOMATIC1111 does not save your image history! Save your favorite images or lose them forever.
- Begin your prompts with
masterpiece, best quality
(the NovelAI website does this by default). - Start with the following in the Negative prompts:
lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name
- Use
-1
in the seed field to randomize it, or specify a seed to ensure consistency across generations.
I’ve written some detailed prompt techniques to improve your image results. If you are using this guide, replace {}
with ()
. Stable Diffusion uses ()
while the NovelAI website uses {}
.
Danbooru Tags
The fastest way to improve your prompting is by checking out Danbooru tag groups.
For the unacquainted, Danbooru is the largest anime imageboard (as well as one of the top 1000 websites in the world by traffic).
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (13) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (13)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-14-11_18_53-Danbooru_-Anime-Image-Board-1024x572.png?is-pending-load=1)
All anime models use Danbooru for all/part of their training data.
The reason Danbooru makes such a good dataset for AI/ML models is its robust tagging system. Every single image hastagsthat summarize everything in the image, from the major categories (artist, character, fandom) to the tiniest of details (‘feet out of frame
‘, ‘holding food
‘, ‘purple bowtie
‘, etc).
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (14) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (14)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/Frame-3-1024x721.png?is-pending-load=1)
If a Danbooru tag has 1K+ images, there is a high likelihood that NovelAI ‘knows’ what it is. Check individual tags to make sure they have enough images.
This explains why NovelAI can’t generate some ‘popular’ characters.
The characters simply don’t have enough fanart on Danbooru.
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (15) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (15)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/Group-2.png?is-pending-load=1)
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (16) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (16)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/00027-1685050112.png?is-pending-load=1)
masterpiece, best quality, hakurei reimu
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (17) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (17)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/00030-2373171826.png?is-pending-load=1)
masterpiece, best quality, hatsune miku
Tip: For characters, you’ll get the best results by writing character names exactly as they are tagged in Danbooru.
Prompting Guides
Here are the best resources I’ve found so far (email me if you have something you’d like to add to this list):
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (18) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (18)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-13-21_50_33-%E7%9B%AE.png?is-pending-load=1)
P1atdev
Most comprehensive NovelAI prompt library for all character features. Only in Japanese.
https://p1atdev.notion.site/p1atdev/611b109989c54ffca6219edd95d1b247
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (19) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (19)](https://i0.wp.com/149868225.v2.pressablecdn.com/wp-content/uploads/2023/02/2023-02-13-21_48_22-%E5%85%83%E7%B4%A0%E6%B3%95%E5%85%B8%E2%80%94%E2%80%94Novel-AI-%E5%85%83%E7%B4%A0%E9%AD%94%E6%B3%95%E5%85%A8%E6%94%B6%E5%BD%95.png?is-pending-load=1)
Codex of Quintessence
Gigantic Chinese tome of prompt knowledge, divided into multiple scrolls.
Models to try next
NovelAI/NAI Diffusion is certainly the most well known anime model.
Naturally you’ll want to try other models. Here are some recommendations:
![How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (20) How to Download and Run NovelAI for Free [NAI Diffusion] - AiTuts (20)](https://i0.wp.com/betterwaifu.com/wp-content/uploads/2023/01/suiart-1.webp?is-pending-load=1)
NovelAI (NAI Diffusion)
The one you just installed. I recommend supporting the paid version if you like it.
For more models, check out this full list of anime models.
Conclusion
Models and new features for the WebUI are coming out every day. This article will be updated as time goes on. In the meantime, get updated on the latest Stable Diffusion news or join the conversation:
Troubleshooting
RuntimeError: Couldn’t install torch.
Fix: Make you you have Python 3.10.x installed. Type python --version
in your Command Prompt. If you have an older version of Python, you will need to uninstall it and re-install it from the Python website.
Fix #2: Your Python version is correct but you still get the same error? Delete the venv
directory in stable-diffusion-webui
and re-run webui-user.bat
RuntimeError: Cannot add middleware after an application has started
Fix: Go into your stable-diffusion-webui
folder, right click -> Open Terminal. Copy and paste this line into terminal and press enter:
.\venv\Scripts\python.exe -m pip install --upgrade fastapi==0.90.1
Get the email that makes keeping up with AI easy and fun. Stay informed and entertained, for free.