Pure practical article, a nanny-level tutorial on using Stable diffusion to create advertisements

Today I want to show you how to use Stable diffusion to add scenes to your products and turn them into advertising blockbusters in seconds.


Mastering this skill, you can add different scenes to the product at will, saving complex shooting settings and shooting costs.

Without further ado, let’s explain the demonstration process in detail.


First select a picture of your product. If it has a background, it is recommended to use the cutout tool to cut out the product, because we will use it later.

29a669efa16b917f5898aa28f6e52180.jpeg



Then open Stable diffusion, and you need to create a real scene in the form of a Vincentian diagram, so we choose a realistic model here.


8f4801f9160b1a0e10def7e898c01420.jpeg


Then fill in the content we want in the forward keyword and reverse keyword input boxes.


c9eb6b090e2b4a3eee67fbaf2526f585.jpeg


Then there are the sampling methods, of which there are many.


f0f2fd9c13ef77aecefe7ca20fc6dfd2.jpeg


Before using it, you need to understand what sampling is. In short, it is stable diffusion. Before generating an image, a large model will generate a picture full of noise.


632fdd30b70595ce6bfa89f1edd981d5.jpeg


The noise filter then goes to work, subtracting the predicted noise from the image, repeating the process until a clear image is obtained.


9e76f6843ed41688a0eb7157b5c980ae.jpeg


The entire process of removing noise points is called sampling. There are many sampling methods. We need to choose a suitable sampling method for pictures of different styles.


For our real model, it is suitable to choose DPM++ and karras sampling methods for plotting. Here you can choose DM++2M SDE.


The higher the number of iteration steps, the more precise it will naturally be, but the longer it will take to produce the image, and after the number of sampler sampling steps reaches a certain value, the clarity will no longer change much.


85ec15dbdca68d68ef4fb5a4c2943dc7.jpeg


d9989542036afcfb7c044a4664f3e8d2.jpeg


Therefore, the generally default value of about twenty is our commonly used sampling step number. After the number of iteration steps and sampling method, Controlnet needs to be used.


671b1ff9099e8986f48a846ffbeeb014.jpeg


To put it simply, its function is to pad the image, allowing stable diffusion to optimize and create according to the outline of the sample image to achieve our purpose of adding scenes. Select the product image you just cut out and throw it to Controlnet.


bc6c61d869fbc0ce122f4f248d3e6a6c.jpeg


Check to enable the preprocessor and select Cannv here, and the model will also select the corresponding one here.


0e70df437d5f19cf37dd0a2e5efbf81c.jpeg


The function of Canny is that it can identify the picture content as line drawing, and use the line drawing to control the content generated by the SD picture, so that our output pictures will not change too much.


a6fc05f7eef692e17e9b12cf8f7913b7.jpeg


After doing the above operations, you can draw the picture.


0c088b6bad1f31bfd33abcf8831868fb.jpeg


Of course, your picture may not be satisfactory at this time. You can control the weight through Controlnet.


b434a4153bdbf352401c168530c7e60d.jpeg


Adjust the similarity between the output image and the original image. The higher the weight, the higher the similarity with the original image, and vice versa. Of course, in this step, we do not need to make the generated image completely similar to the original image.


5c84be3df2a1e7eccef667e62c73e90a.jpeg


What needs to be noted here is the integrity of the bottom part of the product and the ground contact part, and whether the overall picture is the style you want. Don’t worry about the details of other parts of the picture. If the elements and style are too different from what you want, then adjust the keywords, repeatedly draw pictures, and finally choose a generated picture.


f547c2f4b4581501d0bf0cbb68edb3e6.jpeg


If the product and surrounding elements are too different from what we expected, we need to use PS to modify the image and replace the product image just now.


d45b1fcb82703313bd3c37e2429aa2aa.jpeg

3c166c198112aceeabfdf138b48fbe71.jpeg


At the same time, you can also add some elements to the surrounding space in the picture to transform it.


9a4b0cea8b991354c11f355abb1aa8b1.jpeg


As for the complex relationship between light and shadow, it can also be handled by Stable diffusion. Click on the graphic to redraw it locally and throw the picture into it.


f16985a30279b6a044a0f569fc62ee03.jpeg


Copy the forward and reverse keywords in the Vincent diagram just now, and erase the product in the middle. The purpose is to protect the product from being redrawn by the software. Remember not to go beyond the edge of the product when applying so that the product blends better with the background.


e75086b5f91f0357fe9096e1afe84356.jpeg

54307ff82e9a3e4e4c8d6021051af1cd.jpeg


Here we choose to redraw the non-mask area, the purpose is to let SD only draw areas other than the product.


71ef52633f3aabe4eb426c41fba7be79.jpeg


Daran chose DPM++2S SDE as the sampling method, and the image size remained the same as the previous Vincent image.


1744012986e464d3f1899619b7851702.jpeg


Continue to open Controlnet and put in the picture just now.


140eaa617bec594c2b0b447d7b76945e.jpeg


This time I still choose Canny for the model. The principle is the same as before. To avoid too big changes in the picture structure, click Generate to output the picture. Refresh it a few times and select a rendering that you are satisfied with.


6f12161a1fbb89c244ce73ca40d8dd9f.jpeg


its not bad, right! Both the relationship between light and shadow and the color tone are relatively uniform. Finally, I adjusted the color in PS software, added some copywriting, and a product poster came out.


9eb89268f9a2276d049d78d8c43180ef.jpeg



in conclusion


cb0a3c95181f2d98e6db7b73685a2ccf.jpeg


e273293e2442436df56222a75d43cb08.jpeg


f82c571663854068d3127919c714b1d8.jpeg


Guess you like

Origin blog.csdn.net/CCEEHM/article/details/134664889