Friends, hello everyone, in the last article Fooocus v2 – free Midjourney on your computer, you got acquainted with a drawing neural network that is quite capable of replacing Midjourneyfound out how she was installHow enjoywhat everyone is responsible for settings and how they work modeshow to write requestsso that the neural network understands you.
In this part you will learn how to use a neural network Fooocus Can finish drawing any image going beyond its boundaries, change any detail in the image, learn how to add it to your generation textimpose your face or how to create an image according to yours reference. Today I will talk about the section Input Image.
Upscale or Variation Tab
Put a tick on Input Image and we get into
world of luxury and comfort, to the tab where you can either create variations of an existing image or enlarge the image. This can be either something you generated or a photo of yourself. In order for something to work, we need to upload an image; for example, I’ll take a photo of Jena Ortega, who played Wednesday in the Netflix series of the same name.
Variation – Variations
Let’s say we can’t use Jena’s photo, for example, in a commercial publication, but it perfectly suits our task, for advertising headphones, for example. In this case we choose Vary (Subtle)To get the same thing as shown in the uploaded image, in our case a girl in the forest with headphones, we don’t even need to write a request, the neural network itself will understand what needs to be done. If we use Vary (Strong)then we will no longer get such a resemblance to the loaded image, it will simply be “on the topic”, mode Vary (Strong) works better for doing generation variation where the query is used.
Variations are a great and easy way to get your own version of any image, but what if you need to use the image, for example for printing, how to increase its resolution?
Upscale – Increase
Pregnant Upscale the image is enlarged, you can select magnification in 1.5 or 2 times, there is more 2x Fast, but it makes things noticeably worse. It is important to understand that new details will not appear in this way, the image will simply be enlarged with some barely noticeable artifacts. If necessary, you can drop the resulting image into the upscale several times in a circle; to do this, simply drag it from above into the form below. And we move on to the most powerful tool.
Image Prompt Tab
Tab Image Prompt allows you to use an image as a hint, and do it in more ways, using different models ControlNet. By combining different methods you can get absolutely any image. In the example above, I took a photo of Jena, text on a transparent background, a landscape and a retro photo of a Lada. From the first picture I got the inscription, from the second the pose, location and emotion of the girl, from the third part of the background and from the fourth part of the palette. Incredible results for a very simple request. Below I will tell you how each mode works, to see these additional settings, click on the checkbox Advanced.
ImagePrompt – Style and Content
Mode Image Prompt aka ControlNet IP adapter created so that you can use an image as a request, and it takes it from the reference image Image Prompt not only style, but also content, i.e. captures the context. I’ll show you with a simple example. Upload a photo of a retro car, write a simple request RAW close-up photo of girl 23 yo lining the muscle car. roadI don’t write the car model or color in the request, but I receive a photo of a girl next to a very similar car to the one I uploaded as a reference.
In the same way, you can take a style from any image. Another example: I found a cool picture with a destroyed city on PromptHero, this is a site where you can find interesting examples and queries for neural networks. The picture is atmospheric, I like it, but it was made in mijorni and her request will not help me. Besides, I just need the same one
with mother-of-pearl buttons horizontal and with a teddy bear. The task seems difficult.
To get a similar picture only upon request, you will have to try. You can do it easier, I upload this image to Image PromptI am writing a request Photo of a gloomy ruined city, close-up of a teddy bear, and I immediately get an excellent result, exactly the way I imagined. A dramatic dark picture with a teddy bear heroically walking towards a glowing building, you immediately want to know what will happen next.
But what to do if the result is not satisfactory, you can always tweak it Stop At, he is responsible for when the neural network stops looking at the image that you uploaded. By default it is set to 0.5. those. For half of the entire generation, the focus sticks to the loaded image, and then generates it as it wants. It is often useful to increase or, conversely, decrease this value.
It’s worth enlarging if you want to transfer the visual style well. And to reduce it, if you only need the general composition, then you will give the neural network more freedom. In addition, you can increase the influence of the image using the slider Weightthe greater the weight, the stronger the influence on generation, the higher the intensity of the influence, but at the same time the creativity of the neural network decreases, so find a balance.
When to use Image Prompt? When you need to copy style, atmosphere, lighting, and at high Weight and image composition.
PyraCanny – Outlines
Canny creates a so-called map of what is shown in the picture you upload. This map consists of key outlines only and has no color or style information. These contours will form the basis of your future generation.
For example, I generated a cute bunny, but I want to make the bunny in a different style, while I want to completely maintain its proportions. Loading the rabbit into Image PromptI choose PyraCannyI bet Stop At on 0.9 or even on 1to maintain the proportions until the end of generation. And just on impulse Bunny I start switching between the different styles built into the focus until I find what I like. I talked about styles in detail in the first part. This is the result I get.
A very useful tool to make variations of characters, icons in different styles. By the way, you don’t have to upload a finished image, you can upload a hand-drawn outline sketch and Focus will try to generate an image from it.
More PyraCanny Great for stylizing text. All you need is to make a PNG image of the text on a transparent background; any editor will do for this; I can recommend online photopea.com, it’s convenient and free. I prefer to outline the text, it usually makes for a more interesting stylization. To make the text readable and not jump around, you should put Stop At on 1 And Weight on 1.2and sometimes higher if the text is distorted or not visible enough.
When to use PyraCanny? When you need to copy the content of an image, character, architecture, facial features or composition, or add text.
CPDS – Depth and Contrast
CPDS creates a map based on the sharpness and contrast of the uploaded image. After desaturating the image, all that remains is information about silhouette, outline, and sharpness and depth. This allows you to transfer any complex scene or pose into your generation, without being limited to strict contours as it does Canny.
As an example, I took the famous scene with Travolta from the movie Pulp Fiction and recreated it with the participation of other characters: Homer Simpson, Gandalf, John Wick, Darth Vader and several more.
It turned out great, and most importantly it was quite simple, the requests were in the spirit confused Homer Simpson.
When to use CPDS? When you need to transfer silhouettes and depth, to recreate complex scenes, poses, and depth in space.
FaceSwap – Face replacement
Now we’ve reached the only fly in the ointment, what the developer calls FaceSwap is actually not FaceSwap, but just IP Adapteras well as Image Prompt, but trained on faces, it cuts them out and tries to integrate them into the generation. But to be honest, it doesn’t work well. It feels like a drunk friend told someone what you look like, and the generation is the result based on this description. There are definitely some similarities, but there are also differences that have a chilling uncanny valley effect. No matter how I tweaked the settings, I couldn’t get this mode to work well. Do you recognize Chris Pratt, Star-Lord from Guardians of the Galaxy, in this photo? Me not.
I wish I could say that it works better with women, but no, instead of Scarlett Johansson on a motorcycle, I get her second cousin, apparently.
If you think you can just raise Weight, then you will be disappointed here too, if you raise it, then the composition, angle and colors will be inherited from the uploaded image, and what you write in the request will practically not be taken into account. For example, I loaded a photo of Chris Evans, and turned the weight up to 1.4, yes, the face is really a little more similar, this is no longer a relative, but a competition of doubles. But now a piece of the background from the reference keeps creeping through, and the angle of the face cannot be changed.
Real FaceSwap very carefully and carefully mixes facial features from the original with a loaded face and almost always gives an excellent result, I talked about this in the article Become a meme hero! We make GIFs with our face using neural networks, look, it’s very interesting.
I can’t say the implementation of replacing faces in focus really works. Let’s hope that in the future the developers will either improve this mode or make the classic FaceSwap that we know from other applications.
When to use FaceSwap? When you want all your characters to have a similar face or type, or you are preparing a basic image for replacing a face in another application, for example in ReActor.
The coolest thing is that you can combine features Image Prompt however you like, upload different images, add text, styles, and of course manage the request. Here are some more cool examples that would be difficult to get from text descriptions alone.
Especially for my subscribers on Busti I collected pack of 1,800 unusual and interesting images – references for use in Image Prompt. Many of the images in this material are from there. Now you can add an unusual effect, create an interesting background or style in a couple of clicks and without complex queries. Subscribe to Busti and you, there are a lot of useful materials, recordings of training streams and access to our private chat. Only the support of subscribers allows me to write such detailed guides and instructions for you, friends. And we are moving on to the two remaining, but no less cool functions, ahead of Inpaint and Outpaint.
Inpaint or Outpaint Tab
Of course, the Witness from Fryazino was already in this photo with Pope Francis when I found him, it won’t be possible to generate it, but with this example I can show how you can change the real image before we start outpainting.
Inpaint – Changing the image
As often happens when a good photo contains something that shouldn’t be there, it used to be difficult to fix such a photo. Now there is painting, a simple mechanic – we paint over what we don’t like with a mask, write what we want instead of what’s under the mask and get an excellent result. However, it is not necessary to use a request. Inpainting has three modes:
Inpaint or Outpaint (default) – the mode is enabled by default, it is also used for outpainting. Generally suitable for any task, but the resolution in this mode will be lower than in the other two.
Improve Detail (face, hand, eyes, etc.) – Detail enhancement mode, great for improving the detail of a face, hands, eyes or other objects.
Modify Content (add objects, change background, etc.) – change mode, in this mode it is convenient to change or add something that was not in the image.
In modes Improve And Modify an additional field appears in which you can specify specific changes, this is done so that you do not have to change the main request, and then remember what was there.
For example, if we want to get rid of a character in a photo, we will simply launch generation with an empty request, or with a description of the surface that is nearby, for example a wall or nature. In the same way, we can replace the character with any other one, we just need to describe him. Of course, if you do it as roughly as I did in these examples, then artifacts will be noticeable. But if you have a touchpad, then you can draw a mask very carefully.
But the possibilities of painting are not limited to this, you can also: replace the background, change clothes or hairstyle, improve your face, add what is missing, remove what is there, the possibilities are limited only by your imagination. In my opinion, inking is the most powerful mechanic in working with images, and in focus it is also implemented as conveniently as possible.
Outpaint – Expand the image
Atupeinting allows you to go beyond the boundaries of the image; it works very simply. You just need to select the side in which you want to expand the image, left, right, up, or down. Of course, you can check all 4 boxes at once, but the quality will be worse, it’s better to do one side at a time. You can either specify a request or not. It is acceptable to change the query slightly between outpainting iterations to achieve the desired result.
You can do outpainting many times in a row by dragging the generated image down, but it is important to remember that each time the image resolution becomes larger and at some point you simply will not have enough video memory.
Outpainting is a wonderful mechanic that not only allows you to change the frame size and aspect ratio, looking beyond the boundaries of what does not exist, but also an excellent tool for creating large, detailed images. How is it, his resolution 4674X2772, but for your convenience I have turned it into a video. Of course, there are mistakes on the glues, but they can be removed in many other ways.
Friends, this is where we have finished exploring the possibilities. Input Image in Focus, congratulations! Now you know how to do it variations, increase images or generation how to use tab Image Prompt and all kinds ControlNetto get a unique image created by to your referencecontaining text or even similar on you. And of course you can now change something in an already existing image using painting or stop by abroad images using outpainting.
Share what you do in our chat of neuro-enthusiasts and see you on streams, the next one already November 28 V 20:00 on Busti, admission is free as always, subscribe so you don’t miss the beginning. Let’s break down Focus step by step and answer all your questions.