当前位置:网站首页>学习DiscoDiffusion的最基础操作
学习DiscoDiffusion的最基础操作
2022-06-27 01:22:00 【YakSue】
目标
Disco Diffusion 是一个AI绘图工具,通过一句话就可以让AI画出符合描述的图片,网上可以看到很多令人惊叹的结果。
我也想尝试一下这个神奇的技术,本篇目标是学习使用它的基础操作。
主要参考的教程是:Quick & Easy Tutorial for Disco Diffusion Google Colab (Make your own pictures!). - YouTube
由于是在 Google Colab 上,所以如果对它一无所知,最好简单了解下相关的基础概念(见前一篇)
0. 基础信息
本篇将使用的 Disco Diffusion 的 GoogleColab地址是:
Disco Diffusion v5.4 [Now with Warp] - Colaboratory
(原教程的版本是 4.1,但是我尝试后有报错,所以最后换成了这个5.4版本)
随后,可以将其复制到自己的GoogleDrive网盘中。
之后就可以在自己的网盘中打开了。本篇后续操作也是在自己网盘中做的。
正如前一篇所说,它是Jupyter Notebook,所以要做的就是配置这个文档中的基础设置,然后运行这个文档。
文档的目录结构如下:
接下来就是需要在其中做些最基本的设置了。
1. 设置:名字、步数、尺寸
这些设置在 Settings 中
这里有三个基础的参数注意:
bathch_name:这次运行的名字,也是之后会保存在云盘里的名字
steps:要运行的步数。步数越多则细节程度越高,教程中给出的示例:
当然,步数越高则耗时越长,所以对于一幅图片需要找到最合适的步数。
width_height:图片长宽。必须是64的倍数。
2. 设置:保存间隔
这个设置在 Settings 中的 ExtraSettings 中:intermediate_saves 将控制中间保存几次。比如我这里填9,那么在我的云盘上除了会看到最后一张结果外,还可以看到中间运算过程中保存的9张。
3. 设置:核心的Prompts
它在 Settings 中的 Prompts 中。
当然,他就是最核心的了。对于这个参数,文档中的描述是:
text_prompts: A description of what you’d like the machine to generate. Think of it like writing the caption below your image on a website. 你希望机器生成的内容的描述。可以想象是,如果这个图片出现在网站上,那么它的标题是什么。
例如,我这里是:
“a huge panda is destroying alien base”, “Technology and Fantasy”
“大熊猫正在摧毁外星人基地”,“科技与奇幻”
4. 设置:显示间隔,批数目
这些设置在Diffuse中:
display_rate :没间隔几步就在Colab中显示
n_batches:总共运算几批(即输出几次完全不同的图片)
5. 开始运行!
在最上面,找到“全部运行”的按钮:
随后会弹出一些提示。
比如
还有些人机验证
还有关联GoogleDrive的提示:
等都搞定后,就开始运行这个文档中的代码了。
开始会需要几分钟等待安装所依赖的数据。
之后就可以在最下方看到计算的进展了:
6. 结果
运行完成后(大约经历了40分钟),就可以在自己的网盘中找到输出的图片了:
(其中 partials 文件夹存储了中间的过程)
评价下这个结果:
感觉 “外星人基地” 这感觉是有了,“熊猫”这个“巨大”的特征也能看出来,黑白的特征也能看出来,不过熊猫自己的细节,有点太抽象了(笑)。
总结
- 这个是基于 GoogleColab 的,所以最好了解下基础概念,(见前一篇)
- 到 DiscoDiffusion 的 GoogleColab地址,将其复制到自己的GoogleDrive网盘中。
- 打开自己网盘中的DiscoDiffusion副本,做最基础的设置,核心设置是 prompts。
- 点击运行,然后就可以在自己的GoogleDrive网盘中看到结果。
其他参考资料
新浪微博@Simon_阿文里有很多相关的资料,本篇的教程也是在这里看到的。
人工智能绘画工具 Disco Diffusion 入门教程 - 哔哩哔哩 也是一篇类似的中文教程,可以参考。
边栏推荐
- Kept to implement redis autofailover (redisha) 17
- 大白话高并发(一)
- Unable to create a folder to save the sketch: MKDIR sketch
- 3-wire SPI screen driving mode
- CLIP:从自然语言监督中学习可迁移的视觉模型
- 1.44 inch TFT-LCD display screen mold taking tutorial
- Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
- 美团:踩雷好几年,才总结出的数据治理避坑攻略
- Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
- Flutter series: flow in flutter
猜你喜欢
Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
JVM 的指针压缩
Continuous delivery blue ocean application
浏览器缓存
XSS attack notes (Part 1)
Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
30《MySQL 教程》MySQL 存储引擎概述
Flink practical problems (VII): no watermark (watermarks are only available eventtime is used)
buuctf-pwn write-ups (6)
The listing of Fuyuan pharmaceutical is imminent: the net amount raised will reach 1.6 billion yuan, and hubaifan is the actual controller
随机推荐
get_sequencer的用法总结
Reporting Classes中uvm_report_server的get_severity_count和get_server用法
Hid device descriptor and keyboard key value corresponding coding table in USB protocol
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
架构实战营模块五作业
Operating instructions and Q & A of cec-i China learning machine
Two days of beautiful butterfly animation
XSS attack notes (Part 1)
hibernate 根据方言生成sql
Flink practical problems (VII): no watermark (watermarks are only available eventtime is used)
Kept to implement redis autofailover (redisha) 14
idea 插件开发一些异常处理
NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
[graduation season] role conversion
Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
Bootstrapblazor + FreeSQL actual combat chart usage (2)
buuctf-pwn write-ups (6)
Law of Large Numbers
史上最难618,TCL夺得电视行业京东和天猫份额双第一
Break through the performance bottleneck of image recognition through rust language computing acceleration technology