图 an astronaut travels for the planets
Disco Diffusion(DD)
一个在Google Colab上运行的代码,原理是「CLIP-Guided Diffusion」,通过文字输入让AI产生相应的图片输出。Disco Diffusion不断的更新迭代,现在最新版本为5.2。
图源 知乎
「code link」
https://colab.research.google.com/github/alembics/disco-diffusion/blob/main/Disco_Diffusion.ipynb
「代码界面」
「运行参数设置」
完成下述的参数设置,直接运行即可。
Settings
设置主要的参数:
batch_name:为在Google drive 中生成的结果文件夹名称
width_height:生成图片的尺寸(值必须为64的倍数,数值越大运行时间越长)
init_image:输入初始图片的路径,不用初始图片时,DD可能会给你画出一些难以预期的东西来。
Prompts
这是运行中最关键的一个设置,在此处输入所想得到的画的描述,这里默认的结果是“A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.", "yellow color scheme"”
整个画作的描述词可拆解为五个维度理解:
画种描述:A beautiful painting of;
内容描述:a singular lighthouse, shining its light across a tumultuous sea of blood;
画家描述:by greg rutkowski and thomas kinkade;
参考渲染方式:Trending on artstation(全球最专业的CG艺术家社区,又称A站);
颜色描述:yellow color scheme。
Diffuse - 渲染
图 渲染过程图 (该图prompt设置为"A beautiful painting of an astronaut travels for the planets by greg rutkowski and thomas kinkade, Trending on artstation.", "yellow color scheme”,初始文件为公众号头像)
图 渲染结果图
「结果查看」
图 渲染结果文件夹(默认关键词 :“A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.", "yellow color scheme"”)
「其他生成结果」
虽然Disco Diffusion可以生成很多壮大的场景图片,但是对于生成人像来说存在很多问题。比如说像下面这种,存在明显的模糊或者重叠:
「参考」
感兴趣的可以查看下面的文档或者官网链接~
[1] https://www.zhihu.com/question/530767425
[2] https://openai.com/blog/clip/
[3]https://www.bilibili.com/video/BV1j541197zW/
文字排版 | 南波婉琬
审核 | 南波婉琬