banner banner banner
Incredible artificial intelligence Easy Diffusion 3.0. The Middle and High School Guide
Incredible artificial intelligence Easy Diffusion 3.0. The Middle and High School Guide
Оценить:
Рейтинг: 0

Полная версия:

Incredible artificial intelligence Easy Diffusion 3.0. The Middle and High School Guide

скачать книгу бесплатно


«What’s new»

Following the «Models tools» window is the «What’s now» window. This window provides a list of all updates and changes that have been made to the current and previous versions of the Easy Diffusion application.

It will also be useful for us to know that our Easy Diffusion 3.0 program is 40% faster than Easy Diffusion v2.5, which has a serious impact on the speed of creating our images.

Step 5. Let’s get started

As we have already seen, the Easy Diffusion Artificial Intelligence system is a fairly simple program both to install and configure.

Once again, I would like to draw your attention to the fact that the main purpose of Easy Diffusion is to create a new unique image from a text description or from a combination of text and image based on the most popular neural network models today (which we downloaded and installed earlier).

In order for us to create our first image, we launch the program and go to its work area (the «Generate» window):

In the «Generate» window on the left you will see a toolbar that allows you to enter a text description and define all the necessary parameters for the new image you are creating:

For our first image, we will only add a description and select a model to base this image on. We will not change any parameters now.

Please also note that above the Toolbar there are three additional buttons that allow us to add a description from a text or structured file, as well as use additional image modifiers:

– «Load from a file». This button allows you to load text describing a previously created image from a text file or a JSON file. It is very useful when you are working with a large number of images. Previously, in the Settings window, we enabled the «Auto-Save Images» option and defined the «Metadata format» as the text «txt». This way our system saves all your images and descriptions in text format automatically.

• «Embedding». Configured through the «Models tools» tab of the application’s working window.

• «Image Modifiers» / «Image modifiers». A very useful button, especially at first, when you have not yet learned how to compose complex descriptions of new images. In the modifiers you can choose several different filters for your images:

Below the buttons there are two windows:

– «Enter Prompt». This is the main window, which is intended to contain a text description (we will call it briefly a «query») of the image that we want to create. We will work with him throughout our reading of the book.

• «Negative Prompt». This is an additional window in which everything that should not be displayed in the created picture is described in short phrases.

Below the request windows there are two buttons, united by one heading «Initial Image (img2img)»:

– «Browse». This button allows us to add our image, which the Easy Diffusion system uses to create a new image similar in design style and presentation form from it and the request we wrote.

– «Draw». The button opens the image editing window. In this window we can edit the image we added as a source. For example, clear the background of an image.

Below is the «Make image» button, which is very important for us, with which we will start the process of creating our new unique images.

Under the «Make image» button there is a large list of parameters for the image we want to create.

Let’s take a closer look at all the «Image Settings» functions:

– «Seed». This is the starting number of the random number generator that is used to create a unique image. By default, the program itself creates a unique number. If we know the Seed and other things being equal, we can create the same picture again. We do not change this option and leave it as it is.

– «Number of Images». This option determines the number of images that are created after clicking the «Make image» button. We leave the default value (equal to «1»). If you change the number, it will affect the overall performance of the system. We do not change this option and leave it as it is.

– «Model». This window displays a list of models that we downloaded for you earlier. Models are used to create unique images. We will look at their work later in this and subsequent chapters.

– «Clip Skip». This option allows the system to more accurately analyze and interpret our request. When the option is disabled, then the new image created matches our request as closely as possible. We do not change this option and leave it disabled.

– «ControlNet Image». This is a new and very interesting option of the Easy Diffusion Artificial Intelligence system version 3.0. With ControlNet, you and I can not only create a unique image, but we can also make it look like a celebrity. ControlNet will be covered in more detail in a separate chapter.

– «Custom VAE». This option allows us to use a special autoencoder, which helps speed up the creation process and improve image quality. The Easy Diffusion manual suggests downloading and using the file vae-ft-mse-840000-ema-pruned.ckpt. I must say that it worked great with Easy Diffusion 2.5, but does not work correctly with our version of Easy Diffusion version 3.0. We do not change this option and leave it disabled.

– «Sampler». These are auxiliary Text-to-image AI software for improving the created image. The interesting thing is that some samplers are suitable for certain types of images, while other samplers are suitable for other types of images. You will have to determine which one is better during your work.

– «Image Size». This option allows you to set the size of the resulting image. I highly recommend that you use the 512x512 size. After you select the one you like from the many images you have created, you can use the «Upscale» / «Scale» command to enlarge the image to a size of 2048x2048 and download it to your computer.

– «Inference Steps». The picture we create at the first stage consists of so-called random noise. The program, analyzing our request, reduces this noise step by step and gives us the final version of the image. This option determines the number of steps after which we obtain a sufficiently detailed image. You can try changing it by setting a value in the range from 25 to 50. Increasing the value affects system performance. The optimal ratio of speed and quality of Easy Diffusion is achieved at a value of 25.

– «Guidance Scale». This option allows us to tell Easy Diffusion to analyze our request more closely so that the final image it produces more accurately matches its description. The optimal value is 7.5. The higher the value, the less creativity Easy Diffusion has.

– «LoRA» (Low-rank adaptation). LoRA models are used to fine-tune and speed up the large models that we previously downloaded and installed and will use to create our images. There are various LoRA models that are suitable for enhancing some part of the image (for example, eyes) or style (for example, anime). By default, they are not installed on the system. You can download them from the website civitai.com by typing «LoRA» in its search bar. We do not change this option and leave it disabled (empty). However, I recommend that after training, you go to civitai.com and download the models that suit you for further experiments.

– Seamless Tiling. This option allows you to make a double image seamlessly stitched together from one of your images, that is, make a panoramic image. We do not change this option and leave it disabled (empty).

– «Output Format». This option specifies the final image format. You can choose three: jpeg, png and webp. I recommend leaving jpeg.

– «Image Quality». The default value is 75. If you want a higher quality image but need to wait a little longer to create it, set the value to 95.

We will look at the «Render Settings» functions later in the exercise. For now we leave them unchanged.

Let’s start creating our first image.

In order to create our first image from text, in the «Enter Prompt» window we need to write our first text request («Prompt»).

Let’s do the following:

– In the «Enter Prompt» window, write the following request: «Artificial Intelligence that will change the world, beautiful cyborg face.» Please note that Easy Diffusion only understands queries in English. If you are not very good at it, please use any online translator available to you.

– In the «Image Settings» section, select the «sdxlYamersRealism_version2» algorithm.

– Image Size: 512 x 512.

Leave all other parameters unchanged and click the «Make image» button.

If you open the application backend window, you will see how the Easy Diffusion system works:

Easy Diffusion may need to download additional files to create our image. After which, after a few minutes, she will begin to create a new image based on our request.

Switch to the Easy Diffusion graphical interface window.

Hooray!

You have created your first unique image using an Artificial Intelligence system. It’s located to the right of the Toolbar in the workspace of the user interface:

If you don’t get the same picture as me, don’t be alarmed and try to create it again (I didn’t succeed the first time either). Very often in Easy Diffusion you can get the desired image the second, third or fifth time. This is a feature of the program. This often happens with simple queries, as in our example. We’ll look at complex queries in the next chapter.

Our next step will be to explore the enhancement and manipulation options that most often need to be done after we create any image. To do this, hover your mouse over the new image and you will see the following commands:

– «Upscale». If you like the new image and feel there is no need to improve it further, run the Upscale command. After which the image will be enlarged to a maximum resolution of 2040 x 2048 and you can save it on your computer.

– «Fix faces». The team corrects faces in images. Most often, fingers and facial details are affected in images.

– «Draw another 25 steps.» If you think the image needs to be improved, run the «Draw another 25 steps» command. It often happens that there will be more details in the picture and its quality will become better. It also happens that no significant changes are noticeable. This requires patience and perseverance.

– «Make Similar Images.» With this command we tell the system to make five more similar versions of the images and the first received version.

– «Download Image». The command saves your image in the location you want.

– «JSON». The command saves the description and all parameters of the image you created in a marked file. You can load it the next time you want to create a similar image by clicking the «Load from a file» button.

– «Use as Input». This is a very useful command that allows you to improve the image from time to time. When using it, the Artificial Intelligence system takes as a basis not only our request, but also your image, on the basis of which a new image is created. We will look at the work of this command in more detail in the next chapter.

Now let’s take another 25 steps to improve our image by running the command «Draw another 25 steps»:

As a result, we will get a similar image, but with some changes:

Now let’s go back to our first image of «Artificial Intelligence» below.

Hover your mouse over the image and select the «Make Similar Image» command. This command will allow us to create five more new image variations from the original one.

Five new options will be placed in one program window (for clarity, I left four):

You can use this function an unlimited number of times until you get the perfect image. This is exactly what I did when choosing pictures for the book cover.

Once you select the perfect one, you can delete all other images. Hover your mouse over the image you want to delete and click the cross in the back right corner:

As a result, only those images that you need for further processing will remain in the window.

As I noted earlier, all the models that we additionally installed in Easy Diffusion, without exception, have one significant drawback – they do not draw eyes or fingers well, and very often various strange artifacts appear in the pictures. To correct the eyes, in the image we like, we need to move the mouse over the picture again and execute the «Fix Faces» command:

As an example, I’ll leave one AI face and run the Fix Faces command on that image.

It is necessary to make a small remark and clarify that the «Fix Faces» command quite often does not improve the image, and sometimes spoils it. However, it’s always worth trying out what might come out of your experiments. Be bolder and experiment more often.

In my case, the faces turned out a little blurry or blurry:

The final result (which we like best) needs to be converted to a higher resolution and saved on our hard drive in order to later use it for further work. To do this, execute the «Upscale» command by hovering the mouse cursor over the picture.

After this, execute the «Download Image» command. The downloaded image will have a resolution of 2040 x 2048 pixels per inch. This is quite enough to design a book cover or make a beautiful postcard.

Congratulations!

You’ve just created your first unique image using the Easy Diffusion Artificial Intelligence system, which can easily be called a small piece of digital art.

In subsequent chapters of the book, we will learn a lot about Artificial Intelligence and increase our level of knowledge when working with the Easy Diffusion program.

Step 6. Create a beautiful image

In this chapter, we will look at the most interesting option for working with the Easy Diffusion system – creating a new image from a combination of text and another image. We will also pay special attention to writing a more complex query.

Please note that in the «Enter Prompt» window we are not writing a literary description of the picture we want to receive, but we are writing a short request:

The Artificial Intelligence we work with, unfortunately, does not yet read our thoughts, and it is important for it that we speak to it in a language it understands. The only thing that can be considered a great achievement for developers is that the query is written as a set of key phrases (consisting of words that are easy for both humans and machines to understand), separated by a comma.

So, let’s begin.

Let’s look at a specific example.

We will create with you in a few steps an image of a beautiful cyborg based on the description from the previous chapter.

To do this, perform the following steps:

• In the «Enter Prompt» window, write the following phrase: «Artificial Intelligence that will change the world, beautiful cyborg face.»

• «Model»: «sdxlYamersRealism_version2».

• «Sampler»: «Euler Ancestral».

• Image Size: 512 x 512.

Leave all other parameters unchanged and click the «Make image» button.

Let’s add a small clarification about the color of our cyborg’s eyes in the «Enter Prompt» window: «Artificial Intelligence that will change the world, beautiful cyborg face, green eyes», and also give the Easy Diffusion command to use our first image as the source (parent image) to create a new (child image): «Use as Input».


Вы ознакомились с фрагментом книги.
Для бесплатного чтения открыта только часть текста.
Приобретайте полный текст книги у нашего партнера:
Полная версия книги
(всего 10 форматов)