保姆级教程教你快速搭建属于自己的AI绘画系统!(收藏)

Midjourney收费高、无法支付,且生成想要的图片受限,风格固定,如果能够10分钟快速搭建属于自己的AI绘画系统,并且对电脑配置无要求,你心动了吗?

86916368b74e2e2c00ab2b82611fc786.jpeg

先来看看AI系统构建完成后的画面,只需要输入自定义的prompt,就能生成自己想要的人像、风景、动物各种主体,科幻、油画、写实各种风格的图片,后期还可以叠加超分辨率技术(SR)进一步生成高清大图!很难想象这是10分钟能够做出来的轮子,如果觉得画面熟悉的话,没错,这就是大名鼎鼎的stable-diffusion开源的扩散模型!

083548b6bde3367a54b23375d9977aba.png

接下来话不多说,逐一按照傻瓜式的操作步骤即可完成AI绘画系统搭建!首先第一步打开对应github链接:https://github.com/camenduru/stable-diffusion-webui-colab,这是由camenduru开源的使用google-colab资源进行stable-diffusion扩散模型fine-tune得到的开箱即用模型列表。

fc1a95ed72f89da9b3cb286f87af1edd.png

紧接着第二步,ctrl+F或者command+F 搜索 ChilloutMix,进一步点击stable版本进入下一步。

bec99eaa230ae665079715c5870b1edd.png

第三步通过链接跳转到到Google Colab界面中,为一个免费提供GPU资源的云端机器(如果没有谷歌账户的需要自行注册)。

e3817339149940207265c53698c23c09.png

之后开启第四步,点击上图左上角的运行按钮运行框中代码,忽略警告并点击仍然运行,等待few minutes,期间会开始下载模型、准备webUI并打印一系列日志,看看就好。

480f0b176bfb7ef8831ed2b61d5ece88.png

紧随第五步,确认第四步正常进行,并在log最后产出4个链接,这链接实际上就对应webUI的远程界面,点击最后一个链接即可。

e2966d0d26ce8cf0a24b62220aaef787.png

第六步也是最后一步,即进入到自己搭建的stable-diffusion web界面中,在第一个半透明灰色框中输入自定义Prompt,第二个灰色框中写入Negative prompt(可选),分别代表正向提示词和反向提示词,进一步调整Sampling method 为 DPM++ SDE Karras,Sampling steps设置为20-40,Width和Height代表宽高自由设置即可,然后点击 Generate  等待出图(第一次1min)。

dff8092ca758473b2e5d835f3dee92e9.png

当然,写prompt也是一门技术,或许是对于能够产出自己想要的图片来讲最重要的事情,可以进入https://prompthero.com/网站参考全球广大网友的精华prompt经验来写属于自己的prompt。

6a70790aa658843f4082c001fa265672.png

后图附上一系列的图片和prompt仅供参考~ 

Prompt1:professional portrait photograph of a gorgeous Norwegian girl in winter clothing with long wavy blonde hair, ((sultry flirty look)), freckles, beautiful symmetrical face, cute natural makeup, ((standing outside in snowy city street)), stunning modern urban upscale environment, ultra realistic, concept art, elegant, highly detailed, intricate, sharp focus, depth of field, f/1. 8, 85mm, medium shot, mid shot, (centered image composition), (professionally color graded), ((bright soft diffused light)), volumetric fog, trending on instagram, trending on tumblr, hdr 4k, 8k

Negative prompt:(bonnet), (hat), (beanie), cap, (((wide shot))), (cropped head), bad framing, out of frame, deformed, cripple, old, fat, ugly, poor, missing arm, additional arms, additional legs, additional head, additional face, multiple people, group of people, dyed hair, black and white, grayscale

d2c481f0be6579529c609659d089853e.png

Prompt2:Hyper realistic painting of a beautiful girl in an EVA plugsuit, hyper detailed, anime, by greg rutkowski, trending on artstation

59dc6aa015350ee74229e7986ebe17b1.png

Prompt3:THE CHERRY BLOSSOM TREE HOUSE :: beautiful ornate treehouse in a gigantic pink cherry blossom tree :: on a high blue grey and brown cliff with light snow and pink cherry blossom trees :: Roger Deakins and Moebius and Alphonse Much and Guweiz :: Intricate details, very realistic, cinematic lighting, volumetric lighting, photographic, –ar 9:20 –no blur bokeh defocus dof –s 4000

6dd8649890692894898d078863057294.png

Prompt4:bunny, high ornamented light armor, fluffy fur, foggy, wet, stormy, 70mm, cinematic, highly detailed

592233de416470f262723d7c99a617d4.jpeg

另外,此系统不仅支持txt2img(文生图),还支持img2img(图生图)、Train(fine-tune微调训练)等等,此外,本方法会受Google带宽和资源限制,也可考虑在PC单机(Windows&Mac)配置真正属于自己的AI绘画系统,不过略微复杂一点,随后更新~

原创不易,在看收藏都是莫大的分享动力!有任何问题公众号直接留言~

861e32dd0971dc3b3dff88d1a3bbf9bc.png

历史推荐

原创超详细Python学习路线+思维导图

原创最全数据分析师学习路线+思维导图!

GPT-4出圈,有一份原创最全NLP学习路线请查收!

“高频面经”之数据分析篇

“高频面经”之机器学习篇

“高频面经”之深度学习篇

Selenium爬取京东商品

Scrapy框架爬取QQ音乐

9b600ccda3d7cd97ff84915f20b11783.png

数据分析与挖掘

数据结构与算法

深度学习与大数据框架

欢迎关注,感谢“在看”,随缘稀罕~

735a75b5ae968f3bbdabe33111a729a3.png

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2023年6月16日
下一篇 2023年6月16日

相关推荐