Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

I heard recentlybuttonWith the launch of image streaming, Bot has gained a new way of creation.

Today I finally got around to trying out the image streaming on the button platform.

I looked at the image stream tool and found aSmart face swapfunction, decided to use it to create a more popularPortrait(Intelligent Face Changing) AI Bot.

See the effect first

Left: User uploaded image

Middle picture: Template picture

Right: New personal photo generated by user-uploaded photo + template photo.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application
Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Next, let’s learn togetherHow to use button image stream to make portrait photography (intelligent face replacement) AI applicationBar.

How to create image stream for portrait photography (smart face swapping)?

Enter coze.cn in the browser address bar to enter the official website of Kouzi.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Click [Personal Space]-[Image Stream].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Enter the image stream interface and click [Create Image Stream] in the upper right corner.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

A window for creating an image stream pops up. Enter the image stream name and image stream description and click [Confirm].

Image stream name: portrait_photography

Image stream description: When a user uploads a portrait photo, this image stream is called to help the user generate a personal portrait photo

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Enter the image stream editing page. The left menu has three types of tools: smart generation, smart editing, and basic editing. The middle image stream editing area has the [Start] and [End] workflow modules by default.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application
Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

This time we need to do the portrait photo (intelligent face changing) function, so we need to select the [Intelligent Face Changing] tool.

In order to make the generated pictures better, Guotou added the [Image Quality Enhancement] function.

Click the [+] icon on the right side of the [Smart Face Swap] and [Image Quality Improvement] items to add these two tools to the image stream.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Connect the cables in the order of [Start] -> [Smart Face Swap] -> [Image Quality Enhancement] -> [End].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

start

At the starting node of the workflow, we need to define the input variable name, variable type, and description.

The settings of the pot head here are as follows:

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Smart face swap

reference_picture_url (reference picture): The reference picture is the face reference for the image to be generated, usually the picture we uploaded. Here we directly reference the input_photo parameter value of the start module.

Skin (skin beautification effect): The range is [0,1]. The higher the value, the better the skin beautification effect. Since it is not required, Guotou will not fill it in here.

template_picture_url (template image): A template image is a picture in which a person’s face is placed. Here, Guotou directly chooses to upload a costume picture.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Improved image quality

It is used to improve the image clarity and make the image quality better. You need to input the image whose quality is to be improved. The parameter value is directly referenced by the intelligent face-changing-data output by the intelligent face-changing module.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Finish

The final node of the workflow is used to return the result information after the workflow is run.

We enter the parameter name output here, and the parameter value refers to the image quality improvement-data.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

The configured image stream is shown in the figure below.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Trial run

Through trial running, we can debug whether our workflow is normal.

Click [Test Run] in the upper right corner.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

After uploading an image, click [Run].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

The operation was successful and we completed a face-changing operation.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

The effect of Figure 1+Figure 2=Figure 3 is as follows:

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

It is a bit simple to generate one picture at a time, let's try to generate 4 portraits with changed faces at a time to see if it works.

The image flow arrangement is shown in the following figure.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

The test run results are shown in the figure below, and it can run successfully. There is no problem with the image stream.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

release

Confirm that the image stream configuration is correct and click [Publish].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Go back to Personal Space - Image Stream and see that the portrait_photography we just created has been successfully published.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

How to create a portrait photography (smart face-changing) AI Bot?

Go back to the button homepage and click [+Create Bot].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

The Create Bot window pops up. Select a workspace, fill in the Bot name and function description, upload the icon, and click [Confirm].

Bot name: Portrait (intelligent face-changing)

Bot function introduction: Upload a frontal portrait photo and automatically generate a portrait photo in ancient costume.

Icon: Automatically generated by AI or upload a photo yourself.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Go to the Portrait (Smart Face Changing) Bot editing page.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Character setting and response logic

# Role You are a professional portrait generation tool that can guide users to upload face photos, and then use the image stream portrait_photography to achieve intelligent face swapping, thereby generating realistic user portrait photos. ## Skills### Skill 1: Guide users to upload photos1. Prompt users to upload a clear face photo. ### Skill 2: Perform intelligent face swap1. After the user uploads the photo, call the image stream portrait_photography to perform intelligent face swapping. 2. Generate the user's portrait photo. ### Skill 3: Generate multiple pictures at a time1. Present all the pictures output by the image stream. ## Limitations: - Only focus on processing operations related to face photos and generating portrait photos. - The output content must be organized according to the given format and cannot deviate from the framework requirements.
Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Model setup

Select "Doubao·Function call model 32K" as the model.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Skill

Click [+] on the right side of the image popularity item.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Find the image stream portrait_photography we created and click [Add].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Added successfully.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Set the opening text as follows:

Welcome to use my professional portrait photo generator! I can help you generate personalized portrait photos. Please upload a clear face photo, I will perform intelligent face replacement for you and generate your portrait photo.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Preview and debug

Upload a face photo, and after running, 4 portrait photos are successfully generated.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

release

Click [Publish] in the upper right corner.

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

Enter the publishing page. If there are no other platforms to publish to, continue to click [Publish].

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

After the release is successful, the uploaded image will generate the following effect:

Learn how to use AI face-changing and use button image stream to make portrait photos (intelligent face-changing) AI application

So far, we have completed the image stream and AI Bot creation and publishing of portrait photography (intelligent face changing). Have you learned it?

Learning Summary

Let’s review and summarize what we have learned:

  1. Create a new "Portrait (Smart Face Changing)" image stream.
  2. Option language model "doubao·Function call model 32K".
  3. Edit personality and reply logic.
  4. Adding image streaming and opening remarks
  5. Preview and debug.
  6. Publish the Bot.

This wave is coming down,In the future, you can build your own AI portrait photography application by yourself. You can use any background and style you want. You can make it as beautiful or handsome as you want..

 

statement:The content is collected from various media platforms such as public websites. If the included content infringes on your rights, please contact us by email and we will deal with it as soon as possible.
Encyclopedia

How to use the Kuaishou KOLORS large model and test the function of Kuaishou AI product KOLORS

2024-6-3 9:47:41

TutorialEncyclopedia

[2024 latest version] Stable Diffusion Chinese version one-click installation and deployment tutorial

2024-6-4 9:56:27

Search