Stable Diffusion is a machine learning model developed by Stability AI to generate digital images from natural language descriptions. The model can be used for different tasks like generating image-to-image translations guided by text prompts and upscaling images.
Unlike competing models like DALL-E, Stable Diffusion is open source and does not artificially limit the images it produces. Stable diffusion was trained on a subset of the LAION-Aesthetics V2 data set. It can run on most consumer hardware equipped with a modest GPU and was hailed by PC World as "the next killer app for your PC".
Since Stable Diffusion is run locally and not in the cloud, as mentioned there is no limit to the number of images that you can produce but in order to use it you will have to get down a little dirty with setting your PC environment for it since it is not really an application, it is a command line text based descriptor that will use python to generate your images, so there is no install nor GUI.
In this guide, we will show you how to both install and run Stable Diffusion on your local PC so you can start producing some cool images all by yourself.
Make no mistake, Stable Diffusion will not run on a potato PC, in order to harvest the power of AI-generated imagery this is what you will need:
For this tutorial, we are covering the installation and running of Stable Diffusion on Windows PC. The steps presented here are presented in a way that installation can be performed on any operating system but precise instructions will be for Windows OS.
The first thing to do is to install GIT. It is a tool that will let you easily maintain and install repos from the internet. to install it go to: https://git-scm.com/ and click on download. Follow the instructions for your version of the operating system. If you are a developer you are familiar with GIT and if you already have it installed you can skip this step.
One thing that is important when installing GIT locally is to select to use it via the command line (the second option that says "Git from the command line and also from 3rd-party software").
Now when we have GIT installed, next thing is to use Miniconda3 to install python and all required libraries that are needed. Get the installer at: https://docs.conda.io/en/latest/miniconda.html
Miniconda3 is basically an easy installer so you do not have to install tons of stuff manually from different websites and sources, it is nicely packaged in the installer that will take care of everything.
After the previous two steps, we are ready now to actually install Stable Diffusion. Go to https://huggingface.co/CompVis/stable-diffusion#model-access and install the latest library (as of the writing of this article currently it is stable-diffusion-v1-4-original, the last one on the right), the library is almost 5GB in size so be prepared for big download.
After installing stable diffusion's latest library it is time to update it to the newest version. You can download ZIP from GIT HUB https://github.com/CompVis/stable-diffusion
Once downloaded click on the Windows start button and type in Miniconda3 and click on open. Create a folder and name it how you want on a drive of your choice. For this example, we will install it all in disk C under folder AI_art, follow the instructions below but use your own names and destination instead. Do not close Minicoda3 after typing commands!!!
cd c:/
mkdir AI_art
cd AI_art
Extract GitHub files that you have downloaded into your new folder and get back to Minicoda3 and type the next commands:
cd C:\AI_art\stable-diffusion-main
conda env create -f environment.yaml
conda activate ldm
mkdir models\ldm\stable-diffusion-v1
Let the whole process finish, some files are large and it might take a while. After the whole process is finished and completed, copy the checkpoint file that you have downloaded into: C:\AI_art\stable-diffusion-main\models\ldm\stable-diffusion-v1
After the file is copied rename it to model.ckpt and you are finished.
The created environment is needed in order to actually use Stable Diffusion to create images. Each time you want to use it you will have to run it, so go into Miniconda3, and inside it type:
conda activate ldm
cd C:\AI_art\stable-diffusion-main
after we are inside the folder call the script with the parameters:
python scripts/txt2img.py --prompt "TXT DESCRIPTION OF IMAGE THAT YOU WANT TO CREATE" --plms --n_iter 5 --n_samples 1
and that's it, your image is created and it is located in C:\AI_art\stable-diffusion-main\outputs\txt2img-samples\samples
Code 16 is a type of Device Manager error code. Windows XP users are most likely to encounter it. This error pops on XP systems that are running legacy or not plug-and-play hardware.
Error code 16 is displayed in the following format:
‘Windows cannot identify all the resources this device uses. (Code 16)’
Error code 16 occurs when you use a peripheral device such as an external drive or a printer and that device is not properly or completely configured. Though the device may have been recognized before Windows fails to verify its configuration. Simply put, error code 16 appears when devices are partially configured.
In addition to this, another cause of error 16 is outdated or corrupt device drivers. Devices often fail to run successfully because of driver problems.
Device drivers are programs that provide instructions to control different devices attached to the computer system such as audio devices and printers to name a few.
Though error code 16 is not fatal like other PC error codes such as BSoD; however, it may hamper your ability to use certain devices installed on your system and lower your work productivity.
To avoid inconvenience, it is advisable to resolve the error immediately to avoid inconvenience.
PC error codes are often considered technical and difficult to resolve which is why many prefer to hire a professional for the repair job rather than doing it themselves.
Small repair jobs like fixing error code 16 by a professional computer programmer may cost you hundreds of dollars.
So, why incur so much cost when you can repair it easily by yourself even if you are not a technical whiz.
Error code 16 is easy to repair.
Here are some effective DIY methods that you can use for resolving error code 16 on your PC. These methods require no technical background, knowledge or expertise for that matter. Just simply follow the instructions and resolve the error code 16 issue.
Let’s get started…
Run setup from the disk that came with the hardware device, or you can simply copy the setup software file to your hard drive/flash drive. Refer to the vendor’s direction to set up.
If for any reason you’re unable to find the directions, simply uninstall the device. Then go to the start menu, Control Panel, and select ‘Add New Hardware’.
Now pick the appropriate hardware and follow the steps that the Wizard suggests. This is most likely to resolve the error code.
Nonetheless, if the error code still persists, then try method 2.
Another alternative method to resolve error code 16 is to allocate more PC resources to the device. To specify additional resources:
As previously stated above, device manager error codes like error code 16 may also occur due to driver problems. If this is the underlying reason for error code 16 on your system, then the best way to resolve it is to install DriverFIX.
DriverFIX is user-friendly, advanced, and feature-filled software deployed with an intelligent programming system, which detects all problematic device drivers automatically in seconds.
It matches these drivers with their latest versions and updates them smoothly without any hassle, resolving error code 16 right away.
And furthermore, once you install this software on your PC, you don’t have to worry about driver problems anymore typically because it updates drivers on a regular basis with compatible and new versions, ensuring that your computer functions properly. It is easy to install and is compatible with all Windows versions.
Click here to download DriverFIX to repair error code 16
“This application has failed to start to run on Windows because MSASCUI.exe cannot be found.” “Windows Defender cannot work properly and protect the Windows system effectively”The message will keep popping up on your computer screen time and again.
“There were some problems installing updates, but we’ll try again later. If you keep seeing this and want to search the web or contact support for information, this may help – (0x80240438).”To resolve Error Code 0x80240438, here are some potential fixes you need to check out:
“This setting allows you to remove access to Windows Update. If you enable this setting, all Windows Update features are removed. This includes blocking access to the Windows Update Web site at http://windowsupdate.microsoft.com, from the Windows Update hyperlink on the Start menu, and also on the Tools menu in Internet Explorer. Windows automatic updating is also disabled; you will neither be notified about nor will you receive critical updates from Windows Update. This setting also prevents Device Manager from automatically installing driver updates from the Windows Update Web site.”If you enable this policy setting, you can configure one of the following notification options:
Error code 0xc0000001 on Windows 10 has been reported by some users when attempting to install Windows 10. When you encounter this error, the setup will be in a loop and the error message will keep popping up.
If you encounter the error code 0xc0000001 while trying to install Windows 10, it most probably be due to corrupted installation file. However, it can also be caused by any of the following:”
Here are some methods that will help you fix the error code 0xc0000001 while trying to install Windows 10. Do not perform these methods unless you’re absolutely confident you can do it properly. Otherwise, you might make things worse.
If you’re not that confident, consider seeking advice from a technical expert. If you can’t afford one, you may want to consider getting an automated software to fix the job.
If you need to manually wipe the drive and then convert it to GPT, follow these steps:
select disk <disk number> (press enter)
clean (press enter)
convert gpt (press enter)
exit (press enter)
Note: when you’re prompted to choose the installation type, make sure to choose Custom. Then, choose unallocated space and click Next. This will automatically start the installation of Windows 10.
Automatic Repair is a Windows feature/utility that allows you to fix certain system problems preventing you from installing or starting Windows. It works by scanning your computer system for any potential problem and tries to fix it.
This will automatically run the utility.
Another possible reason why you are getting this error while installing Windows 10 is due to the connected external hard drives. To fix this, power down your computer. Afterward, unplug and remove all connected external hard drives. If you’re using USB device to install Windows 10, ensure your BIOS is set to boot your computer from the USB.
Another possible reason why you experience this error is that your copy of the Windows 10 installer is corrupted. To fix this, it’s better to create a new copy of the Windows 10 installer.
If you still encounter these errors after performing the above methods, find a trustworthy automated tool. As long as the automated tool is powerful and reliable, it will help you fix this error.