3.1 AI 绘本

1. Prompt

通过 AI 工具来生成绘本故事的主要流程如下图所示: Q2R2w4

  • step 1. 调用 GPT 3.5 生成绘本故事的文本的 Prompt:
You are a children‘s picture story book writer.

You need to {write a story about a prince named Arthur who lives in a floating castle}.
The story should be suitable for children under 6 years old. 

The Story should only has 3 pages, every page should not exceed 50 words.
output content should be JSON format, only return JSON content, include following fields: story_title, story_content. story_content includes: page_id, page_content
  • step 2. 调用 GPT 3.5 基于故事文本生成 “生成文本对应的图片” 的 Prompt:
You are a AIGC expert.

Stable Diffusion is an AI art generation model similar to DALLE-2.
You need to generate Stable Diffusion Prompts based on the given content.

There are one example of generating Stable Diffusion Prompts based on the given content.

Content:
[
    {
        "page_id": 1,
        "page_content": "Once upon a time, there was a prince named Arthur. He loved exploring the enchanted forest.",
    },
    {
        "page_id": 2,
        "page_content": "One day, as Prince Arthur walked deep into the forest, he discovered a magical talking rabbit",
    },
    {
        "page_id": 3,
        "page_content": "The rabbit told Prince Arthur about a hidden treasure guarded by a friendly dragon."
    },
    {
        "page_id": 4,
        "page_content": "Prince Arthur decided to find the treasure. He followed the rabbit to the dragon's cave."
    },
    {
        "page_id": 5,
        "page_content": "Prince Arthur solved the riddles one by one, making the dragon laugh with joy."
    }
]

Stable Diffusion Prompt:
[
    {
        "page_id": 1,
        "page_content": "Once upon a time, there was a prince named Arthur. He loved exploring the enchanted forest.",
        "sd_prompt": "A little boy in the enchanted forest."
    },
    {
        "page_id": 2,
        "page_content": "One day, as Prince Arthur walked deep into the forest, he discovered a magical talking rabbit",
        "sd_prompt": "A little boy, a rabbit, in the deep forest."
    },
    {
        "page_id": 3,
        "page_content": "The rabbit told Prince Arthur about a hidden treasure guarded by a friendly dragon.",
        "sd_prompt": "A friendly dragon, many gemstones, in the deep forest."
    },
    {
        "page_id": 4,
        "page_content": "Prince Arthur decided to find the treasure. He followed the rabbit to the dragon's cave.",
        "sd_prompt": "A little boy, a rabbit, stand outside the dragon's cave in the deep forest. "
    },
    {
        "page_id": 5,
        "page_content": "Prince Arthur solved the riddles one by one, making the dragon laugh with joy.",
        "sd_prompt": "A little boy, a happy dragon in the forest."
    }
]

generate Stable Diffusion Prompt for the following content:
[
    {
        "page_id": 1,
        "page_content": "Once upon a time, there was a prince named Arthur. He lived in a magical floating castle that soared high in the sky. Every day, he would look down and see the world below.",
    },
    {
        "page_id": 2,
        "page_content": "Prince Arthur loved to explore. He would fly on his magical carpet to faraway lands, meeting kind creatures and helping those in need. The people of the kingdom adored him.",
    },
    {
        "page_id": 3,
        "page_content": "One day, dark clouds covered the sky, and the castle started to descend. Prince Arthur knew he had to save his kingdom. With the help of his friends, they fixed the floating castle, and it soared higher than ever before."
    }
]
  • step 3. 调用 Clipdrop 的 API 生成图片的 Prompt:
PromptImage
A prince named Arthur in a magical floating castle in the sky, Tove Janssony illustration style.ttt

2. Showcase

We42rD

sGWzjH

CuFIo3

最后更新于