38 words
1 minute
ทดสอบรัน Stable Diffusion บน Apple Silicon
ทดลองใช้ MLX ในการสร้างภาพ (diffusion model) แบบ Local บนเครื่อง Mac
- Clone the repository
git clone https://github.com/mlx-examples/stable_diffusion#โคลน repository ที่เป็นทางการของ Apple จาก Github
- Install dependencies
cd mlx-examplescd stable-diffusionpip install -r requirements.txt#ติดตั้งไลบรารี่และไฟล์ที่จำเป็น
- สร้างภาพที่ต้องการ
python3 txt2image.py "Durian in space, background is Earth" --n_images 1#ภาพที่ได้จะปรากฏที่ไฟล์ชื่อ out.png ทดสอบรัน Stable Diffusion บน Apple Silicon
https://www.waghor.com/posts/localmlx/