1. Introduction
Stable DiffusionAble to generate new images through customized text descriptions or images, this AI technology enables ordinary people who are not graphic professionals to create exquisite images that roughly match their desired images.
2. Quick Start
2.1 Download stable-diffusion-webui
stable-diffusion-webui contains Stable Diffusion and the web interface used to operate it. This step is just to download it.
https://github.com/AUTOMATIC1111/stable-diffusion-webui
There are also installation steps below this page. Additional software requiredPython, please note that it is best to installCurrent Recommended VersionPython.
2.2 Install Checkpoint Merge
Stable Diffusion (SD for short) needs to know the data we want, such as the drawing style, content tendency, etc., so we provide it with some materials.CivitaiA large number of resources are provided, and we can search and download them there.
Checkpoint Merge refers to a type of basic model data, and the final generated image is consistent with the style of these model data.ChilloutMix.
Download and store instable-diffusion-webui\models\Stable-diffusiondirectory.
Windows user executionstable-diffusion-webuiUnder the directorywebui.bat; Linux users executewebui.sh. It will automatically download some necessary files first.
I reported several errors due to network problems. I just tried a few times. After completion, it was as shown below:
Press Elevate to open the web page:http://127.0.0.1:7860/
2.3 Install the plugin sd_civitai_extension
This plugin can help us get and display preview images of resources we download in Civitai.Extensionstab, then switch toInstall from URLSub-tab, enter address:https://github.com/civitai/sd_civitai_extension
Click the "Install" button and wait for a while. After completion, click on the leftInstalledSub-tab, you can see that the sd_civitai_extension plug-in has been installed. Finally, click the "Apply and restart UI" button. At this point, the most basic functions of Stable Diffusion have been installed and can be used.
Let's do a test first. Switch totxt2imgLabel, enter the desired image keywords or text description in the prompt input box above, for example:The girl is flying in the sky
. In the Negative prompt input box below, you can enter keywords that you don’t want to appear. Then click the “Generate” button and wait for a moment to generate the image.
Hahaha, at least it shows that Stable Diffusion is running normally.
3. More settings
3.1 Install LoRA model
The LoRA model is a fine-tuning of the basic model data, which can be used to resemble the characters in LoRA. When downloading, please note that the Type on the right side of the page isLORA.For exampleAsuna LoRa.
Download and store instable-diffusion-webui\models\loradirectory. Then click the icon under the Generate button.
Switch to the Lora tab below and select the installed LoRA. Then the keyword input box above will appear.<lora:asunaLora_asuna:1>
. It means that the selection has been successful. The weight defaults to 1, which is usually too high and should be changed to the recommended value on the Lora download page. For example, the recommended value for Asuna LoRA is 0.6.
We continue to use The girl is flying in the sky. to generate images and add the keyword asuna to trigger this LoRA. The final prompt statement is:The girl is flying in the sky.asuna.
The effect is... well... okay. Because our base model resource (Checkpoint Merge) is a real-life model, and this LoRA uses an anime style, the final fusion is not very good. We can download an anime style Checkpoint Merge, for exampleAbyssOrangeMix2, and then generate it again.
3.2 Install the interface translation plugin sd-webui-bilingual-localization
Although most of the options in English are understandable, it is still better to have Chinese options. Switch to the Extensions tab on the page, then switch to the Available sub-tab, and click the "Load from" button to get the latest list of plug-ins. Find the sd-webui-bilingual-localization plug-in and click the Install button on the right to install it. Or enter the plug-in address in the Install from URL sub-tabhttps://github.com/journey-ad/sd-webui-bilingual-localizationto install. Then switch toInstalledsub-tab, click the "Apply and restart UI" button.
Then download the Chinese translation file.https://gist.github.com/journey-ad/d98ed173321658be6e51f752d6e6163cDownload the json file and save it tostable-diffusion-webui\localizationsdirectory.
On the pageSettings -> Bilingual LocalizationSelect the translation file you just downloaded and clickApply settingsandReload UIbutton.
Now the interface is bilingual in Chinese and English~
3.3 Prompt words
An image is randomly generated, but we use prompts and negative prompts to obtain and limit its "brain hole". There are many sharings on the Internet, and I reproduce one here.
Tips:
1girl, solo focus, tomboy, pale skin, medium breasts, wide hips, slim, toned, delicate, gray multicolored hair, very long hair, long ponytail, yellow eyes, sweat, tall female, black shirt, white coat, black legwear, accessories, earbuds, wristwatch, piercing, cross necklace, stylish sneakers, holding cup, outdoors, cold, ((rain)), beautiful view, city view in the distance, seaside, mountainous horizon, sitting on bus stop, gloom\(expression \), sad, looking away, overcast, cloudy, dawn, {correct posing}, {detailed background}, {detailed body}, {correct body anatomy}, {extremely beautiful and delicate anime face and eyes}, {from the side :0.5}, {realistic:0.8},
1girl, solo focus, tomboy, pale skin, medium breasts, wide hips, slim, toned, delicate, gray colorful hair, very long hair, long ponytail, yellow eyes, sweat, tall female, black shirt, white jacket, black legwear, accessories, earbuds, watch, piercings, cross necklace, stylish sneakers, holding cup, outdoors, cold, ((rain)), beautiful view, distant city view, seaside, mountain horizon, sitting at the station, gloomy \(expression\), sad, looking away, overcast, cloudy, dawn, {correct pose}, {detailed background}, {detailed body}, {correct body anatomy}, {extremely beautiful and delicate anime face and eyes}, {from the side: 0.5}, {realism: 0.8},
Reverse prompt words:
nsfw, (worst quality, low quality:1.4), (lip, nose, tooth, rouge, lipstick, eyeshadow:1.4), (jpeg artifacts:1.4), (depth of field, bokeh, blurry, film grain, chromatic aberration, lens flare:1.0), (1boy, abs, muscular, rib:1.0), greyscale, monochrome, dusty sunbeams, trembling, motion lines, motion blur, emphasis lines, text, title, logo, signature, (low quality, worst quality :1.4), (bad anatomy), (inaccurate limb:1.2), bad composition, inaccurate eyes, extra digit,fewer digits,(extra arms:1.2), bad fingers, wrong expression, bad hands, incorrect anatomy hands, bad crop , cropped. terrible anatomy. text. watermark, bad nipples, lowres, no nipples, unrealistic anatomy, clipping boobs, clipping arms, bad arms, bad anatomy, bad hands, mutated hand, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, out of focus, glowing eyes, (((multiple views))), (((bad proportions))), (((multiple legs))), (((multiple arms))), bad_prompt, wrong color, (worst quality:2.0), (low quality:2.0), inaccurate limb, 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, tall, (painting by bad-artist-anime:0.9), (painting by bad-artist:0.9), bad-prompt:0.5, watermark, text, error, blurry, jpeg artifacts, cropped, normal quality, jpeg artifacts, signature, watermark, username, artist name, (worst quality, low quality:1.4), bad anatomy, low quality lowres , low quality lowres quality lowres monochrome sketch rough graffiti, low quality lowres very ugly fat obesity scar, low quality lowres chibi, low quality lowres poorly drawn bad anatomy, low quality lowres graffiti unbecoming colorfully, low quality lowres incoherent background, low quality lowres long body, low quality lowres duplicate comparison, low quality lowres sketch retro_artstyle doujinshi, low quality lowres sketch, low quality lowres text font ui error missing digit blurry, low quality lowres JPEG artifacts signature hazy bleary, low quality lowres monochrome parody meme, low quality lowres historical picture, low quality lowres disfigured mutated malformed twisted human body, low quality lowres futanari tranny, low quality lowres tentacle skeleton, low quality lowres suicide death dirty, (nipples:1.2), lowres, bad anatomy, bad hands, text, error, missing finger, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry