6月17日 消息:相信不少朋友都在小红书之类的平台上看到过不少绘本类的作品。想要利用AI产品生成这类优质的作品,往往需要根据脚本,一句一句地去生成插画作品,费时费力。
sony wm1a wm1z
虽然市面上已经有不少AI绘本生成产品,但据小编体验的几个来看,还是需要费一些时间去调整角色的,而且有的还要将角色手动插入背景中,操作起来还是有点繁琐的。
所以目前来说,用AI制作绘本,最快的方式还是通过ChatGPT。
最近,有一位名叫尹相志的网友在YouTube上分享了一个非常实用的prompt技巧,只需要一个伪代码prompt,就可以让ChatGPT自动生成一整套的绘本图片。
图源备注:图片由AI生成,图片授权服务商Midjourney
什么是伪代码?
伪代码是一种用于描述算法或程序逻辑的非正式语言,它使用自然语言和编程语言的混合形式来表达算法的步骤和流程。伪代码的目的是使算法的逻辑清晰易懂,而无需深入到具体的编程语言细节。以下是伪代码的一些基本特点和写作指南:
伪代码的特点:
易读性:使用接近自然语言的表达方式,便于理解。
抽象性:不涉及具体的编程语法,而是关注算法的逻辑结构。
通用性:不依赖于特定的编程语言,具有跨语言的特性。
写作伪代码的步骤:
- 定义变量:使用变量来存储和操作数据,变量名应具有描述性。
- 指定数据类型:明确变量的数据类型,如整数、浮点数、字符串、数组等。
- 描述函数:使用函数来封装重复使用的代码块或特定的任务。
- 控制流程:使用控制结构来指导程序的执行流程,如条件判断、循环等。
- 使用条件语句(如 if-else):根据条件来决定执行不同的代码分支。
- 使用循环结构(如 for、while):对集合中的元素进行迭代处理或在满足条件时重复执行代码。
写伪代码的提示(Prompt):
剩余75%的图文内容打赏作者后可查看打赏联系客服
微信扫码打赏作者
金额:6.99元好的内容,值得赞赏!打赏后不支持退款! 联系客服 扫描下方二维码关注公众号“站长资讯”,及时联系客服解决。请把【打赏记录详情】截图给客服,同时把您打赏的文章【网址】发给客服。客服会在24小时内把完整文章内容发送给您。(客服在线时间为周一至周五9:00-11:30 14:00-17:30) span.cprice { color: #ee2222; } .pcontent { overflow: visible } .markdown { position: relative; text-overflow: ellipsis; word-wrap: break-word; padding-bottom: 160px } .trancent_block { background-color: #fff; opacity: 0; filter: alpha(opacity=0) } .carousel_collapsed_layer { display: block; width: 100%; height: 110px; position: absolute; bottom: 180px } .bg-gradient-white, .bg-gradient-snow { background-image: -webkit-linear-gradient(top,rgba(255,255,255,0) 25%,#fff 67%); background-image: linear-gradient(to bottom,rgba(255,255,255,0) 25%,#fff 67%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffffff',endColorstr='#FFffffff',GradientType=0) } .reward-partial.reward-partial-mask { margin-top: 0px; width: 100%; /*padding-bottom: 160px;*/ z-index: 1000; position: absolute } .need-purchase { /*margin-bottom: 100px; min-height: 200px*/ } .line-sperator { width: 100%; position: relative } .line-sperator .lock-img-div { position: absolute; top: -20px; left: 50%; margin-left: -35px; width: 70px; background: #fff; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center } .header-item .line-sperator { width: 100%; border-bottom: 1px solid #EDEDED; position: relative } .header-item .line-sperator .lock-img-div { position: absolute; top: -20px; left: 50%; margin-left: -35px; width: 70px; background: #fff } .header-item .line-sperator .lock-img-div .lock-img { width: 20px; height: 32px } .body-item .tip-one { margin-top: 19px; font-size: 14px; color: #FF7055; line-height: 23px; text-align: center } .login-partial { position: relative; text-align: center } .hide_box { z-index: 999; filter: alpha(opacity=20); background: #000; opacity: 0.2; -moz-opacity: 0.2; left: 0; top: 0; height: 99%; width: 100%; position: fixed; display: none } .shang_box { width: 340px; height: auto; padding: 20px 20px 40px; background-color: #fff; border-radius: 10px; position: absolute; z-index: 1000; left: 210px; bottom: 100px; display: none; box-shadow: 0 3px 14px 0 rgba(199,209,215,.4) } .shang_box:after, .shang_box:before { content: " "; display: block; position: absolute; left: 160px; width: 0; height: 0 } .shang_box:after { bottom: -8px; border-top: 8px solid #fff; border-left: 8px solid transparent; border-right: 8px solid transparent } .shang_box:before { bottom: -9px; border-top: 8px solid #eaeeef; border-left: 8px solid transparent; border-right: 8px solid transparent } .shang_box img { border: none; border-width: 0 } .dashang { position: relative; margin: 40px auto 0; height: 44px; width: 124px; font-size: 16px; box-shadow: 0 10px 20px rgba(255,96,96,.4); border-radius: 22px; background: #ee2222; color: #fff; transition: all 0.3s; outline: none } button:focus { outline: none !important } .dashang:hover { opacity: 0.8; padding: 8px 15px; font-size: 18px } .dashang-text { margin-top: 10px; opacity: .5; display: block; text-align: center; line-height: 30px; font-size: 14px; color: #303030 } .shang_close { float: right; display: inline-block } .shang_logo { display: block; text-align: center; margin: 20px auto } .shang_tit { width: 100%; height: 65px; text-align: center; line-height: 66px; color: #a3a3a3; font-size: 16px; padding-top: 15px } .shang_tit p { color: #27282d; text-align: center; font-size: 16px; margin-left: 20px } .shang_payimg { width: 160px; border: 6px solid #fff; margin: 0 auto; border-radius: 3px; height: 160px } .shang_payimg img { display: block; text-align: center; width: 148px; height: 148px } .shang_paytxt { font-size: 14px; line-height: 20px; color: #27282d; margin: 10px 0 } .shang_info { clear: both } .shang_info { color: #C3C3C3; text-align: center; font-size: 12px; text-decoration: none; line-height: 2em } .success-contact { position: relative; width: 100% text-align: center; } .cbtn { margin-top: 1rem; font-size: .875rem; --tw-text-opacity: 1; color: rgb(141 148 153 / var(--tw-text-opacity)); opacity: 0.75; } .cbtn:focus { outline: 2px solid transparent; outline-offset: 2px; } .contact-wrapper { position: absolute; left: 0px; bottom: 2.25rem; font-size: .815rem; } .contact-wrapper_info { position: relative; background-color: #fff; padding: 1rem 0 0 0; line-height: 1.5rem; color: #71787e; } span.text-orange-400 { color: #f59e0b; } .contact-wxcode { width: 140px; height: 140px; margin: 1.5rem auto 0; }