Stable Diffusion on M1

好久没有hands on了,今天看Andrej Karpathy的油管撸Stable Diffusion的视频,手痒忍不住挽起袖子开干了。
我是一台搭载了Apple M1 Pro的16英寸MBP,按照huggingface的官方教程和MPS支持教程 跑通了。

运行时两个警告⚠️:

  1. ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy. 没大问题,通过按照spacy和ftfy包解决了,同时了解到了NLP神器spacy
  2. Potential NSFW content was detected in one or more images. A black image will be returned instead. Try again with a different prompt and/or seed. 待解决

另外搜索如何在M1上运行的时候还找到了InvokeAI - Stable Diffusion Toolkit, 后续可以研究一下。

PS 环境如下:

Python 3.9.6
Package            Version
------------------ ------------------
blis               0.7.9
catalogue          2.0.8
certifi            2022.9.24
charset-normalizer 2.1.1
click              8.1.3
confection         0.0.3
cymem              2.0.7
diffusers          0.6.0
en-core-web-sm     3.4.1
filelock           3.8.0
ftfy               6.1.1
huggingface-hub    0.10.1
idna               3.4
importlib-metadata 5.0.0
Jinja2             3.1.2
langcodes          3.3.0
MarkupSafe         2.1.1
mpmath             1.2.1
murmurhash         1.0.9
networkx           3.0b1
numpy              1.23.4
packaging          21.3
pathy              0.6.2
Pillow             9.3.0
pip                22.3
preshed            3.0.8
pydantic           1.10.2
pyparsing          3.0.9
PyYAML             6.0
regex              2022.10.31
requests           2.28.1
scipy              1.9.3
setuptools         65.5.0
smart-open         5.2.1
spacy              3.4.2
spacy-legacy       3.0.10
spacy-loggers      1.0.3
srsly              2.4.5
sympy              1.11.1
thinc              8.1.5
tokenizers         0.13.1
torch              1.14.0.dev20221031
torchaudio         0.14.0.dev20221030
torchvision        0.15.0.dev20221031
tqdm               4.64.1
transformers       4.23.1
typer              0.4.2
typing_extensions  4.4.0
urllib3            1.26.12
wasabi             0.10.1
wcwidth            0.2.5
wheel              0.37.1
zipp               3.10.0

你可能感兴趣的:(Stable Diffusion on M1)