Website Home (ChinaZ.com) June 12 News: Following clay and felt dolls, Douyin has recently gained popularity with a new filter—AI Ancient Chinese Painting. Users only need to upload a photo to "step into the painting" instantly, transforming into the main character in a meticulous brush painting in minutes.

Currently, this filter is just starting to gain traction, with only 9.48 million users. However, it's almost guaranteed to encounter a video using this filter every few scrolls on Douyin. It's foreseeable that the next trending AI filter will be this AI Ancient Chinese Painting.

1.jpg

Inspired by this, I suddenly had a bold idea: to challenge the effect of turning photos into ancient Chinese comic style using coze image flow.

I plan to build an image flow within coze, enabling the conversion of a photo into a comic-style image with just a simple prompt.

Before building the image flow, here's a rough outline of the steps:

1. User uploads a photo and inputs a simple prompt

2. Optimize the user's uploaded prompt

3. Style the image based on the user's input prompt and photo

4. Enhance image quality

With a rough idea in place, we can start creating.

I. Create Image Flow

Open the coze official website at https://top.aibase.com/tool/cozekouzi

For those who haven't created a bot before, click to create a bot. If you've created one before, you can skip directly to creating an image flow within your existing bot.

image.png

Here, I directly added it to my previous "Let's Play with Image Flow" bot.

Upon entering, click the "+" on the right side of the image flow to create an image flow.

image.png

Name it directly in pinyin for easy recognition in the future.

image.png

According to the outline, I will need these tools later, so I can add them to the workflow.

image.png

II. Edit Image Flow

1. Add Initial Variables

Knowing that I want to convert the photo into an anime-style effect, the prerequisite is the uploaded photo and the input prompt. Therefore, I need to add two variable names at the beginning:

  • User_photo (user photo)

  • user_prompt (user input prompt)

image.png

2. Prompt Optimization

Sometimes the user's input prompt may be very brief. To ensure the effect, you can add a prompt optimization tool to expand and optimize the user's input prompt. Remember to reference user_prompt here.

image.png

3. Portrait Styling

After optimizing the prompt, proceed to the portrait styling step. Here, I set a 3:4 ratio, so the dimensions are 800x600.

image.png

The second item is the style mode, with numbers representing different styles:

0 - Shin Hayashi (Japanese anime)

1 - Watercolor style

2 - Mucha style

3 - 2.5D

4 - Ink wash

The third item is the reference image link, which directly references the initial User_photo.

4. Multi-image Fusion

If you find the above options difficult to achieve the desired effect, you can add a multi-image fusion to incorporate the style of a reference image into the original image. For portrait styles, input 0 for the first item; for anime styles, input 1.

For the second item, upload the image of the style you want to reference. Here, I uploaded a previously generated ink wash style character. The third item directly references User_photo.

image.png

Reference the data from the previous step for the prompt here.

Prompt strength represents the influence of the prompt, ranging from 0-1. The smaller the value, the more the generated image is influenced by the prompt. If you want the generated image to follow the prompt more closely, move the value towards 1; otherwise, towards 0.

Ratio represents the proportion. Simply input the corresponding ratio number in the input box. I want to output a 3:4 image, so I input 3 here.

image.png

The last two items are the influence degree of the reference image and the original image, respectively. Adjust the parameters according to your needs.

At this point, the basic work is complete, and all that's left is to add an image quality enhancement. After completing these steps, connect them together.

image.png

Click the test run in the upper right corner.

image.png

Test it with a previously generated Chinese-style beauty portrait. Input a brief prompt and click run.

You can see that in the prompt optimization step, it expands the user's input prompt.

image.png

After completing the process, I got this image.

image.png

If you want it to be closer, you can continue to adjust the reference degree of the prompt, or add a background in the prompt.

After running, if everything looks good, you can directly publish it.

image.png