玩玩文字轉圖片的 min(DALL·E)
source link: https://blog.gslin.org/archives/2022/07/24/10812/%e7%8e%a9%e7%8e%a9%e6%96%87%e5%ad%97%e8%bd%89%e5%9c%96%e7%89%87%e7%9a%84-mindall%c2%b7e/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
玩玩文字轉圖片的 min(DALL·E)
幾個禮拜前看到「Show HN: I stripped DALL·E Mini to its bare essentials and converted it to Torch (github.com/kuprel)」這個東西,有訓練好的 model 可以直接玩文字轉圖片,GitHub 專案在「min(DALL·E) is a fast, minimal port of DALL·E Mini to PyTorch」這邊可以取得。
因為這是包裝過的版本,裝起來 & 跑起來都很簡單,但沒想到桌機的 1080 Ti 還是跑不動,只能用 CPU 硬扛了,速度上當然是比官網上面列出來用 GPU 的那些慢很多,但至少能跑起來玩看看。
首先是拿官方的句子來玩看看,第一次跑會需要下載 model (會放到我們指定的 pretrained
目錄下):
#!/usr/bin/env python3 from min_dalle import MinDalle import torch model = MinDalle( models_root='./pretrained', dtype=torch.float32, device='cpu', is_mega=True, is_reusable=False, ) images = model.generate_image( text='Nuclear explosion broccoli', seed=-1, grid_size=2, is_seamless=False, temperature=1, top_k=256, supercondition_factor=32, is_verbose=False, ) images = images.save('test.png')
我自己在下載過後,跑每個生成大概都需要十分鐘左右 (參數就像上面列的,CPU 是 AMD 的 5800X,定頻跑在 4.5GHz),出來的結果是這樣:
接著是一些比較普通的描述,這是 sleeping fat cats
:
然後來測試看看一些比較偏門的詞,像是 Lolicon
,這個就差蠻多了:
但感覺有蠻多應用可以掛上去,這樣有點想買張 3090 了...
Related
Amazon EC2 有 Mac (M1) 機種可以租用了
2020 年年底的時候 AWS 推出用 Mac mini 配合搭建出 Mac (Intel) 機種:「Amazon EC2 推出 Mac Instance」,當初有計畫在 2021 年推出 M1 的版本: Apple M1 Chip – EC2 Mac instances with the Apple M1 chip are already in the works, and planned for 2021. 不過就沒什麼意外的 delay 了,這次則是推出了 M1 的版本:「New – Amazon EC2 M1 Mac Instances」。…
July 10, 2022In "AWS"
ClickHouse 自家做的 benchmark 比較
在「Show HN: A benchmark for analytical databases (Snowflake, Druid, Redshift) (clickhouse.com)」這邊看到 ClickHouse 自家做的 benchmark 比較,網站在「ClickBench — a Benchmark For Analytical DBMS」這邊。 這種 benchmark 基本上是拿來當作清單來看,另外 Hacker News 上的討論一定得看,尤其是沒被列上 benchmark 的... 講到 ClickHouse,先前是有朋友跑來說他有個需求是需要跑分析,但遇到用 PostgreSQL 時發現寫入速度不夠快的問題,看看有沒有什麼方法可以解。問了多一點以後發現他的需求是 OLAP 類而不是 OLTP 類,就先跟他講要去找 OLAP engine 來解決。 然後就聊到維基百科上「Comparison of OLAP servers」這個條目,裡面列出來的 open source 軟體是不少,但 Apache 家基本上大家都知道是回收場,裡面就剩下 ClickHouse…
July 15, 2022In "Computer"
Cloudflare 上的 Hertzbleed 解釋
除了 Hertzbleed 當初公佈時的論文與網頁外,Cloudflare 上也有一篇 Hertzbleed 的解釋:「Hertzbleed explained」。 會特別拿出來提是因為這篇是 Yingchen Wang 寫的,也就是 Hertzbleed 論文裡兩位第一作者之一 (另外一位是 Riccardo Paccagnella),而從她的網站上也可以看到 Cloudflare intern 的資訊: Graduate Research Intern at Cloudflare, 2022 Summer Hertzbleed 也是一種 side-channel attack,利用 CPU 會依照電量與溫度,而動態調整頻率的特性來達到遠端攻擊,而不需要在機器旁邊有功率錶之類儀器。 傳統上針對這類執行時間的程式會用 constant-time programming 來保護,但 Hertzbleed 則是利用了 CPU 會動態調整頻率的特性鑽出一個洞。現在學界對這個攻擊方式還不熟悉,等熟悉了以後應該是會把洞鑽大... 依照原理來說,定頻應該會是一個解法... 像是大家現在都很喜歡搞「降壓超頻」,算是某種定頻的方式,而一般大家會設定在全速跑也不會過熱降頻的情況。 目前 Intel 跟 AMD 都決定不 patch,依照洞一向都是愈挖愈大,來期待洞大到 RSA 或是…
July 12, 2022In "Computer"
Author Gea-Suan LinPosted on July 24, 2022Categories Computer, Murmuring, Photo, Programming, Recreation, SoftwareTags dall, e, graph, image, learning, machine, min, mindalle, mini, model, python, pytorch, text, to, torch
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Notify me of follow-up comments by email.
Notify me of new posts by email.
To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)
Post navigation
Recommend
-
51
这是模仿乐视遥控App中添加万能遥控器的交互效果,实现效果如下:感觉是不是有点小炫酷与小复杂,其实整个实现大致分为三部分:绘制手机实现拖动修正位置1.绘制手机这部分其实都是自定义View的基础。仔细观察手机的组成,无非就是圆角矩形、圆、线、矩形组成。首...
-
80
怀旧游戏 - @whwq2012 - 必选项:<br/>1、游戏是在 2008 年之前的<br/>2、至少也得在能在 windows98 上运行,DOS 系统的游戏还是算了。<br/>3、不要策略类(红警和帝国时代这种),不要
-
62
云计算 - @dushandz - 如题不想每年都去买 Aliyun 求推荐树莓派或者类似产品
-
53
游戏 - @ycj1379 - 很久以前玩过极品飞车 9,可以在城市里随便开的形式挺喜欢的,后来偶尔玩过后几代。现在想颓废一下玩玩游戏,说说各位的经验参考一下~
-
61
-
59
Python - @767690339 - 最近好像这个 PYTHON 很火。
-
38
继我成功预言了 Kotlin 、Flutter 技术会火起来之后,我相信,下一个会火起来的技术是区块链。 1. 别抬杠,我 14 年开始玩 Kotlin,16 年开始玩 Flutter (虽然看了看实现原理觉得没啥屁用就放弃了)的时候,可能你还不知道这俩名...
-
51
玩玩区块链——概念 ...
-
3
1. 前言# 兴致来了玩玩 WPF 的彩虹文字。不是用 LinearGradientBrush 制作渐变色那种,是指每个文字独立颜色那种彩虹文字。虽然没什么实用价值,但希望这篇文章里...
-
7
无痕 PS、读得懂文字,OpenAI 的二代 DALL·E 惊艳亮相!
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK