AI face-changingIt is a commonly used function in image processing. There are various AI face-changing methods in Midjourney, Stable Diffusion, and ComfyUI. Today, I will introduce how to use it.buttonCozeThe one-click face-changing method I created has very simple nodes and very good results. Next, follow my tutorial and build an intelligent entity that can change faces with one click step by step.
Or open the official website of KouZi https://www.coze.cn/
Enter [Personal Space] and find <Picture Stream>:
1. Create an image stream
2. Give the image stream a name and description
3. Confirm to enter the image stream construction interface,By default, it contains a start and end node. On the left is the selection tool, which contains some image processing methods provided by buttons. Our face-changing function is also added here.
4. Set up in the start node graph:
Enter a new parameter, select img as the variable, one is set to the original image, which is the template image, and the other is the facial reference image
5. Then select the function bar on the left.Find <Smart Face Swap> and add this plug-in.Connect the start node to it.
Then we associate the parameters that can only change faces with the parameters of the start node, template corresponds to oldimg, reference corresponds to refimg
6. Then at the <End> node,We can get the data output after the guide changes the face
The complete image flow of # is as follows:
7. Now let’s test the face-swapping effect
Click<Test run>, upload the original photo and the replaced face photo, let's see the effect:
Compared with the reference picture, I think the effect is still very good, and the main features are basically extracted.
If there is no problem with the test, we will release it as open source. This workflow will be saved to our image stream, which will be very convenient for later use.