Ceci est une ancienne révision du document !
Given I am still a bit of a newbie myself, I thought I should note some of the problems I have run into with Stable Diffusion (SD.) In order to support the graphics, I upgraded my computer to a gamer desktop with a Nvidia card. The new system (CYBERPOWERPC Gamer Xtreme VR Gaming PC with an Nvidia GeForce RTX 3060, 12GB) was initially only slightly faster than the CPU option. The screen capture below shows the new computer configurations.
In order to address the slow imaging speed, I looked at the Settings tab in SD and found that it was set to use the CPU not GPU. (Also note the presence of the Beta Channel version option which may fix some issues and add new options.)
I could not turn off the use CPU option, leading me to realize that Nvidia drivers were not installed by default when installing Ubuntu Studio. Nvidia drivers were then installed using the default, proprietary - tested version. A change in the drivers configuration resulted in a dramatic improvement in imaging speed, with the images created in a few seconds instead of minutes.
Eventually another problem arose. While starting SD, I would sometimes see the following line in the terminal and the browser never opened.
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/jon/Desktop/Stable-diffusion/easy-diffusion/installer_files/env/lib/python3.8/site-packages/cv2/qt/plugins” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
To fix the problem, first close the program (type Ctrl+c {Enter}) and then close the Browser tab. I could fix the above problem each time it happened by pasting the command below in the same terminal window:
export QT_QPA_PLATFORM=offscreen
{Enter} and restart Easy Diffusion:
./start.sh {Enter}
Thanks to ljubomirb (https://github.com/NVlabs/instant-ngp/discussions/300) for this fix.
Afterwards I sometimes ran into the problem again with the CPU selected and the fix was to simply reboot. Looking at the Easy Diffusion Generate panel (current version 2.5.31), changes are often made over several days, see the What’s New tab on the top right on the left side of your web browser interface.
As noted in the introductory article, Stable Diffusion part 1, the prompt is the top and likely most important option. It gets saved as part of the image name. Depending on your purpose, you may eventually want to save additional information automatically. To do so, select the Settings tab, next to the Generate tab and with the Auto-Save Images on, select a metadata format such as json or txt. A json file can simply be selected to produce the same file, with txt, information will need to be manually input. Use the full path for the location of your Auto-Saved images.
You may also use the Download images button for a single image. As I understand it, SD is deterministic, and you will normally get the same graphic only if all the parameters are the same. Also while looking at the settings, one item to note is the Block NSFW (Not Safe For Work) images option depending on your environment. Such images may unexpectedly be generated.
The default image size is 512×512 px and if you choose a smaller size, you are warned that small image sizes (less than the default) can cause bad image quality. If only one dimension is smaller than 512 you may not get the warning but the image quality is likely nevertheless of bad quality. Larger image sizes can also have an undesirable effect on the generated image. While trying to generate an image of a baby with wide open eyes with the size set to 1024×1024 px, multiple faces were always created. Reducing the size to the default 512×512 px produced the desired results. You can then move the cursor over the image in question and select the upscale option that pops-up.
When making your first images you will likely be impressed but eventually you will recognize various issues. For example using the prompt “two small possums, photo realistic,” the possums may look cute but are not realistic. They look more like mice and unexpectedly have extra fingers. This is because the generated images are dependent on the images used for training and obviously everything can’t be used for training.
Similarly it can’t do a Pablo Picasso rendering of yourself because your photographs were also not part of the training. That said, try inputting your name in the prompt and see what you get. I thought I would end with a more desirable image, create something like the below with the prompt library with fireplace burning with a single bay window. No fire is in the fireplace in the below image possibly because the prompt was worded incorrectly but it may be because of the viewing angle. You might want to bump up the number of images to 10 in the options below the prompt to make ten different versions. You may want to hold off on using that parameter if you don’t have a more capable graphic card otherwise the wait time may be significant. More about those options next time.