手把手教你用提示词进行AI 作画

博文小编

2023-07-13

随着 AI 的快速发展,AI 作画已成为备受关注的一个分支。

通过使用机器学习算法,AI作画软件可以帮助艺术家、设计师和普通用户创造出令人惊艳的数字艺术作品。

AI 作画的一个显著优点是它可以为创作者提供更多的创作可能性。

AI 作画软件不仅可以辅助人们完成烦琐的绘画任务,如颜色选取、线条绘制和图像处理等,而且可以帮助创作者探索新的艺术方向和风格,释放他们的创造力和想象力。

很多AI作画的软件效果十分惊艳,比如 Midjourney、Dall·E、Stable Diffusion 等。下图是Midjourney生成的,逼真生动,甚至完全分不出是实际照片还是人工智能生成的。

提示词在 AI 作画中发挥的作用非常重要。Midjourney作画的提示词基本语句结构是:

/imagine prompt: [IMAGE PROMPT] [—OPTIONAL PARAMETERS].

要注意:Midjourney 对中文支持不友好,也不支持输入中文自动翻译成英文进行作画,所以建议用英文提示词。

可先用 ChatGPT 生成英文提示词,再输入给 Midjourney,并不断调整。如果遇到好的提示词,也可以整理成模板。如下是一个还不错的提示词模板:

I want you to respond in only LANGUAGE of English. I want you to type out: /imagine prompt: [Keyword] text at start of the description (But remove any quotation marks from around the prompt output or similar and add a Comma on the end).Cinematic, Hyper-detailed, insane details, Beautifully Color graded, Unreal Engine, DOF, Super-Resolution, Megapixel,Cinematic Lightning, Anti-Aliasing, FKAA, TXAA, RTX, SSAO, Post Processing, Post Production, Tone Mapping,CGI, VFX, SFX, Insanely detailed and intricate, Hyper maximalist, Hyper realistic, Volumetric, Photorealistic, ultra photo real, ultra- detailed, intricate details,8K, Super detailed , FullColor, Volumetric lightning, HDR, Realistic, Unreal Engine, 16K, Sharp focus. Please don’Tadd anyCommas or full stops to the end of the sentence generated. Always starTthe prompTwith “/imagine prompt: “ Reply me “got it” after you fully understand the prompt. I will give you [keyword] in the new dialogue box. You should translate [keyword] to English first, then follow the prompt. Got it! Please give me the [keyword] to begin.

收到“got it”后,在新的对话框输入关键字, 这个关键字要尽可能详细地描述想表达的内容。ChatGPT 按照模板自动生成了详细的提示词 , 比如直接输入“滕王阁序”,就能生成如下提示词。

/imagine prompt: “Tengwang Pavilion Preface” text at start of the description,Cinematic shots showcase the grandeur of the Tengwang Pavilion, with hyper-detailed close-ups capturing the intricate carvings and architecture. The scene is beautifully color graded to emphasize the vibrant hues of the pavilion, all rendered in Unreal Engine with DOF and super-resolution techniques for stunning clarity. The megapixel camera captures every detail with cinematic lightning, anti-aliasing, FKAA, TXAA, RTX, SSAO, and other post-processing effects, including tone mapping for a seamless blend of CGI and VFX. The SFX and VFX teams worked tirelessly to create an ultra-realistic portrayal of the Tengwang Pavilion, using volumetric and photorealistic techniques to add depth and texture to the scene. The result is an insanely detailed and intricate scene, hyper maximalist and hyper realistic in every way. The volumetric lightning and HDR effects make the scene come alive, with super-detailed 8K and 16K resolution bringing the pavilion to life in full color. The sharp focus and ultra photo real details make the Tengwang Pavilion Preface a master piece of post-production and CGI technology.

再把提示词复制到 Midjourney,就能得到生成的图片:

如果在 Midjourney 中直接输入“史蒂芬·乔布斯在喝茶”:

/imagine prompt: “ 史蒂芬·乔布斯在喝茶 “

生成图片:

四张小图中均显示为茶壶,完全没有乔布斯的身影,也没有喝茶的动作。可见 Midjourney 对中文识别效果欠佳,只能识别一部分。

如果输入“史蒂芬·乔布斯在喝茶”的直译英文“Steve Jobs is drinking tea”:

/imagine prompt: Steve Jobs is drinking tea

生成图片:

可以看出有不同风格的乔布斯在喝茶,但每幅小图中的人物画像与真人还有差异,不过已经能看出有点相像。

如果我们想在此基础上继续提升,可使用 Midjourney 的按图生成功能。在上图中,主要提升点为乔布斯的面部图像,我们可以根据提升点上传相关图片:

具体步骤如下:先将图片上传并获取图片链接,然后将图片链接直接加入提示词中,最后按照原提示词书写。提示词变为:

/imagine prompt: “ 具体图片链接 “ Steve Jobs is is drinking tea”

新生成图片如下:

面部借鉴了上传的图片,更清晰逼真、符合预期。

欢迎阅读《驾驭ChatGPT:学会使用提示词》一书,了解更多高效使用AI工具的方法!

读者评论

相关专题

相关博文

  • 用GPU进行TensorFlow计算加速

    用GPU进行TensorFlow计算加速

    管理员账号 2018-03-01

    小编说:将深度学习应用到实际问题中,一个非常大的问题在于训练深度学习模型需要的计算量太大。为了加速训练过程,本文将介绍如何如何在TensorFlow中使用单个GPU进行计算加速,也将介绍生成TensorFlow会话(tf.Sessio...

    管理员账号 2018-03-01
    5188 0 3 1
  • AI 大战高考作文!实测 ChatGPT、文心一言、通义千问等 8 款“神器”

    AI 大战高考作文!实测 ChatGPT、文心一言、通义千问等 8 款“神器”

    博文小编 2023-06-12

    2023 年高考作文题目火热出炉,其中全国甲卷作文题引人深思: 人们因技术发展得以更好地掌控时间,但也有人因此成了时间的仆人。 身处技术圈的我们,对于这句话可能有很多话想说。而对于这个话题,CSDN 也想问问近来大火的 AI 技术本...

    博文小编 2023-06-12
    285 0 0 0
  • 提示工程七巧板:让ChatGPT发挥出最佳性能

    提示工程七巧板:让ChatGPT发挥出最佳性能

    博文小编 2023-06-09

    机器有机器的作用,人有人的独特个性和价值。 正因为如此, 一方面,ChatGPT 等人工智能语言模型需要通过不断与人类的公共知识信息数据交互、汇聚,不断与人类进行对话,才能拥有越来越好的智能表现; 另一方面,作为人工智能机器...

    博文小编 2023-06-09
    61 0 0 0