在 Apple Silicon M1/M2 Mac 上安装和运行 Stable Diffusion

说实话,我找了好多关于如何在 M1/M2 上安装和运行 Stable Diffusion 的教程和帖子,发现相互之间借鉴的不少,但是能用的确实没几个。

寻找一番后,发现其实没那么复杂。也不知道为什么网上的那么多教程搞得那么复杂,又是这个又是那个的一大堆,简单实现的方式有好几种:

阅读更多

Mac MAX_open

在使用 Hexo 的过程里,经常会卡在 deploy 指令上,错误原因之一可能是因为 Mac 的 MAX_open 数小的原因,Linux 默认为 1024,而 Mac 上只有 256,所以只要修改 MAX_open 数就可以了。指令如下:

阅读更多

Mac 隐藏/显示桌面图标

Shell:

1
defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder

&

1
defaults delete com.apple.finder CreateDesktop;killall Finder

AppleScript:

1
2
3
4
5
6
7
display dialog "桌面图标设置为可见或隐藏?" buttons {"可见", "隐藏"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "隐藏" then
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder"
else
do shell script "defaults delete com.apple.finder CreateDesktop;killall Finder"
end if