Making more than 1000 sheets at once with image generation AI 'Stable Diffusion (AUTOMATIC 1111 version)' Changing the default file name Push notification when generation is over Various convenient setting methods Summary



``

AUTOMATIC 1111 version Stable Diffusion web UI '' that can operate the image generation AI `` Stable Diffusion '' released to the public in August 2022 with a user interface (UI) is very multi-functional and frequently updated, and the Stable Diffusion UI As a tool, it can be said to be the definitive version at the time of article creation. I summarized the setting method for more convenient use, such as generating a large number of images at once with such AUTOMATIC 1111 version Stable Diffusion web UI and sending push notification of image generation.

GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable diffusion web UI
https://github.com/AUTOMATIC1111/stable-diffusion-webui

The following article summarizes how to introduce the AUTOMATIC 1111 version of Stable Diffusion web UI to the local environment or Google Colaboratory.

Image generation AI ``Stable Diffusion'' works even with 4 GB GPU & various functions such as learning your own pattern can be easily operated on Google Colabo or Windows Definitive edition ``Stable Diffusion web UI (AUTOMATIC 1111 version)'' installation method summary - GIGAZINE



Also, you can understand the basic usage of the AUTOMATIC 1111 version Stable Diffusion web UI by reading the following article.

Basic usage of ``Stable Diffusion web UI (AUTOMATIC 1111 version)'' that can easily use ``GFPGAN'' that can clean the face that tends to collapse with image generation AI ``Stable Diffusion''-GIGAZINE



·table of contents
◆ How to create more than 16 images at once
◆ Change default file name
◆ Automatically sort into folders
◆ Enlarge the image Increase Real-ESRGAN models
◆ Enable browser push notifications
◆ Update at explosive speed
◆ Launch webui-user.bat with just the keyboard

◆ How to create more than 16 images at once
The AUTOMATIC 1111 version Stable Diffusion web UI can generate up to 16 images at one time with the default settings. To change this setting, open 'ui-config.json' in 'stable-diffusion-webui' which is the main directory of Stable Diffusion web UI for AUTOMATIC1111 with a text editor such as Notepad.



There are many setting items in ui-config.json. Among these, 'txt2img/Batch count/maximum' is a setting item for the number of images that can be generated at once with text2img, and the default is '16'.



Rewrite this number to '100' and overwrite and save.



Start AUTOMATIC1111 version Stable Diffusion web UI. By operating the 'Batch count' slider, you can move up to 100.



Of course, by moving the slider up to 100, it becomes difficult to finely adjust the numbers with a mouse, but once you click the slider, you can use the '←' and '→' keys on the keyboard to move it by increments of 1. .



Below is the place where 36 images were generated at once. You can generate a large number of images at once without clicking Generate one by one, so it is useful when you want to generate and sort hundreds of images.



◆ Change default file name
By default, the file name of the generated image is '[Generation order number]-[Seed value]-[Prompt]'. This file name setting can be changed in the 'Saving images/grids' field on the 'Settings' tab at the top.



Write the file name setting tag in the input field of 'Images filename pattern' and click 'Apply settings' at the top of the screen OK. A list of tags for file name settings is displayed when the mouse cursor is over the 'Images filename pattern' part.



File name setting tags are as follows.
[steps]: Number of generated steps
[cfg]: CFG scale
[prompt]: Prompt, words separated by underscores
[prompt_spaces]: Prompts and words are separated by commas and single-byte spaces, so you can copy and paste as is
[width]: image width
[height]: image height
[styles]: Image generation style
[sampler]: Sampler type
[seed]: Seed value
[model_hash]: model hash
[prompt_words]: prompts, no dividers between words
[date]: Generation date
[datetime]: generation time
[job_timestamp]: Timestamp when generation finished

This time, I set it as '[seed]-[sampler]-[steps]-[cfg]'.



By default, the file name includes the full prompt, which makes the file name very long and less readable.



On the other hand, the file name of the image generated with the above settings is like this, and it is easy to see.



◆ Automatically sort into folders
Since the prompt is not displayed in the file name, this time, by setting the output destination folder of the image to be automatically divided for each prompt, it will be easier to manage the image. You can set the name of the image output destination folder in the 'Saving to a directory' field of 'Settings'.



Enter the folder name setting tag in 'Directory name pattern' and click 'Apply settings'. A list of tags for folder name settings is displayed when the mouse cursor is over the 'Directory name pattern' part. The tags for folder name settings are the same as those for file name settings.



This time, enter '[date]-[prompt]' and click 'Apply settings'.



With the default settings, images with long file names were casually thrown into 'text2img-images' in 'outputs'.



However, by setting the file name and folder name, you can immediately see when and with what settings the image was created, making image management much easier.



◆ Enlarge the image Increase Real-ESRGAN models
The AUTOMATIC1111 version of Stable Diffusion web UI is equipped with an 'Extras' function that up-converts images using the super-resolution algorithm Real-ESRGAN. Specific usage is summarized in the following article.

Summary of how to enlarge beautifully from 'Extras' according to the type of image generated by image generation AI 'Stable Diffusion (AUTOMATIC 1111 version)' - GIGAZINE



The Real-ESRGAN model is already implemented in the AUTOMATIC1111 version Stable Diffusion web UI. By default, only 2 types are displayed as options, but in fact, 6 types are installed. To enable all six models, go to Settings > Upscaling and click Check everything and restart the AUTOMATIC 1111 version Stable Diffusion web UI OK.



The Real-ESRGAN models that can be used are as follows.

Real-ESRGAN x4x3 : Compact and lightweight version of general model
Real-ESRGAN General WDN x4x3 : Compact and lightweight version of general model
Real-ESRGAN AnimeVideo : A model specialized for animation video
・Real-ESRGAN 4x plus: 4x magnification model for live-action videos and photos
・Real-ESRGAN 4x plus anime 6B: 4x enlarged model of Real-ESRGAN 4x plus tuned for anime and illustrations
・Real-ESRGAN 2x plus: 2x magnification model for live-action videos and photos

◆ Enable browser push notifications
Generating a large number of images can take a considerable amount of time due to the large number of computations required. It's convenient to leave it alone if you set a push notification because you can't monitor it all the time. Click 'Request browser notifications' at the bottom of 'Settings'.



A pop-up asking for permission will be displayed in the upper left of the browser, so click 'Allow'.



As a test, I set the batch size to 20 and generated 20 images at once. It takes about 11 seconds per sheet, so it is expected to take 3 to 4 minutes to finish.



In the meantime, while working on another task, a notification was displayed at the bottom right of the screen along with the notification sound.



◆ Update at explosive speed
Updating the AUTOMATIC1111 version of Stable Diffusion web UI can be done very quickly using Git. First, right-click the 'stable-diffusion-webui' folder, which is the main directory of the AUTOMATIC1111 version of Stable Diffusion web UI, and select 'Git Bash Here'.



Then just type ' git pull ' and run it. Updates are performed automatically as follows.



If you want to reinstall from scratch instead of updating, delete the two folders 'repositories' and 'venv' in the 'stable-diffusion-webui' folder and then update with Git.



◆ Launch webui-user.bat with just the keyboard
This is more of a trick than a setting, but you can launch the AUTOMATIC1111 version Stable Diffusion web UI with just the keyboard without having to open the folder and search for it. If you press the 'Windows' key and 'R' at the same time to start 'Run with file name' and enter the full path of 'webui-user.bat' which is the executable file of AUTOMATIC 1111 version Stable Diffusion web UI OK. From the second time onwards, if you press 'Windows' key + 'R' at the same time and execute 'webui-user.bat' from the file name history with '↑' and '↓', you will be able to start it with only the keyboard. .

Related Posts:

in Review,   Software,   Web Service,   Web Application,   Art, Posted by log1i_yk