10
头图

The threshold for AI painting has been lowered again. From the very beginning, Disco-Diffusion, which took half a day to toss, followed by the open source of Stable Diffusion on github. Various platforms have launched cloud platforms, allowing users to easily click, select, input You can generate a picture of AI.

Until now! ! ! Using webui to open source on github, there are not only manual tutorials, docker tutorials, but also Colab fool-style integration solutions.

webui github address: https://github.com/sd-webui/stable-diffusion-webui

Platform construction

Today, I will tell you how to build and use this cloud platform.

Step 1: Open the link

https://colab.research.google.com/github/altryne/sd-webui-colab/blob/main/Stable_Diffusion_WebUi_Altryne.ipynb

Untitled

Step 2: Connect the runtime

After opening, click 连接 in the upper right corner.

Untitled

Click 确定

Untitled

After the connection is made, we run the first script, which is to view the currently used machine. Generally, one is randomly assigned from K80, T4, P100, V100.

Step 3: Set Token

Click on the small arrow to the left of this 1 - Setup stage to expand

Untitled

Scroll to 1.4 Connect to Google Drive

Untitled

Check download_if_missing, then go to https://huggingface.co/settings/tokens to copy your toekn and fill it in. For how to register for huggingface, you can see my last article " AI digital painting stable-diffusion nanny level tutorial "

Step 4: Set a password

Move to 2 - Run the Stable Diffusion webui part, because to deploy a service, of course, you have to set a password, otherwise everyone can use your service at will.

Untitled

Step 5: Run the service

Put them away and run the following steps in sequence

Untitled

Step 6: Open Web Services

Untitled

The account is webui, and if the password is set, it is the password you set.

Use the tutorial

After opening, it is such an interface, which mainly includes 4 functions, text2img, img2img, face repair algorithm, and photo clarity.

Untitled

text2img

Let's first look at text2img, that is, input a piece of text to generate a photo.

Untitled

Then look at some of the generated cases

prompt: a girl with lavender hair and black skirt, fairy tale style background, a beautiful half body illustration, top lighting, perfect shadow, soft painting, reduce saturation, leaning towards watercolor, art by hidari and krenz cushart and wenjun lin and akihiko yoshida

Untitled

 rimuru looking into the camera, beautiful face, ultra realistic, fully clothed, intricate details, highly detailed, 8 k, photorealistic, octane render, unreal engine, photorealistic, portrait

Untitled

((a point coloration cat by the lakeside)), big face, small ears, play in the snow, sharp focus, illustration, highly detailed, concept art, matte, anime, trending on artstation

Untitled

prompt: Cyberpunk, 8k resolution, castle, the rose sea, dream

yuantu.png

Ink painting style

prompt: a watercolor ink painting of a fallen angel with a broken halo wielding a jagged broken blade standing on top of a skyscraper in the style of anti - art trending on artstation deviantart pinterest detailed realistic hd 8 k high resolution

Untitled

img2img

This function is the function of using pictures to generate pictures.

Untitled

Untitled

It should be noted here that I don't know if it is the resolution of my computer. The default width and height are 512 and 256. At this time, the following error will be reported, but there is no problem if the width is adjusted to 1024 * 512

 RuntimeError: The size of tensor a (128) must match the size of tensor b (32) at non-singleton dimension 3

Some generated cases:

A fantasy landscape, trending on artstation

Untitled

A fantasy landscape, trending on artstation

Untitled

a nike sneakers

Untitled

Portrait optimization

Drag old photos directly into the frame.

Case:

Untitled

Clarity optimization

If you feel that the quality of the pictures you generate is not enough, you can use this function to zoom in by 4 times. This function takes a long time to generate and needs to wait patiently, about 5-10 minutes, and the final generated clarity is quite improved.

Case:

Untitled

Finally, a common parameter description is attached

Untitled

For more information, please check the Notion documentation I compiled https://qiufeng.notion.site/06fab45ec290447ba41c3fd0f6e78fac , which includes 10+ AI painting platforms, SD and DD tutorials, parameter tuning tutorials and other documents.

Untitled


程序员秋风
3k 声望3.9k 粉丝

JavaScript开发爱好者,全栈工程师。